Add Graphics#restore_window
Requested by matias1lol.
This commit is contained in:
parent
7b9d436ede
commit
df9494e60c
4 changed files with 27 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ enum
|
|||
REQUEST_SETFULLSCREEN = 0,
|
||||
REQUEST_WINRESIZE,
|
||||
REQUEST_WINMAXIMIZE,
|
||||
REQUEST_WINRESTORE,
|
||||
REQUEST_MESSAGEBOX,
|
||||
REQUEST_SETCURSORVISIBLE,
|
||||
|
||||
|
|
@ -464,6 +465,10 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
SDL_MaximizeWindow(win);
|
||||
break;
|
||||
|
||||
case REQUEST_WINRESTORE :
|
||||
SDL_RestoreWindow(win);
|
||||
break;
|
||||
|
||||
case UPDATE_FPS :
|
||||
if (rtData.config.printFPS)
|
||||
Debug() << "FPS:" << event.user.code;
|
||||
|
|
@ -634,6 +639,13 @@ void EventThread::requestWindowMaximize()
|
|||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
void EventThread::requestWindowRestore()
|
||||
{
|
||||
SDL_Event event;
|
||||
event.type = usrIdStart + REQUEST_WINRESTORE;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
void EventThread::requestShowCursor(bool mode)
|
||||
{
|
||||
SDL_Event event;
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ public:
|
|||
void requestFullscreenMode(bool mode);
|
||||
void requestWindowResize(int width, int height, bool recenter = false);
|
||||
void requestWindowMaximize();
|
||||
void requestWindowRestore();
|
||||
void requestShowCursor(bool mode);
|
||||
|
||||
void requestTerminate();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue