SFML community forums

Help => Window => Topic started by: Mr_Bunkers on November 14, 2012, 03:37:08 pm

Title: Way to check for window focus?
Post by: Mr_Bunkers on November 14, 2012, 03:37:08 pm
I currently use the sf::Keyboard::isKeyPressed() function to check for input, because if I use window events, I can't handle multiple key presses.

However, using this makes it so input is recognized, even if I don't have window focus. Is there a way to check if my window has focus?
Title: Re: Way to check for window focus?
Post by: eXpl0it3r on November 14, 2012, 03:57:56 pm
By using the forum's search function? ::)

Check for the LostFocus and GainFocus event. (See tutorial & docu for more info.)