-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add block area to prevent accidental touch on edge #350
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tidied up some stuff in the code and added a timeout for the "Changes Saved!" text so that it will not stay like that throughout the whole lifecycle, but there remain a few behaviors that must be addressed.
The core logic of the block area now works as intended in custom playfield sizes. However, after more intensive testing, I think the UI of the block area manager can still use a bunch of work. There are weird irks that may hinder UX:
Despite the above, I received an information from @Reco1I that he may try to make a native Android UI for this rather than using a WebView, but I would like to confirm with you if you are okay with it. Additionally, here is a video demonstrating the issues: 2024-05-09.20-43-59.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My man concern about this is that usign HTML and a WebView doesn't look like a good choice, infact you can do the same with Android native framework and it will be more compatible since contents/dimensions inside the WebView does not respect the app theme.
See https://developer.android.com/guide/topics/resources/style-resource
As Rian says I would offer myself to contribute. |
the current implementation does enforce a minimum dimension of 5px for both width and height. This can be observed in the video at the 00:26 mark, as detailed osu-droid/assets/html/blockAreaSetting.html Lines 317 to 320 in 86afc14
An issue occurs that re-entering the configuration page was causing the loading animation to persist indefinitely.
I would be glad to have a contributor take part in this feature. Should @Reco1I decide to proceed with creating a native Android UI rather than using a WebView, I will hold off on making further commits to this PR. If any assistance is needed, please do not hesitate to reach out—I am willing to help in any way I can. |
Aha. It was noticeable that the red squares don't perfectly align when the block area was made as small as possible, although I'm not sure if it's enough to not confuse the user on which corner was pressed. The CSS does have a Nonetheless, there's no need to work on the current UI for now. The core logic can be reused by the Android native UI if it's made. |
As an update, @Reco1I will attempt to implement this in a superseding PR. Until that PR is opened, this PR can remain open. |
Description
Add an anti-accidental touch feature, which allow user to select some area on screen that the touch inside will not be a valid input event for game.
Justification
As screen-to-body ratio grows in decent mobile devices, accidental touch has been a problem for many play styles. During play, accidental touch causes unexpected drop as your palm or finger touch screen edge.