Changeset View
Changeset View
Standalone View
Standalone View
source/gui/GUIManager.cpp
Show First 20 Lines • Show All 402 Lines • ▼ Show 20 Lines | void CGUIManager::UpdateResolution() | ||||
for (const SGUIPage& p : pageStack) | for (const SGUIPage& p : pageStack) | ||||
{ | { | ||||
p.gui->UpdateResolution(); | p.gui->UpdateResolution(); | ||||
p.gui->SendEventToAll(EVENT_NAME_WINDOW_RESIZED); | p.gui->SendEventToAll(EVENT_NAME_WINDOW_RESIZED); | ||||
} | } | ||||
} | } | ||||
bool CGUIManager::TemplateExists(const std::string& templateName) const | |||||
{ | |||||
return m_TemplateLoader.TemplateExists(templateName); | |||||
} | |||||
const CParamNode& CGUIManager::GetTemplate(const std::string& templateName) | |||||
{ | |||||
const CParamNode& templateRoot = m_TemplateLoader.GetTemplateFileData(templateName).GetChild("Entity"); | |||||
if (!templateRoot.IsOk()) | |||||
LOGERROR("Invalid template found for '%s'", templateName.c_str()); | |||||
return templateRoot; | |||||
} | |||||
void CGUIManager::DisplayLoadProgress(int percent, const wchar_t* pending_task) | void CGUIManager::DisplayLoadProgress(int percent, const wchar_t* pending_task) | ||||
{ | { | ||||
const ScriptInterface& scriptInterface = *(GetActiveGUI()->GetScriptInterface()); | const ScriptInterface& scriptInterface = *(GetActiveGUI()->GetScriptInterface()); | ||||
ScriptRequest rq(scriptInterface); | ScriptRequest rq(scriptInterface); | ||||
JS::RootedValueVector paramData(rq.cx); | JS::RootedValueVector paramData(rq.cx); | ||||
ignore_result(paramData.append(JS::NumberValue(percent))); | ignore_result(paramData.append(JS::NumberValue(percent))); | ||||
Show All 16 Lines |
Wildfire Games · Phabricator