Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7971


Ignore:
Timestamp:
Feb 26, 2011, 8:13:15 PM (13 years ago)
Author:
rgrieder
Message:

Fixed GUITools.lua for good: both CECGUI 0.6 and 0.7 seem to work. At least I haven't noticed any bogus behaviour in the Credits or in the Quest sheet.

Location:
code/branches/kicklib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/data/gui/scripts/GUITools.lua

    r7965 r7971  
    5454
    5555    local height = 0
    56     if orxonox.GUIManager:isCEGUIVersion7() then
    57         height = math.floor(CEGUI.PropertyHelper.stringToFloat(window:getProperty("VertExtent")) + frameHeight) + 1
    58     else
     56    if ORXONOX_OLD_CEGUI then
    5957        local lines = window:getFont():getFormattedLineCount(window:getText(), formattedArea, CEGUI.WordWrapLeftAligned)
    6058        height = lines * window:getFont():getLineSpacing() + frameHeight
     59    else
     60        height = math.floor(CEGUI.PropertyHelper:stringToFloat(window:getProperty("VertExtent")) + frameHeight) + 1
    6161    end
    6262    return height
  • code/branches/kicklib/src/libraries/core/GUIManager.cc

    r7968 r7971  
    157157#ifdef ORXONOX_OLD_CEGUI
    158158        scriptModule_ = new LuaScriptModule(luaState_->getInternalLuaState());
     159        luaState_->doString("ORXONOX_OLD_CEGUI = true");
    159160#else
    160161        scriptModule_ = &LuaScriptModule::create(luaState_->getInternalLuaState());
  • code/branches/kicklib/src/libraries/core/GUIManager.h

    r7968 r7971  
    120120        static void setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled); //tolua_export
    121121
    122         static bool isCEGUIVersion7(void) { return CEGUIVERSION7; } // tolua_export
    123 
    124122        static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
    125123
     
    156154        CEGUI::OgreCEGUIRenderer*            guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
    157155        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
    158         static const bool                    CEGUIVERSION7 = false;
    159156#else
    160157        CEGUI::OgreRenderer*                 guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
    161158        CEGUI::OgreResourceProvider*         resourceProvider_; //!< CEGUI's resource provider
    162159        CEGUI::OgreImageCodec*               imageCodec_;
    163         static const bool                    CEGUIVERSION7 = true;
    164160#endif
    165161        LuaState*                            luaState_;         //!< LuaState, access point to the Lua engine
Note: See TracChangeset for help on using the changeset viewer.