aboutsummaryrefslogtreecommitdiff
path: root/src/guiPauseMenu.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-22 03:33:58 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-22 03:33:58 +0200
commitb94a00786454968a1cc309b01180292b114da4bd (patch)
tree7500f452ebcf81fabaaaf478747b9826417420b9 /src/guiPauseMenu.h
parent3f5bad938a3fcb601ad41924a4707476b8b87241 (diff)
downloadminetest-b94a00786454968a1cc309b01180292b114da4bd.tar.gz
minetest-b94a00786454968a1cc309b01180292b114da4bd.tar.bz2
minetest-b94a00786454968a1cc309b01180292b114da4bd.zip
some work-in-progress
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