Skip to content

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

Open
@tankorsmash

Description

@tankorsmash

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions