From 2816d8f638de2f7f06ca1086d1c8846e8971f421 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 23 Dec 2010 15:31:50 +0200 Subject: redoing gui stuff --- src/guiPauseMenu.h | 49 +++++++------------------------------------------ 1 file changed, 7 insertions(+), 42 deletions(-) (limited to 'src/guiPauseMenu.h') diff --git a/src/guiPauseMenu.h b/src/guiPauseMenu.h index f26a26149..7c37af8ef 100644 --- a/src/guiPauseMenu.h +++ b/src/guiPauseMenu.h @@ -1,8 +1,6 @@ /* Minetest-c55 Copyright (C) 2010 celeron55, Perttu Ahola -Original author Kabak Dmitry , contributed under -the minetest contributor agreement. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,63 +22,30 @@ with this program; if not, write to the Free Software Foundation, Inc., #define GUIPAUSEMENU_HEADER #include "common_irrlicht.h" +#include "modalMenu.h" -class GUIPauseMenu : public gui::IGUIElement +class GUIPauseMenu : public GUIModalMenu { public: GUIPauseMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, - IrrlichtDevice *dev); + IrrlichtDevice *dev, + int *active_menu_count); ~GUIPauseMenu(); + void removeChildren(); /* Remove and re-add (or reposition) stuff */ - void resizeGui(); + void regenerateGui(v2u32 screensize); - void draw(); - - void launch() - { - setVisible(true); - Environment->setFocus(this); - } - - bool canTakeFocus(gui::IGUIElement *e) - { - return (e && (e == this || isMyChild(e))); - } + void drawMenu(); bool OnEvent(const SEvent& event); private: IrrlichtDevice *m_dev; - v2u32 m_screensize_old; }; -/*class GUIPauseMenu : public IEventReceiver -{ -public: - 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); - -private: - bool loadMenu(); - void scaleGui(gui::IGUIElement *node,float factorX,float factorY); - - IrrlichtDevice *dev; - gui::IGUIEnvironment *guienv; - IEventReceiver *oldRecv; - - gui::IGUIStaticText *root; -};*/ - #endif -- cgit v1.2.3