Add a DisplayServer method that provides info about rounded display corners #11327
Absotively
started this conversation in
Platforms
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the project you are working on
A solitaire card game for Android
Describe the problem or limitation you are having in your project
I am displaying the score in one corner of the display and a timer in another corner. On a display with rounded corners these are clipped by the rounded corners. I would like to shift these horizontally only on displays with rounded corners, and only enough to prevent clipping. Without information about the current display's corners, I can't do this.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A DisplayServer method that provides info about rounded display corners would let me adjust my game's layout to prevent clipping by rounded corners.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
(This is influenced by having just skimmed relevant Android documentation, I am not in any way attached to this specific design.)
If this enhancement will not be used often, can it be worked around with a few lines of script?
No. I've been unable to find any way to access information about rounded display corners from script.
Is there a reason why this should be core and not an add-on in the asset library?
DisplayServer.get_display_cutouts()
exists, so presumably DisplayServer is the proper place for detail about the display shape.Other
Beta Was this translation helpful? Give feedback.
All reactions