[Orxonox-commit 4191] r8862 - in code/trunk: data/gui/scripts src/libraries/core
landauf at orxonox.net
landauf at orxonox.net
Tue Aug 23 15:05:58 CEST 2011
Author: landauf
Date: 2011-08-23 15:05:58 +0200 (Tue, 23 Aug 2011)
New Revision: 8862
Modified:
code/trunk/data/gui/scripts/GUISheet.lua
code/trunk/src/libraries/core/GUIManager.cc
code/trunk/src/libraries/core/GUIManager.h
Log:
added config value to enable/disable preloading of menu sheets during startup (fast menus vs fast startup)
Modified: code/trunk/data/gui/scripts/GUISheet.lua
===================================================================
--- code/trunk/data/gui/scripts/GUISheet.lua 2011-08-23 12:30:23 UTC (rev 8861)
+++ code/trunk/data/gui/scripts/GUISheet.lua 2011-08-23 13:05:58 UTC (rev 8862)
@@ -75,7 +75,7 @@
self:onLoad()
-- Also load additional sheets to avoid display lags
- if self.loadAlong then
+ if self.loadAlong and orxonox.GUIManager:preloadMenuSheets() then
for k, sheet in pairs(self.loadAlong) do
loadSheet(sheet)
end
Modified: code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- code/trunk/src/libraries/core/GUIManager.cc 2011-08-23 12:30:23 UTC (rev 8861)
+++ code/trunk/src/libraries/core/GUIManager.cc 2011-08-23 13:05:58 UTC (rev 8862)
@@ -370,6 +370,8 @@
{
SetConfigValue(guiScheme_, GUIManager::defaultScheme_).description("Changes the current GUI scheme.").callback(this, &GUIManager::changedGUIScheme);
SetConfigValue(numScrollLines_, 1).description("How many lines to scroll in a list if the scroll wheel is used");
+ SetConfigValue(bPreloadMenuSheets_, false).description("Pre-load menu sheets during startup");
+
SetConfigValueExternal(outputLevelCeguiLog_, BaseWriter::getConfigurableSectionName(), "outputLevelCeguiLog", CEGUI::Standard).description("The log level of the CEGUI log file").callback(this, &GUIManager::changedCeguiOutputLevel);
}
Modified: code/trunk/src/libraries/core/GUIManager.h
===================================================================
--- code/trunk/src/libraries/core/GUIManager.h 2011-08-23 12:30:23 UTC (rev 8861)
+++ code/trunk/src/libraries/core/GUIManager.h 2011-08-23 13:05:58 UTC (rev 8862)
@@ -110,6 +110,7 @@
void setBackgroundImage(const std::string& imageSet, const std::string imageName); // tolua_export
void setBackgroundImage(const std::string& image);
+ static bool preloadMenuSheets() { return GUIManager::getInstance().bPreloadMenuSheets_; } // tolua_export
static bool inDevMode(void); // tolua_export
//! Creates a new InputState to be used with a GUI Sheet
@@ -199,7 +200,8 @@
std::string guiScheme_;
bool oldCEGUI_;
- int numScrollLines_; ///< How many lines to scroll in a list if the scroll wheel is used
+ int numScrollLines_; ///< How many lines to scroll in a list if the scroll wheel is used
+ bool bPreloadMenuSheets_; ///< If true, menu sheets are pre-loaded during startup
}; // tolua_export
} // tolua_export
More information about the Orxonox-commit
mailing list