Changeset 3337 for code/branches/resource/src/orxonox/gui
- Timestamp:
- Jul 23, 2009, 1:34:31 PM (15 years ago)
- Location:
- code/branches/resource/src/orxonox/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/orxonox/gui/GUIManager.cc
r3327 r3337 287 287 /** 288 288 @brief 289 Registers a GUIOverlay with the GUIManager so that the GUIOverlay can be accessed by it's name through the GUIManager.290 @param name291 The name of the GUI.292 @param overlay293 A pointer to the GUIOverlay of the GUI.294 @return295 Returns false if the Overlay was already present.296 */297 bool GUIManager::registerOverlay(const std::string& name, GUIOverlay* overlay)298 {299 return (this->guiOverlays_.insert(std::pair<std::string, GUIOverlay*>(name, overlay))).second;300 }301 302 /**303 @brief304 Get the GUIOverlay of the GUI with the given name.305 @param name306 The name of the GUI.307 @return308 Returns a pointer to the GUIOverlay.309 */310 GUIOverlay* GUIManager::getOverlay(const std::string& name)311 {312 return (this->guiOverlays_.find(name))->second;313 }314 315 /**316 @brief317 289 Tells the GUIManager which SceneManager to use 318 290 @param camera … … 321 293 In fact the GUIManager needs the SceneManager and not the Camera to display the GUI. 322 294 This means the GUI is not bound to a camera but rather to the SceneManager. 323 Hid ding the GUI when needed can therefore not besolved by just NOT setting the current camera.295 Hiding the GUI when needed can therefore not be resolved by just NOT setting the current camera. 324 296 */ 325 297 void GUIManager::setCamera(Ogre::Camera* camera) -
code/branches/resource/src/orxonox/gui/GUIManager.h
r3327 r3337 88 88 void executeCode(const std::string& str); 89 89 90 bool registerOverlay(const std::string& name, GUIOverlay* overlay); //!< Register a GUIOverlay with the GUIManager.91 GUIOverlay* getOverlay(const std::string& name); // Get the GUIOverlay of the GUI with the given name.92 93 90 void setCamera(Ogre::Camera* camera); 94 91 … … 123 120 State state_; //!< reflects state of the GUIManager 124 121 125 std::map<std::string, GUIOverlay*> guiOverlays_;//!< A list of all GUIOverlay's.126 127 122 static GUIManager* singletonRef_s; //!< Singleton reference to GUIManager 128 123
Note: See TracChangeset
for help on using the changeset viewer.