gamecreator Posted March 10, 2013 Share Posted March 10, 2013 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. Quote Link to comment Share on other sites More sharing options...
Mumbles Posted March 10, 2013 Share Posted March 10, 2013 The command I remember is AppSuspended() returns 1 if the window is inactive (you have Alt-Tabbed away), 0 if the window is active 1 Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
gamecreator Posted March 10, 2013 Author Share Posted March 10, 2013 Ah yes; I've seen that before but forgot about it. (Was also looking for it under the Application section, not Timing.) Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.