Merge branch 'feature/screenmanager'
[supertux.git] / src / supertux / menu / profile_menu.cpp
index f61b76d..4878bbd 100644 (file)
@@ -1,5 +1,5 @@
 //  SuperTux
-//  Copyright (C) 2008 Ingo Ruhnke <grumbel@gmx.de>
+//  Copyright (C) 2008 Ingo Ruhnke <grumbel@gmail.com>
 //
 //  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
@@ -28,11 +28,18 @@ ProfileMenu::ProfileMenu()
 {
   add_label(_("Select Profile"));
   add_hl();
-  for(int i = 0; i < 5; ++i)
+  for(int i = 1; i <= 5; ++i)
   {
     std::ostringstream out;
-    out << "Profile " << i+1;
-    add_entry(i+1, out.str());
+    if (i == g_config->profile)
+    {
+      out << "[Profile " << i << "]";
+    }
+    else
+    {
+      out << "Profile " << i;
+    }
+    add_entry(i, out.str());
   }
 
   add_hl();
@@ -43,7 +50,7 @@ void
 ProfileMenu::menu_action(MenuItem* item) 
 {
   g_config->profile = item->id;
-  MenuManager::set_current(0);
+  MenuManager::instance().clear_menu_stack();
 }
 
 /*