SFML community forums
Help => Window => Topic started by: Soul on May 03, 2014, 04:13:10 pm
-
Hey, i have a problem with renderwindow and events, when my mouse is outside window, this window capture mouse position and keyboard events, how can i disable that functions?
-
You can't disable it, but since you have access to mouse position, window position and window size, it's fairly easy to filter out these events on your own if you don't want to process them.
-
If you really use events, you shouldn't receive them if the window doesn't have the focus (which is different from "mouse outside the window").
-
u use sf::Keyboard, hmm so i must code a simple function to make the solution, thanks for help :)
-
Ok, so you're not really using events ;) Be careful when you describe your problem.
Two simple solutions:
- use events instead (sf::Event::KeyPressed)
- grab the latest revision and use the new hasFocus() function (I think it's still in a separate branch)