[Supertux-Commit] r5408 - trunk/supertux/src

grumbel at millhouse.dreamhost.com grumbel at millhouse.dreamhost.com
Mon May 5 05:56:37 PDT 2008


Author: grumbel
Date: 2008-05-05 05:56:36 -0700 (Mon, 05 May 2008)
New Revision: 5408

Added:
   trunk/supertux/src/profile_menu.cpp
   trunk/supertux/src/profile_menu.hpp
Modified:
   trunk/supertux/src/options_menu.cpp
Log:
Added profile menu (empty placeholder), don't forget to rerun 'cmake' to make this work

Modified: trunk/supertux/src/options_menu.cpp
===================================================================
--- trunk/supertux/src/options_menu.cpp	2008-05-05 12:37:38 UTC (rev 5407)
+++ trunk/supertux/src/options_menu.cpp	2008-05-05 12:56:36 UTC (rev 5408)
@@ -19,6 +19,7 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <config.h>
 
+#include "profile_menu.hpp"
 #include "options_menu.hpp"
 #include "gui/menu.hpp"
 #include "audio/sound_manager.hpp"
@@ -107,6 +108,7 @@
 
   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()) {

Added: trunk/supertux/src/profile_menu.cpp
===================================================================
--- trunk/supertux/src/profile_menu.cpp	                        (rev 0)
+++ trunk/supertux/src/profile_menu.cpp	2008-05-05 12:56:36 UTC (rev 5408)
@@ -0,0 +1,60 @@
+//  SuperTux
+//  Copyright (C) 2008 Ingo Ruhnke <grumbel at gmx.de>
+//
+//  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 <sstream>
+#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 */


Property changes on: trunk/supertux/src/profile_menu.cpp
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/supertux/src/profile_menu.hpp
===================================================================
--- trunk/supertux/src/profile_menu.hpp	                        (rev 0)
+++ trunk/supertux/src/profile_menu.hpp	2008-05-05 12:56:36 UTC (rev 5408)
@@ -0,0 +1,27 @@
+//  SuperTux
+//  Copyright (C) 2008 Ingo Ruhnke <grumbel at gmx.de>
+//
+//  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 */


Property changes on: trunk/supertux/src/profile_menu.hpp
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native




More information about the Supertux-Commit mailing list