i just want keep the ratio of my window
if (event.Type == sf::Event::Resized)
{
x = window.GetWidth();
y = window.GetHeight();
if(window.GetHeight() >= window.GetWidth()) window.SetSize(x, (static_cast<unsigned int>(x*0.69)));
else window.SetSize(static_cast<unsigned int>(y*1.45), y);
}
it s the only event i have in my boucle (exept sf::Event::Closed), and when i try to resize my window, it dont work on the right border, it move my window on the left border (and keep the size), and it work about 1 time on 10 with the top and bottom border
very strange ...
i use this code in the boucle for event :
sf::Event event;
while (window.PollEvent(event))
{
is it a sfml2 bug ? or it s the same with 1.6 ?
or perhaps my function is a garbage -_-
thank you