Skip to content

Commit 193b382

Browse files
committed
Improve mouse and long-press input feedback for hand items
1 parent 833bb0f commit 193b382

16 files changed

Lines changed: 583 additions & 502 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ jobs:
10441044
- name: Setup Fastlane
10451045
uses: ruby/setup-ruby@v1
10461046
with:
1047-
ruby-version: "4.0.2"
1047+
ruby-version: "4.0.3"
10481048
bundler-cache: true
10491049
working-directory: app/android
10501050
- name: 🚀 Deploy to Play Store

api/pubspec.lock

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ packages:
4949
url: "https://pub.dev"
5050
source: hosted
5151
version: "2.13.1"
52-
boolean_selector:
53-
dependency: transitive
54-
description:
55-
name: boolean_selector
56-
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
57-
url: "https://pub.dev"
58-
source: hosted
59-
version: "2.1.2"
6052
build:
6153
dependency: transitive
6254
description:
@@ -85,10 +77,10 @@ packages:
8577
dependency: "direct dev"
8678
description:
8779
name: build_runner
88-
sha256: "521daf8d189deb79ba474e43a696b41c49fb3987818dbacf3308f1e03673a75e"
80+
sha256: "22fdcc3cfeb9d974d7408718c4be15ec5e9b1b350088f3a6c88f154e74dd700d"
8981
url: "https://pub.dev"
9082
source: hosted
91-
version: "2.13.1"
83+
version: "2.14.1"
9284
built_collection:
9385
dependency: transitive
9486
description:
@@ -113,14 +105,6 @@ packages:
113105
url: "https://pub.dev"
114106
source: hosted
115107
version: "2.0.4"
116-
code_builder:
117-
dependency: transitive
118-
description:
119-
name: code_builder
120-
sha256: "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d"
121-
url: "https://pub.dev"
122-
source: hosted
123-
version: "4.11.1"
124108
collection:
125109
dependency: "direct main"
126110
description:
@@ -284,14 +268,6 @@ packages:
284268
url: "https://github.com/LinwoodDev/dart_pkgs.git"
285269
source: git
286270
version: "1.0.0"
287-
matcher:
288-
dependency: transitive
289-
description:
290-
name: matcher
291-
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
292-
url: "https://pub.dev"
293-
source: hosted
294-
version: "0.12.19"
295271
meta:
296272
dependency: transitive
297273
description:
@@ -437,14 +413,6 @@ packages:
437413
url: "https://pub.dev"
438414
source: hosted
439415
version: "1.2.2"
440-
test_api:
441-
dependency: transitive
442-
description:
443-
name: test_api
444-
sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
445-
url: "https://pub.dev"
446-
source: hosted
447-
version: "0.7.11"
448416
type_plus:
449417
dependency: transitive
450418
description:

app/android/Gemfile.lock

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ GEM
88
artifactory (3.0.17)
99
atomos (0.1.3)
1010
aws-eventstream (1.4.0)
11-
aws-partitions (1.1239.0)
12-
aws-sdk-core (3.244.0)
11+
aws-partitions (1.1241.0)
12+
aws-sdk-core (3.246.0)
1313
aws-eventstream (~> 1, >= 1.3.0)
1414
aws-partitions (~> 1, >= 1.992.0)
1515
aws-sigv4 (~> 1.9)
@@ -20,7 +20,7 @@ GEM
2020
aws-sdk-kms (1.123.0)
2121
aws-sdk-core (~> 3, >= 3.244.0)
2222
aws-sigv4 (~> 1.5)
23-
aws-sdk-s3 (1.219.0)
23+
aws-sdk-s3 (1.220.0)
2424
aws-sdk-core (~> 3, >= 3.244.0)
2525
aws-sdk-kms (~> 1)
2626
aws-sigv4 (~> 1.5)
@@ -29,7 +29,7 @@ GEM
2929
babosa (1.0.4)
3030
base64 (0.2.0)
3131
benchmark (0.5.0)
32-
bigdecimal (4.1.1)
32+
bigdecimal (4.1.2)
3333
claide (1.1.0)
3434
colored (1.2)
3535
colored2 (3.1.2)
@@ -72,7 +72,7 @@ GEM
7272
faraday_middleware (1.2.1)
7373
faraday (~> 1.0)
7474
fastimage (2.4.1)
75-
fastlane (2.232.2)
75+
fastlane (2.233.0)
7676
CFPropertyList (>= 2.3, < 4.0.0)
7777
abbrev (~> 0.1.2)
7878
addressable (>= 2.8, < 3.0.0)
@@ -92,7 +92,7 @@ GEM
9292
faraday-cookie_jar (~> 0.0.6)
9393
faraday_middleware (~> 1.0)
9494
fastimage (>= 2.1.0, < 3.0.0)
95-
fastlane-sirp (>= 1.0.0)
95+
fastlane-sirp (>= 1.1.0)
9696
gh_inspector (>= 1.1.2, < 2.0.0)
9797
google-apis-androidpublisher_v3 (~> 0.3)
9898
google-apis-playcustomapp_v1 (~> 0.1)
@@ -122,10 +122,9 @@ GEM
122122
xcodeproj (>= 1.13.0, < 2.0.0)
123123
xcpretty (~> 0.4.1)
124124
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
125-
fastlane-sirp (1.0.0)
126-
sysrandom (~> 1.0)
125+
fastlane-sirp (1.1.0)
127126
gh_inspector (1.1.3)
128-
google-apis-androidpublisher_v3 (0.98.0)
127+
google-apis-androidpublisher_v3 (0.99.0)
129128
google-apis-core (>= 0.15.0, < 2.a)
130129
google-apis-core (0.18.0)
131130
addressable (~> 2.5, >= 2.5.1)
@@ -135,11 +134,11 @@ GEM
135134
mutex_m
136135
representable (~> 3.0)
137136
retriable (>= 2.0, < 4.a)
138-
google-apis-iamcredentials_v1 (0.26.0)
137+
google-apis-iamcredentials_v1 (0.27.0)
139138
google-apis-core (>= 0.15.0, < 2.a)
140139
google-apis-playcustomapp_v1 (0.17.0)
141140
google-apis-core (>= 0.15.0, < 2.a)
142-
google-apis-storage_v1 (0.61.0)
141+
google-apis-storage_v1 (0.62.0)
143142
google-apis-core (>= 0.15.0, < 2.a)
144143
google-cloud-core (1.8.0)
145144
google-cloud-env (>= 1.0, < 3.a)
@@ -169,7 +168,7 @@ GEM
169168
httpclient (2.9.0)
170169
mutex_m
171170
jmespath (1.6.2)
172-
json (2.19.3)
171+
json (2.19.4)
173172
jwt (2.10.2)
174173
base64
175174
logger (1.7.0)
@@ -207,7 +206,6 @@ GEM
207206
simctl (1.6.10)
208207
CFPropertyList
209208
naturally
210-
sysrandom (1.0.5)
211209
terminal-notifier (2.0.0)
212210
terminal-table (3.0.2)
213211
unicode-display_width (>= 1.1.1, < 3)
@@ -247,15 +245,15 @@ CHECKSUMS
247245
artifactory (3.0.17) sha256=3023d5c964c31674090d655a516f38ca75665c15084140c08b7f2841131af263
248246
atomos (0.1.3) sha256=7d43b22f2454a36bace5532d30785b06de3711399cb1c6bf932573eda536789f
249247
aws-eventstream (1.4.0) sha256=116bf85c436200d1060811e6f5d2d40c88f65448f2125bc77ffce5121e6e183b
250-
aws-partitions (1.1239.0) sha256=177ac594c71d7c720888e3fc063bbb919bc8ae1f29192c6d42d304cd0a3c6e0c
251-
aws-sdk-core (3.244.0) sha256=3e458c078b0c5bdee95bc370c3a483374b3224cf730c1f9f0faf849a5d9a18ea
248+
aws-partitions (1.1241.0) sha256=cd0efc435de2782e8bdc77ae76bdafe70f493d54398071a88dbb1e1d32026cbe
249+
aws-sdk-core (3.246.0) sha256=393864ec8948560e69fcccc2e4d256b40c7028eb98930608dd295279e3c4ddcc
252250
aws-sdk-kms (1.123.0) sha256=d405f37e82f8fa32045ca8980be266c0b45b37aaf2012afe0254321a1e811f20
253-
aws-sdk-s3 (1.219.0) sha256=6a755d7377978525758b3c29185ca6a10128ce2b07555ca37c4549de10c2f1c7
251+
aws-sdk-s3 (1.220.0) sha256=237fda5e6ac7ecdd9c848e27187bfdc370edad5c5a141aeec389fb450fa28c7c
254252
aws-sigv4 (1.12.1) sha256=6973ff95cb0fd0dc58ba26e90e9510a2219525d07620c8babeb70ef831826c00
255253
babosa (1.0.4) sha256=18dea450f595462ed7cb80595abd76b2e535db8c91b350f6c4b3d73986c5bc99
256254
base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507
257255
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
258-
bigdecimal (4.1.1) sha256=1c09efab961da45203c8316b0cdaec0ff391dfadb952dd459584b63ebf8054ca
256+
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
259257
claide (1.1.0) sha256=6d3c5c089dde904d96aa30e73306d0d4bd444b1accb9b3125ce14a3c0183f82e
260258
colored (1.2) sha256=9d82b47ac589ce7f6cab64b1f194a2009e9fd00c326a5357321f44afab2c1d2c
261259
colored2 (3.1.2) sha256=b13c2bd7eeae2cf7356a62501d398e72fde78780bd26aec6a979578293c28b4a
@@ -281,14 +279,14 @@ CHECKSUMS
281279
faraday-retry (1.0.4) sha256=dc659233777fabf96c69c2ffe56c0a5d2c102af90321a42cc6c90157bcd716aa
282280
faraday_middleware (1.2.1) sha256=d45b78c8ee864c4783fbc276f845243d4a7918a67301c052647bacabec0529e9
283281
fastimage (2.4.1) sha256=c64bebd46b6fd8943ab70c1e6e85ff728f970f2e48f92ecd249b6bc3a540ad20
284-
fastlane (2.232.2) sha256=978689f60f0fc3d54699de86ef12be4eda9f5b52217c1798965257c390d2b112
285-
fastlane-sirp (1.0.0) sha256=66478f25bcd039ec02ccf65625373fca29646fa73d655eb533c915f106c5e641
282+
fastlane (2.233.0) sha256=b07087aaf13e7a4bcb07f853d91780193262b9f048861a24aa5e0f24069b8092
283+
fastlane-sirp (1.1.0) sha256=10bc94f9682efd8e1badfb31452a76dd8981f1f3a33717c765fde6d75b54d847
286284
gh_inspector (1.1.3) sha256=04cca7171b87164e053aa43147971d3b7f500fcb58177698886b48a9fc4a1939
287-
google-apis-androidpublisher_v3 (0.98.0) sha256=094fb952419c1131c16c4dfa66e0c96e6a2fa33adbe266f614b84b22cbc8c5cb
285+
google-apis-androidpublisher_v3 (0.99.0) sha256=a0452fdd99cb7672cc95cac07429305f8aaee54c22e4875224cf675b1ab59729
288286
google-apis-core (0.18.0) sha256=96b057816feeeab448139ed5b5c78eab7fc2a9d8958f0fbc8217dedffad054ee
289-
google-apis-iamcredentials_v1 (0.26.0) sha256=3ff70a10a1d6cddf2554e95b7c5df2c26afdeaeb64100048a355194da19e48a3
287+
google-apis-iamcredentials_v1 (0.27.0) sha256=9289f29968610754ef11d98b9ec627f0153f3e2616fef839aef096de529f6d1e
290288
google-apis-playcustomapp_v1 (0.17.0) sha256=d5bc90b705f3f862bab4998086449b0abe704ee1685a84821daa90ca7fa95a78
291-
google-apis-storage_v1 (0.61.0) sha256=b330e599b58e6a01533c189525398d6dbdbaf101ffb0c60145940b57e1c982e8
289+
google-apis-storage_v1 (0.62.0) sha256=f62467c36df53287fb0252ebb4da85f9e25d7b4c5809d045c2aab1fc307760c1
292290
google-cloud-core (1.8.0) sha256=e572edcbf189cfcab16590628a516cec3f4f63454b730e59f0b36575120281cf
293291
google-cloud-env (2.1.1) sha256=cf4bb8c7d517ee1ea692baedf06e0b56ce68007549d8d5a66481aa9f97f46999
294292
google-cloud-errors (1.6.0) sha256=1da8476dd706ad04b9d32e3c4b90d07d3463b37d6407cb56d41342ea7647d0a1
@@ -298,7 +296,7 @@ CHECKSUMS
298296
http-cookie (1.0.8) sha256=b14fe0445cf24bf9ae098633e9b8d42e4c07c3c1f700672b09fbfe32ffd41aa6
299297
httpclient (2.9.0) sha256=4b645958e494b2f86c2f8a2f304c959baa273a310e77a2931ddb986d83e498c8
300298
jmespath (1.6.2) sha256=238d774a58723d6c090494c8879b5e9918c19485f7e840f2c1c7532cf84ebcb1
301-
json (2.19.3) sha256=289b0bb53052a1fa8c34ab33cc750b659ba14a5c45f3fcf4b18762dc67c78646
299+
json (2.19.4) sha256=670a7d333fb3b18ca5b29cb255eb7bef099e40d88c02c80bd42a3f30fe5239ac
302300
jwt (2.10.2) sha256=31e1ee46f7359883d5e622446969fe9c118c3da87a0b1dca765ce269c3a0c4f4
303301
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
304302
mini_magick (4.13.2) sha256=71d6258e0e8a3d04a9a0a09784d5d857b403a198a51dd4f882510435eb95ddd9
@@ -325,7 +323,6 @@ CHECKSUMS
325323
security (0.1.5) sha256=3a977a0eca7706e804c96db0dd9619e0a94969fe3aac9680fcfc2bf9b8a833b7
326324
signet (0.21.0) sha256=d617e9fbf24928280d39dcfefba9a0372d1c38187ffffd0a9283957a10a8cd5b
327325
simctl (1.6.10) sha256=b99077f4d13ad81eace9f86bf5ba4df1b0b893a4d1b368bd3ed59b5b27f9236b
328-
sysrandom (1.0.5) sha256=5ac1ac3c2ec64ef76ac91018059f541b7e8f437fbda1ccddb4f2c56a9ccf1e75
329326
terminal-notifier (2.0.0) sha256=7a0d2b2212ab9835c07f4b2e22a94cff64149dba1eed203c04835f7991078cea
330327
terminal-table (3.0.2) sha256=f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91
331328
trailblazer-option (0.1.2) sha256=20e4f12ea4e1f718c8007e7944ca21a329eee4eed9e0fa5dde6e8ad8ac4344a3

app/lib/board/game.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,24 @@ class BoardGame extends FlameGame
8787

8888
double _startZoom = 1.0;
8989
Vector2 _startPosition = Vector2.zero();
90+
bool _scaleStartedOnHand = false;
9091

9192
@override
9293
void onScaleStart(ScaleStartInfo info) {
9394
_startZoom = camera.viewfinder.zoom;
9495
_startPosition = info.eventPosition.global;
96+
_scaleStartedOnHand =
97+
_hand.isShowing && _hand.containsPoint(info.eventPosition.widget);
9598
}
9699

97100
@override
98101
void onScaleUpdate(ScaleUpdateInfo info) {
102+
if (_scaleStartedOnHand) {
103+
if (info.pointerCount == 1) {
104+
_hand.dragScroll(info.delta.global.x);
105+
}
106+
return;
107+
}
99108
final zoom = camera.viewfinder.zoom;
100109
final delta = (info.delta.global..negate()) / zoom;
101110

@@ -123,6 +132,7 @@ class BoardGame extends FlameGame
123132

124133
@override
125134
void onScaleEnd(ScaleEndInfo info) {
135+
_scaleStartedOnHand = false;
126136
settingsCubit.resetZoom(camera.viewfinder.zoom);
127137
}
128138

0 commit comments

Comments
 (0)