-
-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Describe the project you are working on
A 2D mobile arcade game, or any other project with a UI.
Describe the problem or limitation you are having in your project
The button's text appears off-center with some fonts, which has to be worked around by adding a new Label node, which introduces some more issues (i.e. the built-in font_pressed_color won't work anymore, and will have to be implemented manually via scripts). It can also be worked around by expanding the content margins, which makes the button excessively large.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A simple Button.text_offset property would make the text more flexible, with the addition of it being useful in code (i.e. making the text shake without changing the button's position).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I've created a pull request here.
2024-08-1923-59-15-ezgif.com-mute-video.mp4
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can be worked around by adding a child Label node, but buttons are used quite often and the workaround itself introduces more problems.
Is there a reason why this should be core and not an add-on in the asset library?
I'm not sure if add-ons can modify the behavior of existing nodes, and you'd expect something as simple as customizable text position of a button to be available out of the box.