X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2FguiMainMenu.h;h=ba2fc6be5e2329265edaad51112bcab603a17426;hb=cd563473fa298db3b910009f26ba263bacd84be9;hp=6c028c6e5e60f18bed4a690adaa8bf28ea6affb4;hpb=9850df35ae1097088faed3fd74d2ebcd24dc0152;p=oweals%2Fminetest.git diff --git a/src/guiMainMenu.h b/src/guiMainMenu.h index 6c028c6e5..ba2fc6be5 100644 --- a/src/guiMainMenu.h +++ b/src/guiMainMenu.h @@ -1,21 +1,21 @@ /* - Minetest-c55 - Copyright (C) 2010 celeron55, Perttu Ahola +Minetest-c55 +Copyright (C) 2010 celeron55, Perttu Ahola - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. +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 +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #ifndef GUIMAINMENU_HEADER #define GUIMAINMENU_HEADER @@ -35,6 +35,8 @@ enum GUI_ID_PORT_INPUT, GUI_ID_FANCYTREE_CB, GUI_ID_SMOOTH_LIGHTING_CB, + GUI_ID_3D_CLOUDS_CB, + GUI_ID_OPAQUE_WATER_CB, GUI_ID_DAMAGE_CB, GUI_ID_CREATIVE_CB, GUI_ID_JOIN_GAME_BUTTON, @@ -44,18 +46,19 @@ enum struct MainMenuData { - MainMenuData() : + MainMenuData(): // Client opts - fancy_trees(false), smooth_lighting(false), - // Server opts - creative_mode(false), enable_damage(false), - // Actions - delete_map(false) - { - } + fancy_trees(false), + smooth_lighting(false), + // Server opts + creative_mode(false), + enable_damage(false), + // Actions + delete_map(false) + {} // These are in the native format of the gui elements - + // Client options std::wstring address; std::wstring port; @@ -63,6 +66,8 @@ struct MainMenuData std::wstring password; bool fancy_trees; bool smooth_lighting; + bool clouds_3d; + bool opaque_water; // Server options bool creative_mode; bool enable_damage; @@ -70,23 +75,20 @@ struct MainMenuData bool delete_map; }; -class GUIMainMenu: public GUIModalMenu +class GUIMainMenu : public GUIModalMenu { public: - GUIMainMenu(gui::IGUIEnvironment* env, gui::IGUIElement* parent, s32 id, - IMenuManager *menumgr, MainMenuData *data, + GUIMainMenu(gui::IGUIEnvironment* env, + gui::IGUIElement* parent, s32 id, + IMenuManager *menumgr, + MainMenuData *data, IGameCallback *gamecallback); ~GUIMainMenu(); - - gui::IGUIEnvironment* env; - gui::IGUIElement* parent; - s32 id; - IMenuManager *menumgr; - + void removeChildren(); /* - Remove and re-add (or reposition) stuff - */ + Remove and re-add (or reposition) stuff + */ void regenerateGui(v2u32 screensize); void drawMenu(); @@ -99,11 +101,16 @@ public: } bool OnEvent(const SEvent& event); - + private: MainMenuData *m_data; bool m_accepted; IGameCallback *m_gamecallback; + + gui::IGUIEnvironment* env; + gui::IGUIElement* parent; + s32 id; + IMenuManager *menumgr; }; #endif