Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Topics - Amber Crawford

Pages: [1]
1
General / Trouble with window resizing
« on: September 09, 2021, 09:11:46 am »
I've started playing with sfml to learn c++ but I just had a problem with my code. atm I'm just trying to get a pink square to follow the mouse, but when I resize the window (just by dragging the edge of it) the square gets messed up with positions by moving the square more than I do with my mouse (but only in the opposite direction of where I enlarged, for example: if I enlarge the window upwards then it will be all messed up in the down direction but everything horizontal will just be fine). Along with this if I fullscreen it with f11 or the button at the top of the window the square just dissapears. pastebin for game.cpp: https://pastebin.com/7kDejF2e main.cpp runs update() and render()

Pages: [1]