Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6367


Ignore:
Timestamp:
Dec 16, 2009, 10:19:32 PM (14 years ago)
Author:
rgrieder
Message:

Moved CEGUI event hack from KeyBinderManager to GUIManager and made the function static.

Location:
code/branches/presentation2/src/libraries/core
Files:
4 edited

Legend:

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

    r6303 r6367  
    4040#include <CEGUIResourceProvider.h>
    4141#include <CEGUISystem.h>
     42#include <CEGUIWindow.h>
    4243#include <ogreceguirenderer/OgreCEGUIRenderer.h>
    4344
     
    347348        }
    348349    }
     350
     351    void GUIManager::subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function)
     352    {
     353        window->subscribeScriptedEvent(event, function);
     354    }
    349355}
  • code/branches/presentation2/src/libraries/core/GUIManager.h

    r6303 r6367  
    8484            { std::map<std::string, PlayerInfo*>::const_iterator it = this->players_.find(guiname); return (it != this->players_.end()) ? it->second : 0; }
    8585
     86        // TODO: Temporary hack because the tolua exported CEGUI method does not seem to work
     87        static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export
     88
    8689    private:
    8790        GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
  • code/branches/presentation2/src/libraries/core/input/KeyBinderManager.cc

    r6311 r6367  
    2828
    2929#include "KeyBinderManager.h"
    30 
    31 #include <CEGUIWindow.h>
    3230
    3331#include "util/Debug.h"
     
    103101    {
    104102        this->currentBinder_->setBinding("", binding, true);
    105     }
    106    
    107     void KeyBinderManager::subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function)
    108     {
    109         window->subscribeScriptedEvent(event, function);
    110103    }
    111104
  • code/branches/presentation2/src/libraries/core/input/KeyBinderManager.h

    r6311 r6367  
    3535#include <string>
    3636#include <boost/shared_ptr.hpp>
    37 #include <CEGUIForwardRefs.h>
    3837
    3938#include "util/Singleton.h"
     
    8281        void setToDefault()
    8382            { this->setCurrent(this->defaultFilename_); }
    84            
    85         void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export
    8683
    8784        //! Returns a pointer to a KeyBinder (creates it if not yet loaded)
Note: See TracChangeset for help on using the changeset viewer.