Use sf::Vector2<T> conversion constructor

This commit is contained in:
Chris Thrasher 2023-12-05 15:17:31 -07:00
parent ffe9cc0671
commit 3d4ea00135

View File

@ -49,10 +49,7 @@ struct SFMLmainWindow
sprite.setOrigin(sprite.getLocalBounds().getCenter()); sprite.setOrigin(sprite.getLocalBounds().getCenter());
sprite.scale({0.3f, 0.3f}); sprite.scale({0.3f, 0.3f});
sprite.setPosition(sf::Vector2f(renderWindow.getSize()) / 2.f);
unsigned int ww = renderWindow.getSize().x;
unsigned int wh = renderWindow.getSize().y;
sprite.setPosition(sf::Vector2f(ww, wh) / 2.f);
if (!font.loadFromFile(resPath / "tuffy.ttf")) if (!font.loadFromFile(resPath / "tuffy.ttf"))
NSLog(@"Couldn't load the font"); NSLog(@"Couldn't load the font");