Herobot Posted January 30, 2017 Share Posted January 30, 2017 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? 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted January 31, 2017 Share Posted January 31, 2017 This is not in the API, so it looks like it was never official: http://www.leadwerks.com/werkspace/page/api-reference/_/window/ Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Ma-Shell Posted February 1, 2017 Share Posted February 1, 2017 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". 6 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted February 1, 2017 Share Posted February 1, 2017 I agree that this should finally be made an official function. Leadwerks needs to support users alt-tabbing. I even started a thread about this once and was directed to the unofficial solution. 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.