Ticket #539: Update.2.patch
File Update.2.patch, 2.6 KB (added by , 10 years ago) |
---|
-
binaries/data/mods/public/gui/session/input.js
80 80 } 81 81 } 82 82 83 if (!cursorSet )83 if (!cursorSet || Engine.LastGuiPageIsMessageBox()) 84 84 Engine.SetCursor("arrow-default"); 85 85 if (!tooltipSet) 86 86 informationTooltip.hidden = true; -
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 return true; 73 return false; 74 } 75 69 76 bool CGUIManager::HasPages() 70 77 { 71 78 return !m_PageStack.empty(); -
source/gui/GUIManager.h
58 58 shared_ptr<ScriptRuntime> GetRuntime() { return m_ScriptRuntime; } 59 59 shared_ptr<CGUI> GetActiveGUI() { return top(); } 60 60 61 /** 62 * Determine if the last page is a messagebox 63 */ 64 bool LastPageIsMessageBox(); 65 61 66 /** 62 67 * Returns whether there are any current pages. 63 68 */ -
source/gui/scripting/ScriptFunctions.cpp
97 97 g_GUI->PushPage(name, pCxPrivate->pScriptInterface->WriteStructuredClone(initData)); 98 98 } 99 99 100 bool LastGuiPageIsMessageBox(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)) 101 { 102 return g_GUI->LastPageIsMessageBox(); 103 } 104 100 105 void SwitchGuiPage(ScriptInterface::CxPrivate* pCxPrivate, std::wstring name, CScriptVal initData1) 101 106 { 102 107 JSContext* cx = pCxPrivate->pScriptInterface->GetContext(); … … 922 927 scriptInterface.RegisterFunction<CScriptVal, std::wstring, &JSI_VFS::ReadFile>("ReadFile"); 923 928 scriptInterface.RegisterFunction<CScriptVal, std::wstring, &JSI_VFS::ReadFileLines>("ReadFileLines"); 924 929 // GUI manager functions: 930 scriptInterface.RegisterFunction<bool, &LastGuiPageIsMessageBox>("LastGuiPageIsMessageBox"); 925 931 scriptInterface.RegisterFunction<void, std::wstring, CScriptVal, &PushGuiPage>("PushGuiPage"); 926 932 scriptInterface.RegisterFunction<void, std::wstring, CScriptVal, &SwitchGuiPage>("SwitchGuiPage"); 927 933 scriptInterface.RegisterFunction<void, &PopGuiPage>("PopGuiPage");