v0.7 alphav2 - text position on a button

Started by starkhorn, 02 October 2015, 02:08:47

starkhorn

Is it possible to set the position of the text on a button? I have the text size small and I wanted it to be in the top left corner of the button.

texus

No, this is not possible with just a Button.

You would have to use a button without text and use a Label which you position like this:
Code (cpp) Select
label->setPosition(tgui::bindPosition(button));

or if you want to fine-tune the distance to the top left corner a bit more:
Code (cpp) Select
label->setPosition(tgui::bindPosition(button) + sf::Vector(4, 2));

starkhorn