1
Thank you so much!! It turned out that I was defining the rectangle, then setting the position when I didn't need to set the position. Thanks!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
while(drag){
while(StartWindow.GetEvent(Event)){
sf::Vector2f coords = StartWindow.ConvertCoords(StartWindow.GetInput().GetMouseX(),StartWindow.GetInput().GetMouseY());
x2 = coords.x;
y2 = coords.y;
rectangle = sf::Shape::Rectangle(x,y,x2,y2,sf::Color::Blue,1,sf::Color::Red);
StartWindow.SetView(StartWindow.GetDefaultView());
rectangle.SetPosition(x,y);
StartWindow.Draw(rectangle);
}