Jump to content

[LE2] Checking For Window Focus


gamecreator
 Share

Recommended Posts

Simple question: how do you check to see if the Leadwerks window is in focus?

 

I ask because I use the example code for mouse look in an FPS, which involves the following code:

MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2);

If you Alt-Tab away, that line of code remains active and continues to lock the mouse. I'd like to turn that line of code off if the application is not in focus. (I use int main(), if it matters.) Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...