|
Maximizing the display in code? |
jmasterx
Member #11,410
October 2009
|
I have run into a small issue. When the user goes from full screen back to windowed or starts the game, I want to set it back to how they had it previously. I can set the window position, and size, but I see no way to change it to a maximized state. The best I can do is set it to a comfortable window size. Is there a way to do this in code or plans to add this in the future? Thanks Agui GUI API -> https://github.com/jmasterx/Agui |
Elias
Member #358
May 2000
|
I'm all for a way to do this. I can probably implement it for X11. My favorite API would be al_set_display_flag(display, ALLEGRO_MAXIMIZED, true/false) to maximize/un-maximize the window and (al_get_display_flags(display) & ALLEGRO_MAXIMIZED) to check whether it is currently maximized. -- |
jmasterx
Member #11,410
October 2009
|
On Windows: SendMessage(hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); SendMessage(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
for isMaximized: It could also be added as a new display flag since it looks cleaner if the window is first shown with the correct state. On OSX the concept does not seem to exist, best is the zoom button thing: Agui GUI API -> https://github.com/jmasterx/Agui |
Trent Gamblin
Member #261
April 2000
|
Is the zooming thing the same as the new fullscreening ability in Lion? Where windows that support it have a fullscreen button on the right side of the title bar? When you use that the menubar autohides at the top.
|
|