LWJGL Forum
Programming => Lightweight Java Gaming Library => Topic started by: Maykin53 on June 30, 2014, 11:30:04
-
Hi everyone.
Is there a way we can;
1. Bring the Display window to the front programically? I'd like to do this because I have a button that lets users log in with their Google account using OAuth, which opens a tab in the browser - once a user logs in Google's login page then redirects to a local port - my game is listening on that port. I want the game to then bring itself back into focus.
2. Reposition the Display window programically? I'd like to do this as I have added a 'fullscreen' toggle. When a user resizes and repositions the Display window manually, and then clicks 'fullscreen' and then clicks back to 'windowed' I want to be able to set the Display back to the same position and size it was before it went to fullscreen.
Thanks for your help.
-
Read the Display API, there are methods to set the position. But I cant remember if there were any methods for changing the window focus.
-
if you use swing, you can use the swing api. position, minimize, maximize, scale and focus (bring-to-front, bring-to-back). without swing you have position, size and fullscreen-yes-no, no focus i think.