SFML community forums
Help => Window => Topic started by: Arjan B on June 12, 2010, 11:48:41 am
-
I am making a puzzle game in which you drag stones with your mouse.
After letting several users test-play the game, I've noticed they all have this urge to click a stone, just sweep the mouse in the direction they want it to move and then release the button.
While doing this, very often the mouse moves outside of the window and the button is released there. This gets to the point where it ruins the gameplay and players get agitated.
When I googled on this problem I came upon this thread:
http://www.sfml-dev.org/forum/viewtopic.php?t=2597&sid=4b204b044470280bf28e8856ae1b34e5
Is there really no way I could check for the mouse to leave the window? Or does anyone have a different solution to my problem?
Thank you in advance,
Arjan
-
So, do you want to detect mouse leaving the window, or button released outside the window?
-
Any one of those would do ^^.
-
This is something that I'll probably think about for SFML 2.
-
This is something that I'll probably think about for SFML 2.
That's nice ^^.
For now, I'll make the game deselect a block as soon as it collides with the puzzle's border (not really fair, because they might accidentally hit the border when not wanting to place the block near it, but it's a fix for now).
Thank you for your help!
-
You could do basically what you said in your last post :) lol
You could lock the mouse inside the window - this can be a little disconcerting when you don't expect it though, but if you have a menu or something on Esc button then you could just release it then.
Make your game fullscreen?
-
Well, this game would mostly be played while doing something else at the same time. Like when you're chatting but in between conversation you play some puzzles.
So only allowing full-screen or locking the mouse to the window would annoy players a lot, I think ^^.