summaryrefslogtreecommitdiff
path: root/src/guiPauseMenu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiPauseMenu.h')
-rw-r--r--src/guiPauseMenu.h61
1 files changed, 47 insertions, 14 deletions
diff --git a/src/guiPauseMenu.h b/src/guiPauseMenu.h
index 28ac02bc9..f26a26149 100644
--- a/src/guiPauseMenu.h
+++ b/src/guiPauseMenu.h
@@ -23,31 +23,64 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef GUIPAUSEMENU_HEADER
#define GUIPAUSEMENU_HEADER
-#include <irrlicht.h>
-using namespace irr;
+#include "common_irrlicht.h"
-class guiPauseMenu : public IEventReceiver
+class GUIPauseMenu : public gui::IGUIElement
{
-private:
- IrrlichtDevice *dev;
- gui::IGUIEnvironment *guienv;
- IEventReceiver *oldRecv;
+public:
+ GUIPauseMenu(gui::IGUIEnvironment* env,
+ gui::IGUIElement* parent, s32 id,
+ IrrlichtDevice *dev);
+ ~GUIPauseMenu();
+
+ /*
+ Remove and re-add (or reposition) stuff
+ */
+ void resizeGui();
- gui::IGUIStaticText *root;
+ void draw();
- bool loadMenu();
- void scaleGui();
- void scaleGui(gui::IGUIElement *node,float factorX,float factorY);
+ void launch()
+ {
+ setVisible(true);
+ Environment->setFocus(this);
+ }
+
+ bool canTakeFocus(gui::IGUIElement *e)
+ {
+ return (e && (e == this || isMyChild(e)));
+ }
+
+ bool OnEvent(const SEvent& event);
+
+private:
+ IrrlichtDevice *m_dev;
+ v2u32 m_screensize_old;
+};
+
+/*class GUIPauseMenu : public IEventReceiver
+{
public:
- guiPauseMenu(IrrlichtDevice *device,IEventReceiver *recv);
+ void scaleGui();
+
+ GUIPauseMenu(IrrlichtDevice *device,IEventReceiver *recv);
+ ~GUIPauseMenu(void);
void setVisible(bool visible){root->setVisible(visible);};
bool isVisible(){return root->isVisible();};
bool OnEvent(const SEvent& event);
- ~guiPauseMenu(void);
-};
+private:
+ bool loadMenu();
+ void scaleGui(gui::IGUIElement *node,float factorX,float factorY);
+
+ IrrlichtDevice *dev;
+ gui::IGUIEnvironment *guienv;
+ IEventReceiver *oldRecv;
+
+ gui::IGUIStaticText *root;
+};*/
#endif