Ticket #539: Update.patch
File Update.patch, 2.6 KB (added by , 10 years ago) |
---|
-
binaries/data/mods/public/gui/session/input.js
79 79 } 80 80 } 81 81 } 82 83 if (!cursorSet)82 if (!cursorSet || lastGuiPageIsMessageBox()) 83 { 84 84 Engine.SetCursor("arrow-default"); 85 } 85 86 if (!tooltipSet) 86 87 informationTooltip.hidden = true; 87 88 -
source/gui/GUIManager.cpp
66 66 UnregisterFileReloadFunc(ReloadChangedFileCB, this); 67 67 } 68 68 69 bool CGUIManager::LastPageIsMessageBox() 70 { 71 if (m_PageStack.back().name == L"page_msgbox.xml") 72 { 73 return true; 74 } 75 return false; 76 } 69 77 bool CGUIManager::HasPages() 70 78 { 71 79 return !m_PageStack.empty(); -
source/gui/GUIManager.h
64 64 bool HasPages(); 65 65 66 66 /** 67 * Determine if the last page is a messagebox 68 */ 69 bool LastPageIsMessageBox(); 70 71 /** 67 72 * Load a new GUI page and make it active. All current pages will be destroyed. 68 73 */ 69 74 void SwitchPage(const CStrW& name, ScriptInterface* srcScriptInterface, JS::HandleValue initData); -
source/gui/scripting/ScriptFunctions.cpp
111 111 { 112 112 g_GUI->PopPage(); 113 113 } 114 114 bool LastGuiPageIsMessageBox(void* UNUSED(cbdata)) 115 { 116 return g_GUI->LastPageIsMessageBox(); 117 } 115 118 // Note that the args argument may only contain clonable data. 116 119 // Functions aren't supported for example! 117 120 // TODO: Use LOGERROR to print a friendly error message when the requirements aren't met instead of failing with debug_warn when cloning. … … 925 928 scriptInterface.RegisterFunction<void, std::wstring, CScriptVal, &PushGuiPage>("PushGuiPage"); 926 929 scriptInterface.RegisterFunction<void, std::wstring, CScriptVal, &SwitchGuiPage>("SwitchGuiPage"); 927 930 scriptInterface.RegisterFunction<void, &PopGuiPage>("PopGuiPage"); 931 scriptInterface.RegisterFunction<bool, &LastGuiPageIsMessageBox>("LastGuiPageIsMessageBox"); 928 932 scriptInterface.RegisterFunction<void, CScriptVal, &PopGuiPageCB>("PopGuiPageCB"); 929 933 scriptInterface.RegisterFunction<CScriptVal, CStr, &GetGUIObjectByName>("GetGUIObjectByName"); 930 934