Skip to content

internal/input: add a workaround fix for touch controls on mobiles#101

Merged
mcarpenter622 merged 1 commit intoebitenui:masterfrom
quasilyte:quasilyte/mobile_touch_fix
Mar 19, 2024
Merged

internal/input: add a workaround fix for touch controls on mobiles#101
mcarpenter622 merged 1 commit intoebitenui:masterfrom
quasilyte:quasilyte/mobile_touch_fix

Conversation

@quasilyte
Copy link
Copy Markdown
Contributor

Keep the last touch pos on mobile devices as opposed to resetting them to (0, 0) (since ebiten.CursorPos returns zeroes for mobiles).

This fix would not be needed if events were handled in Update() tree instead of Draw() tree. For now, this is the easiest fix.

Refs #100

Keep the last touch pos on mobile devices as opposed to resetting them
to `(0, 0)` (since `ebiten.CursorPos` returns zeroes for mobiles).

This fix would not be needed if events were handled in `Update()` tree
instead of `Draw()` tree. For now, this is the easiest fix.

Refs ebitenui#100
@mcarpenter622
Copy link
Copy Markdown
Collaborator

So this looks like it should be fine, I think I wanna test it a bit more and maybe make a few cleanup changes (your todos). I can merge this now if you need it for you game @quasilyte but I'd prefer to play with it a little more.

@quasilyte
Copy link
Copy Markdown
Contributor Author

Let's play with it longer then!

@mcarpenter622 mcarpenter622 merged commit 5e0cfd5 into ebitenui:master Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants