Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 23, 2009, 1:34:31 PM (15 years ago)
Author:
rgrieder
Message:

Removed GUIOverlay management from GUIManager: It shouldn't be the GUIManager's responsibility to handle some overlays.

Location:
code/branches/resource/src/orxonox/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/orxonox/gui/GUIManager.cc

    r3327 r3337  
    287287    /**
    288288    @brief
    289         Registers a GUIOverlay with the GUIManager so that the GUIOverlay can be accessed by it's name through the GUIManager.
    290     @param name
    291         The name of the GUI.
    292     @param overlay
    293         A pointer to the GUIOverlay of the GUI.
    294     @return
    295         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     @brief
    304         Get the GUIOverlay of the GUI with the given name.
    305     @param name
    306         The name of the GUI.
    307     @return
    308         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     @brief
    317289        Tells the GUIManager which SceneManager to use
    318290    @param camera
     
    321293        In fact the GUIManager needs the SceneManager and not the Camera to display the GUI.
    322294        This means the GUI is not bound to a camera but rather to the SceneManager.
    323         Hidding the GUI when needed can therefore not be solved 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.
    324296    */
    325297    void GUIManager::setCamera(Ogre::Camera* camera)
  • code/branches/resource/src/orxonox/gui/GUIManager.h

    r3327 r3337  
    8888        void executeCode(const std::string& str);
    8989
    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 
    9390        void setCamera(Ogre::Camera* camera);
    9491
     
    123120        State                       state_;             //!< reflects state of the GUIManager
    124121
    125         std::map<std::string, GUIOverlay*> guiOverlays_;//!< A list of all GUIOverlay's.
    126 
    127122        static GUIManager*          singletonRef_s;     //!< Singleton reference to GUIManager
    128123
Note: See TracChangeset for help on using the changeset viewer.