Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8704


Ignore:
Timestamp:
Jun 13, 2011, 2:35:18 PM (13 years ago)
Author:
dafrick
Message:

Only escape [] in CEGUI tetx of version is ≥ 0.7

Location:
code/branches/presentation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/data/gui/scripts/NotificationLayer.lua

    r8703 r8704  
    6262    end
    6363
    64     notification = string.gsub(notification, "%[", "\\%[") -- escape '[' which is used to format text since cegui 0.7
     64    if not guiMgr:usingOldCEGUI() then
     65        notification = string.gsub(notification, "%[", "\\%[") -- escape '[' which is used to format text since cegui 0.7
     66    end
    6567
    6668    local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Queue/" .. queueName .. "/" .. queue.last)
  • code/branches/presentation/src/libraries/core/GUIManager.cc

    r8647 r8704  
    262262        COUT(3) << "Initialising CEGUI." << std::endl;
    263263
     264        this->oldCEGUI_ = false;
     265       
    264266        // Note: No SceneManager specified yet
    265267#ifdef ORXONOX_OLD_CEGUI
    266268        guiRenderer_ = new OgreCEGUIRenderer(GraphicsManager::getInstance().getRenderWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000);
    267269        resourceProvider_ = guiRenderer_->createResourceProvider();
     270        this->oldCEGUI_ = true;
    268271#else
    269272        guiRenderer_ = &OgreRenderer::create(*GraphicsManager::getInstance().getRenderWindow());
  • code/branches/presentation/src/libraries/core/GUIManager.h

    r8637 r8704  
    134134
    135135        static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
     136
     137        /**
     138        @brief Check whether CEGUI is version < 0.7.
     139        @return Returns true if the CEGUI version is < 0.7. False otherwise.
     140        */
     141        inline bool usingOldCEGUI(void) { return this->oldCEGUI_; } // tolua_export
    136142
    137143    private:
     
    186192        static const std::string defaultScheme_;
    187193        std::string guiScheme_;
    188 
     194        bool oldCEGUI_;
     195       
    189196        int numScrollLines_; ///< How many lines to scroll in a list if the scroll wheel is used
    190197
Note: See TracChangeset for help on using the changeset viewer.