18 #ifndef _GUI_OVERLAY_HH_
19 #define _GUI_OVERLAY_HH_
32 #include "msgs/MessageTypes.hh"
68 public:
void Init(Ogre::RenderTarget *_renderTarget);
92 const std::string &_name,
93 const std::string &_parent,
96 const std::string &_text);
115 public:
void LoadLayout(
const std::string &_filename);
124 const std::string &_windowName);
134 const std::string &_windowName);
137 public:
void Resize(
unsigned int _width,
unsigned int _height);
140 private:
void PreRender();
148 public:
template<
typename T>
150 void (T::*_fp)(), T *_obj)
153 CEGUI::Window *buttonWindow;
155 CEGUI::WindowManager::getSingletonPtr()->getWindow(
157 buttonWindow->subscribeEvent(CEGUI::PushButton::EventClicked,
158 CEGUI::Event::Subscriber(&GUIOverlay::OnButtonClicked,
this));
160 this->callbacks[_buttonName] = boost::bind(_fp, _obj);
168 public: CEGUI::Window *GetWindow(
const std::string &_name);
173 private: CEGUI::Window *LoadLayoutImpl(
const std::string &_filename);
178 private:
bool OnButtonClicked(
const CEGUI::EventArgs &_e);
183 private:
int GetKeyCode(
const std::string &_unicode);
186 private: CEGUI::OgreRenderer *guiRenderer;
190 private: std::vector<event::ConnectionPtr> connections;
193 private: std::string layoutFilename;
196 private: std::map<std::string, boost::function<void()> > callbacks;
200 private:
unsigned int rttImageSetCount;
203 private:
bool initialized;