Changeset 3008 for code/trunk/src/orxonox/gui
- Timestamp:
- May 21, 2009, 5:16:29 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/gui/GUIManager.cc
r2963 r3008 55 55 #include "ToluaBindCore.h" 56 56 #include "ToluaBindOrxonox.h" 57 #include "core/Loader.h" 57 58 58 59 extern "C" { … … 238 239 COUT(2) << "CEGUI Error: \"" << ex.getMessage() << "\" while executing code \"" << str << "\"" << std::endl; 239 240 } 241 } 242 243 /** 244 245 */ 246 void GUIManager::getLevelList() 247 { 248 lua_State* L = this->scriptModule_->getLuaState(); 249 lua_newtable(L); 250 251 std::vector<std::string> list = Loader::getLevelList(); 252 253 int j = 1; 254 for (std::vector<std::string>::iterator i = list.begin(); i != list.end(); i++) 255 { 256 lua_pushnumber(L,j); 257 lua_pushstring(L,i->c_str()); 258 lua_settable(L,-3); 259 j++; 260 } 261 lua_setglobal(L, "levellist"); 240 262 } 241 263 -
code/trunk/src/orxonox/gui/GUIManager.h
r2962 r3008 97 97 static GUIManager* getInstancePtr() { return singletonRef_s; } 98 98 99 void getLevelList(); //tolua_export 100 99 101 private: 100 102 GUIManager(const GUIManager& instance); //!< private constructor (this is a singleton class)
Note: See TracChangeset
for help on using the changeset viewer.