Highlight the currently active profile in ProfileMenu
authorIngo Ruhnke <grumbel@gmail.com>
Sun, 10 Aug 2014 01:29:44 +0000 (03:29 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Sun, 10 Aug 2014 01:29:44 +0000 (03:29 +0200)
src/supertux/menu/profile_menu.cpp

index a4cf477..e616c73 100644 (file)
@@ -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();