1
Graphics / Re: Some Text is Blurry
« on: November 04, 2017, 09:20:56 pm »
I calculated the positions and put them into separate integers and that fixed the problem, thanks!
For anyone else who has trouble here's the new code.
I'm assuming there's some sort of issue with data loss with converting inside vs outside the setPosition command. Just my guess I've never looked too far into that stuff.
For anyone else who has trouble here's the new code.
sf::Text newText ("New Map",font,20);
sf::Text loadText("Load Map", font, 20);
int x1 = (INPUT_W / 2) - newText.getLocalBounds().width / 2;
int y1 = (INPUT_H / 3 * 1) - newText.getLocalBounds().height / 2;
int x2 = (INPUT_W / 2) - loadText.getLocalBounds().width / 2;
int y2 = (INPUT_H / 3 * 2) - loadText.getLocalBounds().height / 2;
newText.setPosition(x1,y1);
newText.setFillColor(sf::Color::Black);
loadText.setPosition(x2,y2);
loadText.setFillColor(sf::Color::Black);
sf::Text loadText("Load Map", font, 20);
int x1 = (INPUT_W / 2) - newText.getLocalBounds().width / 2;
int y1 = (INPUT_H / 3 * 1) - newText.getLocalBounds().height / 2;
int x2 = (INPUT_W / 2) - loadText.getLocalBounds().width / 2;
int y2 = (INPUT_H / 3 * 2) - loadText.getLocalBounds().height / 2;
newText.setPosition(x1,y1);
newText.setFillColor(sf::Color::Black);
loadText.setPosition(x2,y2);
loadText.setFillColor(sf::Color::Black);
I'm assuming there's some sort of issue with data loss with converting inside vs outside the setPosition command. Just my guess I've never looked too far into that stuff.