Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 16, 2010, 12:22:12 PM (14 years ago)
Author:
rgrieder
Message:

Background image of the GUI is now managed by GUIManager and kept in a very simple manner: Tell it about the image set and the image name and the it will display it in the root node.
Also split SheetManager.lua from InitialiseGUI.lua to have a separate initialisation, required by GUIManager now.
And modified GUISheet.cc/h accordingly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2/src/libraries/core/GUIManager.h

    r6736 r6737  
    7979        static void hideGUI(const std::string& name);
    8080        void keyESC();
    81         void setBackground(const std::string& name);
     81        void setBackgroundImage(const std::string& imageSet, const std::string imageName); // tolua_export
     82        void setBackgroundImage(const std::string& image);
    8283
     84        //! Creates a new InputState to be used with a GUI Sheet
    8385        const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
     86
     87        //! Returns the root window for all menu sheets
     88        CEGUI::Window* getMenuRootWindow() { return this->menuRootWindow_; } // tolua_export
     89        //! Returns the root window for all HUD sheets
     90        CEGUI::Window* getHUDRootWindow() { return this->hudRootWindow_; } // tolua_export
    8491
    8592        void setCamera(Ogre::Camera* camera);
     
    120127        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
    121128        CEGUI::Logger*                       ceguiLogger_;      //!< CEGUI's logger to be able to log CEGUI errors in our log
     129        CEGUI::Window*                       rootWindow_;       //!< Root node for all windows
     130        CEGUI::Window*                       hudRootWindow_;    //!< Root node for the HUD sheets
     131        CEGUI::Window*                       menuRootWindow_;   //!< Root node for the menu sheets (used by Lua)
    122132        std::map<std::string, PlayerInfo*>   players_;          //!< Stores the player (owner) for each GUI
    123133        Ogre::Camera*                        camera_;           //!< Camera used to render the scene with the GUI
Note: See TracChangeset for help on using the changeset viewer.