Hey, I have this that makes my buttons:
contentT=sf::Text(content,*game->getGuiFont());
contentT.setColor(sf::Color::Black);
contentT.setCharacterSize(18);
contentT.setPosition(xPos-content.length()/(2*contentT.getCharacterSize()), yPos-2);
sprLeft=*game->getSpriteManager()->getSprite(3);
sprLeft.setPosition(xPos-57,yPos);
//sprLeft.setPosition(xPos-(content.length()/2)*(contentT.getCharacterSize()/(content.length()/2)),yPos);
sprRight=*game->getSpriteManager()->getSprite(4);
//sprRight.setPosition(xPos+(content.length()*content.length()*1.9),yPos);
sprRight.setPosition(xPos+177,yPos);
what the matter here is, is that the sprLeft and sprRight are not aligned to equal positions on x when buttons are different in text lenght.
So for example
button with content "New Game" would be different sized than a button with content "Options", how could I make the buttons be equally sized/aligned no matter what the content lenght is?