[Orxonox-commit 1541] r6259 - in code/branches/presentation2: data/gui/scripts src/libraries/core

scheusso at orxonox.net scheusso at orxonox.net
Sun Dec 6 20:16:04 CET 2009


Author: scheusso
Date: 2009-12-06 20:16:04 +0100 (Sun, 06 Dec 2009)
New Revision: 6259

Modified:
   code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua
   code/branches/presentation2/src/libraries/core/CMakeLists.txt
   code/branches/presentation2/src/libraries/core/PathConfig.h
Log:
menu automatically reads ogre config path


Modified: code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua
===================================================================
--- code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua	2009-12-06 19:06:14 UTC (rev 6258)
+++ code/branches/presentation2/data/gui/scripts/GraphicsMenu.lua	2009-12-06 19:16:04 UTC (rev 6259)
@@ -12,7 +12,8 @@
 P.layoutString = "GraphicsMenu.layout"
 
 function P:init()
-    file = "C:\\Games\\Orxonox\\menu\\build\\config\\Debug\\" .. orxonox.getConfig("GraphicsManager", "ogreConfigFile_")
+    file = orxonox.PathConfig:getConfigPathString() .. orxonox.getConfig("GraphicsManager", "ogreConfigFile_")
+    --file = "C:\\Games\\Orxonox\\menu\\build\\config\\Debug\\" .. orxonox.getConfig("GraphicsManager", "ogreConfigFile_")
     search_mode = 0
     f = io.open(file, "r")
     firstline = f:read("*line")

Modified: code/branches/presentation2/src/libraries/core/CMakeLists.txt
===================================================================
--- code/branches/presentation2/src/libraries/core/CMakeLists.txt	2009-12-06 19:06:14 UTC (rev 6258)
+++ code/branches/presentation2/src/libraries/core/CMakeLists.txt	2009-12-06 19:16:04 UTC (rev 6259)
@@ -89,6 +89,7 @@
     Game.h
     Loader.h
     LuaState.h
+    PathConfig.h
     input/InputManager.h
     input/KeyBinder.h
     input/KeyBinderManager.h

Modified: code/branches/presentation2/src/libraries/core/PathConfig.h
===================================================================
--- code/branches/presentation2/src/libraries/core/PathConfig.h	2009-12-06 19:06:14 UTC (rev 6258)
+++ code/branches/presentation2/src/libraries/core/PathConfig.h	2009-12-06 19:16:04 UTC (rev 6259)
@@ -35,8 +35,10 @@
 #include <vector>
 #include "util/Singleton.h"
 
+//tolua_begin
 namespace orxonox
 {
+//tolua_end
     /**
     @brief
         The PathConfig class is a singleton used to configure different paths.
@@ -49,8 +51,9 @@
         - root only when installed copyable
         - externalData only for development builds in the build tree
     */
-    class _CoreExport PathConfig : public Singleton<PathConfig>
-    {
+    class _CoreExport PathConfig //tolua_export
+        : public Singleton<PathConfig>
+    { //tolua_export
         friend class Singleton<PathConfig>;
         friend class Core;
 
@@ -98,7 +101,7 @@
             //! Returns the path to the external data files as std::string
             static std::string getExternalDataPathString();
             //! Returns the path to the config files as std::string
-            static std::string getConfigPathString();
+            static std::string getConfigPathString(); //tolua_export
             //! Returns the path to the log files as std::string
             static std::string getLogPathString();
             //! Returns the path to the modules as std::string
@@ -131,7 +134,7 @@
 
             bool                     bDevRun_;               //!< True for runs in the build directory (not installed)
             static PathConfig* singletonPtr_s;
-    };
-}
+    }; //tolua_export
+} //tolua_export
 
 #endif /* _PathConfig_H__ */




More information about the Orxonox-commit mailing list