Skip to content

Fix TextScaledButtonWidget rendering on >=1.21.11#322

Open
soradotwav wants to merge 1 commit intoisXander:mainfrom
soradotwav:fix/TextScaledButtonWidget-scaling-fix
Open

Fix TextScaledButtonWidget rendering on >=1.21.11#322
soradotwav wants to merge 1 commit intoisXander:mainfrom
soradotwav:fix/TextScaledButtonWidget-scaling-fix

Conversation

@soradotwav
Copy link
Copy Markdown

I replaced the placeholder renderDefaultLabel override with a proper renderContents implementation. It now actually calculates the correct translation to keep the text centered while scaled, so we don't have to settle for tiny buttons anymore.

Also cleaned up some unused imports and updated the matrix math to work with the new GuiGraphics setup.

@isXander
Copy link
Copy Markdown
Owner

The reason I did not do this is because I wanted to continue to use the vanilla ActiveTextCollector rather than falling back to GuiGraphicsExtractor. Thank you for bringing this back to attention I will try and research how to do it properly.

If not, I'll merge this, given you fix the merge conflicts.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants