Jump to content

Window:Active() not working anymore?


Herobot
 Share

Recommended Posts

I've been using window:Active() to check if my game's window was active or not, to prevent the mouse from being locked in the center of the screen when alt-tabbing. Fired up leadwerks today and suddenly window:Active() is crashing my game with the message "attempt to call method 'Active' (a nil value)".

 

Has window:Active() been disabled/removed? And if so, is there another way to tell if my game has been alt-tabbed?

  • Upvote 1
Link to comment
Share on other sites

I think, you should consider adding this to the API, as Herobot's use-case is quite a good example for the usefulnes of that function. I really hate it, when I alt-tab out of a game to change some setting and I can't because my mouse keeps jumping to the center of the screen. Also, there is relly not more to it than just comparing the output of "GetActiveWindow()" from the windows-API to "window->hwnd".

  • Upvote 6
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...