Now the growings animation looks pretty cool :)
[supertux.git] / src / menu.h
index 7afe076..5fe4e4a 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <SDL.h>
 #include <vector>
-#include "texture.h"
+#include "screen/texture.h"
 #include "timer.h"
 #include "type.h"
 #include "mousecursor.h"
@@ -53,7 +53,6 @@ enum GameMenuIDs {
 
 enum WorldMapMenuIDs {
   MNID_RETURNWORLDMAP,
-  MNID_SAVEGAME,
   MNID_QUITWORLDMAP
   };
 
@@ -64,9 +63,9 @@ enum LevelEditorMainMenuIDs {
   };
   
 enum LevelEditorSubsetSettingsIDs {
-  MNID_TITLE,
-  MNID_DESCRIPTION,
-  MNID_SAVE_CHANGES
+  MNID_SUBSETTITLE,
+  MNID_SUBSETDESCRIPTION,
+  MNID_SUBSETSAVECHANGES
   };
   
 enum LevelEditorSubsetNewIDs {
@@ -81,6 +80,7 @@ enum LevelEditorSettingsMenuIDs {
   MNID_BGIMG,
   MNID_PARTICLE,
   MNID_LENGTH,
+  MNID_HEIGHT,
   MNID_TIME,
   MNID_GRAVITY,
   MNID_BGSPEED,
@@ -93,7 +93,7 @@ enum LevelEditorSettingsMenuIDs {
   MNID_APPLY
   };
 
-bool confirm_dialog(char *text);
+bool confirm_dialog(Surface* background, std::string text);
 
 /* Kinds of menu items */
 enum MenuItemKind {
@@ -104,7 +104,8 @@ enum MenuItemKind {
   MN_DEACTIVE,
   MN_TEXTFIELD,
   MN_NUMFIELD,
-  MN_CONTROLFIELD,
+  MN_CONTROLFIELD_KB,
+  MN_CONTROLFIELD_JS,
   MN_STRINGSELECT,
   MN_LABEL,
   MN_HL, /* horizontal line */
@@ -178,6 +179,7 @@ private:
   /* input implementation variables */
   int delete_character;
   char mn_input_char;
+  Timer joystick_timer;
   
 public:
   Timer effect;
@@ -209,9 +211,11 @@ public:
   bool isToggled(int id);
 
   void Menu::get_controlfield_key_into_input(MenuItem *item);
+  void Menu::get_controlfield_js_into_input(MenuItem *item);
 
-  void draw   ();
-  void draw_item(int index, int menu_width, int menu_height);
+  void draw(DrawingContext& context);
+  void draw_item(DrawingContext& context,
+      int index, int menu_width, int menu_height);
   void set_pos(int x, int y, float rw = 0, float rh = 0);
 
   /** translate a SDL_Event into a menu_action */