+ MN_ID_RETURN,
+ MN_ID_LOAD_SUBSET,
+ MN_ID_QUIT,
+
+ // settings menu ids:
+ MN_ID_NAME,
+ MN_ID_AUTHOR,
+ MN_ID_WIDTH,
+ MN_ID_HEIGHT,
+ MN_ID_APPLY_SETTINGS,
+
+ // creating subset menu ids:
+ MN_ID_FILENAME_SUBSET,
+ MN_ID_TITLE_SUBSET,
+ MN_ID_DESCRIPTION_SUBSET,
+ MN_ID_CREATE_SUBSET
+ };
+
+enum {
+ BT_LEVEL_SAVE,
+ BT_LEVEL_TEST,
+ BT_LEVEL_SETUP,
+
+ BT_NEXT_LEVEL,
+ BT_PREVIOUS_LEVEL,
+ BT_NEXT_SECTOR,
+ BT_PREVIOUS_SECTOR
+ };
+
+enum {
+ OBJ_TRAMPOLINE = -100,
+ OBJ_FLYING_PLATFORM = -101,
+ OBJ_DOOR = -102
+ };
+
+class LevelEditor
+{
+public:
+ LevelEditor();
+ ~LevelEditor();
+
+ void run(const std::string filename = "");
+
+private:
+ void events();
+ void action();
+ void draw(DrawingContext& context);
+
+ void load_level_subset(std::string filename);
+ void load_level(std::string filename);
+ void load_level(int nb);
+ void load_sector(std::string name);
+ void load_sector(Sector* sector);
+
+ void save_level();
+ void test_level();
+ void setup_level();
+
+ void show_help();
+
+ void change(int x, int y, int newtile, int layer);
+
+ void load_buttons_gfx();
+ void free_buttons_gfx();
+
+ Level* level;
+ std::string level_filename;
+
+ Sector* sector; // current sector
+ TileMap *solids, *foregrounds, *backgrounds;
+ std::string sector_name;