From: Ingo Ruhnke Date: Mon, 5 May 2008 12:56:36 +0000 (+0000) Subject: Added profile menu (empty placeholder), don't forget to rerun 'cmake' to make this... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8c04f9d88e4d60096c7279bdbff374e5ade1d565;p=supertux.git Added profile menu (empty placeholder), don't forget to rerun 'cmake' to make this work SVN-Revision: 5408 --- diff --git a/src/options_menu.cpp b/src/options_menu.cpp index 2ed6faa98..63a7a5989 100644 --- a/src/options_menu.cpp +++ b/src/options_menu.cpp @@ -19,6 +19,7 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include +#include "profile_menu.hpp" #include "options_menu.hpp" #include "gui/menu.hpp" #include "audio/sound_manager.hpp" @@ -107,6 +108,7 @@ OptionsMenu::OptionsMenu() add_label(_("Options")); add_hl(); + add_submenu(_("Change Profile"), get_profile_menu()); add_submenu(_("Select Language"), language_menu.get()); add_toggle(MNID_FULLSCREEN,_("Fullscreen"), config->use_fullscreen); if (sound_manager->is_audio_enabled()) { diff --git a/src/profile_menu.cpp b/src/profile_menu.cpp new file mode 100644 index 000000000..d7f93c21d --- /dev/null +++ b/src/profile_menu.cpp @@ -0,0 +1,60 @@ +// SuperTux +// Copyright (C) 2008 Ingo Ruhnke +// +// 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. +// +// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include +#include "gettext.hpp" +#include "gui/menu.hpp" + +enum ProfileMenuIDs { + +}; + +class ProfileMenu : public Menu +{ +public: + ProfileMenu() { + add_label(_("Select Profile")); + add_hl(); + for(int i = 0; i < 5; ++i) + { + std::ostringstream out; + out << "Profile " << i+1; + add_entry(i, out.str()); + } + + add_hl(); + add_back(_("Back")); + } + +}; + +Menu* profile_menu = 0; + +Menu* get_profile_menu() +{ + //static ProfileMenu menu; + profile_menu = new ProfileMenu(); + return profile_menu; +} + +void free_profile_menu() +{ + delete profile_menu; + profile_menu = 0; +} + +/* EOF */ diff --git a/src/profile_menu.hpp b/src/profile_menu.hpp new file mode 100644 index 000000000..62ffc6ce7 --- /dev/null +++ b/src/profile_menu.hpp @@ -0,0 +1,27 @@ +// SuperTux +// Copyright (C) 2008 Ingo Ruhnke +// +// 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. +// +// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#ifndef __PROFILE_MENU_HPP__ +#define __PROFILE_MENU_HPP__ + +class Menu; +Menu* get_profile_menu(); +void free_profile_menu(); + +#endif + +/* EOF */