Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ui::Button doesn't get the title renderer's font size with BMFont #145

Open
tankorsmash opened this issue Feb 21, 2018 · 0 comments
Open

Comments

@tankorsmash
Copy link
Contributor

tankorsmash commented Feb 21, 2018

If you've got a Button in Creator with its BMFont Label's size set to 24, then import it into your project, then call button->setTitleText, the title renderer will get resized to 10, since that's the initial font size value when a Button is constructed.

A potential solution is in reader/CreatorReader.cpp#397, you could use label->getRenderingFontSize() to set the button->setTitleFontSize() but that's a protected method. Even setting the fontsize there directly via label->getBMFontSize messes with the rendering and appears to end up with a system font instead. Not sure how to solve this.

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

No branches or pull requests

1 participant