]> git.lizzy.rs Git - dragonfireclient.git/blob - src/guiPauseMenu.h
some work-in-progress
[dragonfireclient.git] / src / guiPauseMenu.h
1 /*\r
2 Minetest-c55\r
3 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>\r
4 Original author Kabak Dmitry <userdima@gmail.com>, contributed under\r
5 the minetest contributor agreement.\r
6 \r
7 This program is free software; you can redistribute it and/or modify\r
8 it under the terms of the GNU General Public License as published by\r
9 the Free Software Foundation; either version 2 of the License, or\r
10 (at your option) any later version.\r
11 \r
12 This program is distributed in the hope that it will be useful,\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15 GNU General Public License for more details.\r
16 \r
17 You should have received a copy of the GNU General Public License along\r
18 with this program; if not, write to the Free Software Foundation, Inc.,\r
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
20 */\r
21 \r
22 \r
23 #ifndef GUIPAUSEMENU_HEADER\r
24 #define GUIPAUSEMENU_HEADER\r
25 \r
26 #include "common_irrlicht.h"\r
27 \r
28 class GUIPauseMenu : public gui::IGUIElement\r
29 {\r
30 public:\r
31         GUIPauseMenu(gui::IGUIEnvironment* env,\r
32                         gui::IGUIElement* parent, s32 id,\r
33                         IrrlichtDevice *dev);\r
34         ~GUIPauseMenu();\r
35         \r
36         /*\r
37                 Remove and re-add (or reposition) stuff\r
38         */\r
39         void resizeGui();\r
40 \r
41         void draw();\r
42 \r
43         void launch()\r
44         {\r
45                 setVisible(true);\r
46                 Environment->setFocus(this);\r
47         }\r
48 \r
49         bool canTakeFocus(gui::IGUIElement *e)\r
50         {\r
51                 return (e && (e == this || isMyChild(e)));\r
52         }\r
53 \r
54         bool OnEvent(const SEvent& event);\r
55         \r
56 private:\r
57         IrrlichtDevice *m_dev;\r
58         v2u32 m_screensize_old;\r
59 };\r
60 \r
61 /*class GUIPauseMenu : public IEventReceiver\r
62 {\r
63 public:\r
64         void scaleGui();\r
65 \r
66         GUIPauseMenu(IrrlichtDevice *device,IEventReceiver *recv);\r
67         ~GUIPauseMenu(void);\r
68 \r
69         void setVisible(bool visible){root->setVisible(visible);};\r
70         bool isVisible(){return root->isVisible();};\r
71 \r
72         bool OnEvent(const SEvent& event);\r
73 \r
74 private:\r
75         bool loadMenu();\r
76         void scaleGui(gui::IGUIElement *node,float factorX,float factorY);\r
77 \r
78         IrrlichtDevice *dev;\r
79         gui::IGUIEnvironment *guienv;\r
80         IEventReceiver *oldRecv;\r
81 \r
82         gui::IGUIStaticText *root;\r
83 };*/\r
84 \r
85 #endif\r
86 \r