18 #ifndef _GUI_OVERLAY_HH_
19 #define _GUI_OVERLAY_HH_
48 class GUIOverlayPrivate;
66 public:
void Init(Ogre::RenderTarget *_renderTarget);
90 const std::string &_name,
91 const std::string &_parent,
94 const std::string &_text);
113 public:
void LoadLayout(
const std::string &_filename);
122 const std::string &_windowName);
132 const std::string &_windowName);
135 public:
void Resize(
unsigned int _width,
unsigned int _height);
138 private:
void PreRender();
143 private:
int GetKeyCode(
const std::string &_unicode);
146 public: CEGUI::Window *GetWindow(
const std::string &_name);
154 private: CEGUI::Window *LoadLayoutImpl(
const std::string &_filename);
159 private:
bool OnButtonClicked(
const CEGUI::EventArgs &_e);
168 public:
template<
typename T>
170 void (T::*_fp)(), T *_obj)
173 CEGUI::Window *buttonWindow;
175 CEGUI::WindowManager::getSingletonPtr()->getWindow(
177 buttonWindow->subscribeEvent(CEGUI::PushButton::EventClicked,
178 CEGUI::Event::Subscriber(&GUIOverlay::OnButtonClicked,
this));
180 this->
callbacks[_buttonName] = boost::bind(_fp, _obj);
182 if (_buttonName && _fp && _obj)
184 gzerr <<
"CEGUI not installed." << std::endl;
190 public: std::map<std::string, boost::function<void()> >
callbacks;