浏览代码

release the mouse from window constraints when poping up a window prompt
like, say, assertfatal, to allow clicking in the popup.

Azaezel 10 年之前
父节点
当前提交
ac515a9ab1
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Engine/source/platformSDL/sdlMsgBox.cpp

+ 4 - 0
Engine/source/platformSDL/sdlMsgBox.cpp

@@ -76,6 +76,10 @@ S32 Platform::messageBox(const UTF8 *title, const UTF8 *message, MBButtons butto
       initMsgBox_ButtonData();
 
    SDL_Window *window = WindowManager->getFirstWindow() ? SDL_GetWindowFromID( WindowManager->getFirstWindow()->getWindowId() ) : NULL;
+
+   if (window) //release the mouse from the window constaints
+      SDL_SetWindowGrab(window, SDL_FALSE);
+
    if(buttons == MBOk)
       return SDL_ShowSimpleMessageBox(0, title, message,  window );