I wrote a Button class, which contains its outer form — rectangle (RectangleShape)— and text (sf::Text) inside it. I've faced with problem with managing text position and size inside the rect. I want the text to be centered inside the rect, and as long as there is possibility for moving and resizing a button, it turns complicated to find out how to move and resize text along with the button.
What can you offer? I suppose there are lots of games which use GUI, so there are checked solutions.