Changeset 6537 for code/branches/gamestate/src/libraries/core/GUIManager.h
- Timestamp:
- Mar 16, 2010, 1:49:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/src/libraries/core/GUIManager.h
r6441 r6537 41 41 42 42 #include "util/OgreForwardRefs.h" 43 #include "util/TriBool.h" 43 44 #include "util/Singleton.h" 44 45 #include "input/InputHandler.h" 46 47 // Tolua includes (have to be relative to the current directory) 48 /* 49 $cfile "../util/TriBool.h" // tolua_export 50 */ 45 51 46 52 namespace orxonox // tolua_export … … 54 60 55 61 The GUIManager is a singleton and can be called anywhere when access on the GUI is needed. 56 Creation of the GUIManager is therefore not possible and the cunstructor is private.57 62 58 63 Since the GUI needs user input, the GUIManager implements the functions needed to act as a key and/or mouse handler. … … 64 69 friend class Singleton<GUIManager>; 65 70 public: 66 GUIManager( Ogre::RenderWindow* renderWindow, const std::pair<int, int>& mousePosition, bool bFullScreen);71 GUIManager(const std::pair<int, int>& mousePosition); 67 72 ~GUIManager(); 68 73 … … 76 81 void setBackground(const std::string& name); 77 82 83 const std::string& createInputState(const std::string& name, TriBool::Value showMouse = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export 84 78 85 void setCamera(Ogre::Camera* camera); 79 86 Ogre::Camera* getCamera() { return this->camera_; } 80 81 static GUIManager* getInstancePtr() { return singletonPtr_s; }82 87 83 88 inline void setPlayer(const std::string& guiname, PlayerInfo* player) … … 88 93 // TODO: Temporary hack because the tolua exported CEGUI method does not seem to work 89 94 static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export 95 96 static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export 90 97 91 98 private: … … 103 110 void mouseMoved (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize); 104 111 void mouseScrolled (int abs, int rel); 105 106 112 scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_; //!< CEGUI's interface to the Ogre Engine 107 113 scoped_ptr<LuaState> luaState_; //!< LuaState, access point to the Lua engine … … 109 115 scoped_ptr<CEGUI::System> guiSystem_; //!< CEGUI's main system 110 116 shared_ptr<ResourceInfo> rootFileInfo_; //!< Resource information about the root script 111 Ogre::RenderWindow* renderWindow_; //!< Ogre's render window to give CEGUI access to it112 117 CEGUI::ResourceProvider* resourceProvider_; //!< CEGUI's resource provider 113 118 CEGUI::Logger* ceguiLogger_; //!< CEGUI's logger to be able to log CEGUI errors in our log 114 std::map<std::string, PlayerInfo*> players_; //!< Stores the player (owner) for each gui119 std::map<std::string, PlayerInfo*> players_; //!< Stores the player (owner) for each GUI 115 120 Ogre::Camera* camera_; //!< Camera used to render the scene with the GUI 116 121 117 122 static GUIManager* singletonPtr_s; //!< Singleton reference to GUIManager 118 bool bShowIngameGUI_;119 123 120 124 }; // tolua_export
Note: See TracChangeset
for help on using the changeset viewer.