Skip to content
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

TouchScreenButton: Fix screen capability check #69762

Conversation

akien-mga
Copy link
Member

@akien-mga akien-mga commented Dec 8, 2022

Fixes #69572.

Thanks @spatker for identifying the issue and the likely fix.

I haven't tested the change but it seems clear that the previous logic was wrong.
The code in 3.x is correct and matches what this PR restores:

if (!Engine::get_singleton()->is_editor_hint() && !OS::get_singleton()->has_touchscreen_ui_hint() && visibility == VISIBILITY_TOUCHSCREEN_ONLY)

@akien-mga akien-mga added this to the 4.0 milestone Dec 8, 2022
@akien-mga akien-mga requested a review from a team as a code owner December 8, 2022 13:30
@spatker
Copy link

spatker commented Dec 8, 2022

Thanks for making this pull request! I have tried the same change locally, and it does fix the visibility issue, but the button is still not interactive in the emulator, just as before this fix. So that maybe a different issue.

@akien-mga akien-mga merged commit f692b47 into godotengine:master Dec 8, 2022
@akien-mga akien-mga deleted the fix-TouchScreenButton-screen-capability-check branch December 8, 2022 15:06
@akien-mga
Copy link
Member Author

@spatker Yeah this would only impact visibility, for actual input processing it might be a different issue. I'd suggest opening a new issue about that with a simple reproduction project for testing.

@spatker
Copy link

spatker commented Dec 8, 2022

Seems like the input issue can be fixed by 67126ff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TouchScreenButton not visible on Android when visibility is set to VISIBILITY_TOUCHSCREEN_ONLY
2 participants