Instead of limitating the number of bullets, according to the ones in screen, do...
[supertux.git] / src / menu.h
index cd2023b..449cf23 100644 (file)
@@ -32,6 +32,7 @@
 enum MainMenuIDs {
   MNID_STARTGAME,
   MNID_CONTRIB,
+  MNID_OPTIONMENU,
   MNID_LEVELEDITOR,
   MNID_CREDITS,
   MNID_QUITMAINMENU
@@ -52,7 +53,6 @@ enum GameMenuIDs {
 
 enum WorldMapMenuIDs {
   MNID_RETURNWORLDMAP,
-  MNID_SAVEGAME,
   MNID_QUITWORLDMAP
   };
 
@@ -61,11 +61,39 @@ enum LevelEditorMainMenuIDs {
   MNID_SUBSETSETTINGS,
   MNID_QUITLEVELEDITOR
   };
+  
+enum LevelEditorSubsetSettingsIDs {
+  MNID_SUBSETTITLE,
+  MNID_SUBSETDESCRIPTION,
+  MNID_SUBSETSAVECHANGES
+  };
+  
+enum LevelEditorSubsetNewIDs {
+ MNID_SUBSETNAME,
+ MNID_CREATESUBSET
+};
 
 enum LevelEditorSettingsMenuIDs {
+  MNID_NAME,
+  MNID_AUTHOR,
+  MNID_SONG,
+  MNID_BGIMG,
+  MNID_PARTICLE,
+  MNID_LENGTH,
+  MNID_TIME,
+  MNID_GRAVITY,
+  MNID_BGSPEED,
+  MNID_TopRed,
+  MNID_TopGreen,
+  MNID_TopBlue,
+  MNID_BottomRed,
+  MNID_BottomGreen,
+  MNID_BottomBlue,
   MNID_APPLY
   };
 
+bool confirm_dialog(std::string text);
+
 /* Kinds of menu items */
 enum MenuItemKind {
   MN_ACTION,
@@ -99,6 +127,11 @@ public:
   void change_input(const char *text);
 
   static MenuItem* create(MenuItemKind kind, const char *text, int init_toggle, Menu* target_menu, int id, int* int_p);
+
+  std::string get_input_with_symbol(bool active_item);   // returns the text with an input symbol
+private:
+  bool input_flickering;
+  Timer input_flickering_timer;
 };
 
 class Menu
@@ -137,7 +170,6 @@ private:
   // position of the menu (ie. center of the menu, not top/left)
   int pos_x;
   int pos_y;
-  bool has_backitem;
 
   /** input event for the menu (up, down, left, right, etc.) */
   MenuAction menuaction;
@@ -169,6 +201,11 @@ public:
   int  check  ();
 
   MenuItem& get_item(int index) { return item[index]; }
+  MenuItem& get_item_by_id(int id);
+
+  int get_active_item_id();
+
+  bool isToggled(int id);
 
   void Menu::get_controlfield_key_into_input(MenuItem *item);
 
@@ -181,6 +218,8 @@ public:
 
   int get_width() const;
   int get_height() const;
+
+  bool is_toggled(int id) const;
 };
 
 extern Surface* checkbox;