Changeset 6019
- Timestamp:
- Nov 3, 2009, 11:53:47 AM (15 years ago)
- Location:
- code/branches/ingamemenu
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ingamemenu/data/gui/layouts/InGameMenu.layout
r6018 r6019 10 10 <Property Name="Text" Value="MainMenu" /> 11 11 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 12 <Property Name="UnifiedAreaRect" Value="{{0. 2,0},{0.45,0},{0.4,0},{0.55,0}}" />12 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2,0},{0.6,0},{0.3,0}}" /> 13 13 <Property Name="Alpha" Value="0.7" /> 14 14 <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/> … … 18 18 <Property Name="Text" Value="Quit" /> 19 19 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 20 <Property Name="UnifiedAreaRect" Value="{{0. 6,0},{0.45,0},{0.8,0},{0.55,0}}" />20 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4,0},{0.6,0},{0.5,0}}" /> 21 21 <Property Name="Alpha" Value="0.7" /> 22 22 <Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/> 23 23 </Window> 24 <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_ReturnButton" > 25 <Property Name="Font" Value="BlueHighway-12" /> 26 <Property Name="Text" Value="return to Game" /> 27 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 28 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6,0},{0.6,0},{0.7,0}}" /> 29 <Property Name="Alpha" Value="0.7" /> 30 <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/> 31 </Window> 24 32 </Window> 25 33 </GUILayout> -
code/branches/ingamemenu/data/gui/scripts/InGameMenu.lua
r6018 r6019 23 23 24 24 function P.button_mainmenu_clicked(e) 25 orxonox.Game:getInstance():popState() 26 orxonox.Game:getInstance():popState() 27 orxonox.Game:getInstance():requestState("mainmenu") 25 28 orxonox.CommandExecutor:execute("showGUI MainMenu") 29 orxonox.CommandExecutor:execute("hideGUI InGameMenu") 30 end 31 32 function P.button_return_clicked(e) 26 33 orxonox.CommandExecutor:execute("hideGUI InGameMenu") 27 34 end -
code/branches/ingamemenu/src/libraries/core/CMakeLists.txt
r5929 r6019 85 85 TOLUA_FILES 86 86 CommandExecutor.h 87 Game.h 87 88 Loader.h 88 89 LuaState.h -
code/branches/ingamemenu/src/libraries/core/Game.h
r5929 r6019 58 58 #define DeclareGameState(className, stateName, bIgnoreTickTime, bGraphicsMode) \ 59 59 static bool BOOST_PP_CAT(bGameStateDummy_##className, __LINE__) = orxonox::Game::declareGameState<className>(#className, stateName, bIgnoreTickTime, bGraphicsMode) 60 60 // tolua_begin 61 61 namespace orxonox 62 62 { 63 // tolua_end 63 64 class GameConfiguration; 64 65 … … 78 79 You should only create this singleton once because it owns the Core class! (see remark there) 79 80 */ 80 class _CoreExport Game : public Singleton<Game> 81 // tolua_begin 82 class _CoreExport Game 83 : public Singleton<Game> 81 84 { 85 // tolua_end 82 86 friend class Singleton<Game>; 83 87 typedef std::vector<shared_ptr<GameState> > GameStateVector; … … 95 99 void stop(); 96 100 97 void requestState(const std::string& name); 98 void requestStates(const std::string& names); 99 void popState(); 101 static Game& getInstance(){ return Singleton<Game>::getInstance(); } // tolua_export 102 103 void requestState(const std::string& name); //tolua_export 104 void requestStates(const std::string& names); //tolua_export 105 void popState(); //tolua_export 100 106 101 107 const Clock& getGameClock() { return *this->gameClock_; } … … 183 189 static std::map<std::string, GameStateInfo> gameStateDeclarations_s; 184 190 static Game* singletonPtr_s; //!< Pointer to the Singleton 185 }; 191 }; //tolua_export 186 192 187 193 template <class T> … … 209 215 return true; 210 216 } 211 } 217 } //tolua_export 212 218 213 219 #endif /* _Game_H__ */
Note: See TracChangeset
for help on using the changeset viewer.