Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add wordwrap feature in Button Widget - Fixes #488 #490

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

neilsimp1
Copy link
Contributor

This is an initial commit which copies some code from the Label widget into Button.
This works in my use cases but could of course use more testing. There's also some code duplicated that might be better put in the Widget base class.

If you are interested in accepting this sort of change, I'd be happy to refactor the code to remove the duplication, or anything else you'd suggest.


Example from the project I'm using this in...
In Code:
image
image

In game, here is the button in it's default state.
image

When an item is selected, sometimes the text is too wide for the button, so this allows the text to flow to the next line:
image

Happy holidays!

This is an initial commit which copies some code from the Label widget
into Button.
This works in my use cases but could of course use more testing.
There's also some code duplicated that might be better put in the Widget
base class.
@neilsimp1 neilsimp1 mentioned this pull request Dec 17, 2024
@neilsimp1 neilsimp1 changed the title Add wordwrap feature in Button Widget Add wordwrap feature in Button Widget - Fixes #488 Dec 17, 2024
@ppizarror ppizarror merged commit 064ec51 into ppizarror:master Dec 20, 2024
10 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants