Exclude end sequence from focus lose code
[supertux.git] / src / gui / menu_item.cpp
index fd599d7..6794834 100644 (file)
 
 #include "gui/menu_item.hpp"
 
+#include <stdio.h>
+
+#include "supertux/menu/menu_storage.hpp"
 #include "supertux/resources.hpp"
 #include "supertux/timer.hpp"
 #include "video/font.hpp"
 
-static const float FLICK_CURSOR_TIME   = 0.5f;
+static const float FLICK_CURSOR_TIME = 0.5f;
 
 MenuItem::MenuItem(MenuItemKind _kind, int _id) :
   kind(_kind),
   id(_id),
-  toggled(),
+  toggled(false),
   text(),
   input(),
   help(),
   list(),
-  selected(),
-  target_menu(),
+  selected(false),
+  target_menu(MenuStorage::NO_MENU),
   input_flickering()
 {
-  toggled = false;
-  selected = false;
-  target_menu = 0;
 }
 
 void
@@ -55,11 +55,11 @@ void
 MenuItem::set_help(const std::string& help_text)
 {
   std::string overflow;
-  help = normal_font->wrap_to_width(help_text, 600, &overflow);
+  help = Resources::normal_font->wrap_to_width(help_text, 600, &overflow);
   while (!overflow.empty())
   {
     help += "\n";
-    help += normal_font->wrap_to_width(overflow, 600, &overflow);
+    help += Resources::normal_font->wrap_to_width(overflow, 600, &overflow);
   }
 }