Currently, the text on buttons doesn't word wrap. If I want to wordwrap text on a button, I have to use a text label and place it on top of the button. Normally, no big deal. But this can be a bit annoying when I want to add a lot of buttons like this:
(https://www.wadjeteyegames.com/temp/buttonwrap.png)
For each of those buttons, I had to create individual text labels and place them on top of each button. Very time consuming and a bit of a faff to keep track of which label is on top of which button. If the text on the button could word-wrap, that would save a lot of time and effort.
Thanks!
-Dave
I suppose this could be done.
I'd probably add a gui control flag which tells whether wrap text or not for backwards compatibility, and in case someone wants strictly non-wrapped text (e.g. if they worry that it gets unexpectedly wrapped after translation).
I created an issue just to track this here: https://github.com/adventuregamestudio/ags/issues/2546
Ooh thank you!
Well, I sort of made it:
https://github.com/adventuregamestudio/ags/pull/2547
but this needs more testing.
Here's a test build (based on 3.6.2 Beta release):
https://cirrus-ci.com/task/6557944643321856
Added following:
- Labels have full TextAlignment selection (includes vertical alignment)
- Buttons have WrapText property
- Buttons have TextHorizontalPadding and TextVerticalPadding properties.
Which kind of naming seems better:
- TextHorizontalPadding, TextVerticalPadding
or
- TextPaddingHorizontal, TextPaddingVertical
?
Quote from: Crimson Wizard on Thu 10/10/2024 15:39:35Which kind of naming seems better:
- TextHorizontalPadding, TextVerticalPadding
or
- TextPaddingHorizontal, TextPaddingVertical
?
I'd prefer the second version, since that would make both properties show up together in the list if this is called from the script API.