Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7967 for code/branches/kicklib


Ignore:
Timestamp:
Feb 26, 2011, 5:12:43 PM (14 years ago)
Author:
rgrieder
Message:

Cleaned up macro monstrosities in GUIManager and fixed some typos.

Location:
code/branches/kicklib/src/libraries/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/libraries/core/GUIManager.cc

    r7961 r7967  
    4646#include <elements/CEGUIListboxItem.h>
    4747
    48 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     48#ifdef CEGUI_OLD_VERSION
    4949#  include <CEGUILua.h>
    5050#  include <ogreceguirenderer/OgreCEGUIRenderer.h>
     
    9393                case CEGUI::Informative: orxonoxLevel = 5; break;
    9494                case CEGUI::Insane:      orxonoxLevel = 6; break;
    95                 default: OrxAssert(false, "CEGUI log level out of range, inpect immediately!");
     95                default: OrxAssert(false, "CEGUI log level out of range, inspect immediately!");
    9696            }
    9797            OutputHandler::getOutStream(orxonoxLevel)
     
    127127        , guiSystem_(NULL)
    128128        , resourceProvider_(NULL)
    129 #if CEGUI_VERSION_MAJOR >= 1 || CEGUI_VERSION_MINOR >= 7
     129#ifdef CEGUI_OLD_VERSION
    130130        , imageCodec_(NULL)
    131131#endif
     
    140140
    141141        // Note: No SceneManager specified yet
    142 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     142#ifdef CEGUI_OLD_VERSION
    143143        guiRenderer_ = new OgreCEGUIRenderer(GraphicsManager::getInstance().getRenderWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000);
    144144        resourceProvider_ = guiRenderer_->createResourceProvider();
     
    155155        // This is necessary to ensure that input events also use the right resource info when triggering lua functions
    156156        luaState_->setDefaultResourceInfo(this->rootFileInfo_);
    157 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     157#ifdef CEGUI_OLD_VERSION
    158158        scriptModule_ = new LuaScriptModule(luaState_->getInternalLuaState());
    159159#else
     
    171171
    172172        // Create the CEGUI system singleton
    173 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     173#ifdef CEGUI_OLD_VERSION
    174174        guiSystem_ = new System(guiRenderer_, resourceProvider_, 0, scriptModule_);
    175175        // Add functions that have been renamed in newer versions
     
    207207        using namespace CEGUI;
    208208
    209 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     209#ifdef CEGUI_OLD_VERSION
    210210        delete guiSystem_;
    211211        delete guiRenderer_;
     
    260260    {
    261261        this->camera_ = camera;
    262 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     262#ifdef CEGUI_OLD_VERSION
    263263        if (camera == NULL)
    264264            this->guiRenderer_->setTargetSceneManager(0);
     
    539539        The Listbox for which to enable (or disable) tooltips.
    540540    @param enabled
    541         Whether to enable or disabel the tooltips.
     541        Whether to enable or disable the tooltips.
    542542    */
    543543    void GUIManager::setItemTooltipsEnabledHelper(CEGUI::Listbox* listbox, bool enabled)
     
    551551    void GUIManager::windowResized(unsigned int newWidth, unsigned int newHeight)
    552552    {
    553 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     553#ifdef CEGUI_OLD_VERSION
    554554        this->guiRenderer_->setDisplaySize(CEGUI::Size(newWidth, newHeight));
    555555#else
     
    559559
    560560    /**
    561         @brief Notify CEGUI if the windows loses the focus (stops higlight of menu items, etc).
     561        @brief Notify CEGUI if the windows loses the focus (stops highlight of menu items, etc).
    562562    */
    563563    void GUIManager::windowFocusChanged(bool bFocus)
  • code/branches/kicklib/src/libraries/core/GUIManager.h

    r7965 r7967  
    5757$cfile "../util/TriBool.h" // tolua_export
    5858*/
     59
     60#if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     61#  define CEGUI_OLD_VERSION
     62#endif
    5963
    6064namespace orxonox // tolua_export
     
    149153        Loki::ObjScopeGuardImpl0<GUIManager, void (GUIManager::*)()> destroyer_;
    150154
    151 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
     155#ifdef CEGUI_OLD_VERSION
    152156        CEGUI::OgreCEGUIRenderer*            guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
    153157        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
Note: See TracChangeset for help on using the changeset viewer.