From: Holger Schemel Date: Sun, 25 Jan 2015 00:06:40 +0000 (+0100) Subject: moved element properties button in editor to more prominent position X-Git-Tag: 4.0.0.0-rc1~307 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=82935bc1d2a8bba3be5a29cd5449edc155118521 moved element properties button in editor to more prominent position --- diff --git a/ChangeLog b/ChangeLog index 4c89b17e..adb4305b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-01-25 + * moved "element properties" button in editor from toolbox to palette + * added "zoom level tile size" button in editor to toolbox (currently + no function behind it; will be used to zoom level editor playfield) + * added key shortcuts '1' to '3' to view properties of drawing elements + 2015-01-19 * re-enabled editor palette element options in setup configuration file diff --git a/src/conf_gfx.c b/src/conf_gfx.c index c7e9d789..d44155d3 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -5305,6 +5305,13 @@ struct ConfigInfo image_config[] = { "editor.button.gfx.next_level.height", "16" }, { "editor.button.gfx.next_level.pressed_xoffset", "-16" }, + { "editor.button.gfx.properties", "RocksDoor.png" }, + { "editor.button.gfx.properties.x", "505" }, + { "editor.button.gfx.properties.y", "110" }, + { "editor.button.gfx.properties.width", "90" }, + { "editor.button.gfx.properties.height", "20" }, + { "editor.button.gfx.properties.pressed_yoffset", "-20" }, + { "editor.input.gfx.level_number", "RocksDoor.png" }, { "editor.input.gfx.level_number.x", "529" }, { "editor.input.gfx.level_number.y", "5" }, @@ -7105,13 +7112,15 @@ struct ConfigInfo image_config[] = { "editor.button.prev_level.y", "5" }, { "editor.button.next_level.x", "79" }, { "editor.button.next_level.y", "5" }, + { "editor.button.properties.x", "5" }, + { "editor.button.properties.y", "230" }, { "editor.input.level_number.x", "29" }, { "editor.input.level_number.y", "5" }, { "editor.palette.x", "5" }, { "editor.palette.y", "30" }, { "editor.palette.cols", "4" }, - { "editor.palette.rows", "11" }, + { "editor.palette.rows", "10" }, { "editor.palette.tile_size", "16" }, { "editor.palette.element_left.x", "6" }, diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 6e1914fd..352fa87d 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -1824,83 +1824,84 @@ #define IMG_EDITOR_PLAYFIELD_SCROLLBAR 1805 #define IMG_EDITOR_BUTTON_GFX_PREV_LEVEL 1806 #define IMG_EDITOR_BUTTON_GFX_NEXT_LEVEL 1807 -#define IMG_EDITOR_INPUT_GFX_LEVEL_NUMBER 1808 -#define IMG_BACKGROUND 1809 -#define IMG_BACKGROUND_TITLE_INITIAL 1810 -#define IMG_BACKGROUND_TITLE 1811 -#define IMG_BACKGROUND_MAIN 1812 -#define IMG_BACKGROUND_LEVELS 1813 -#define IMG_BACKGROUND_LEVELNR 1814 -#define IMG_BACKGROUND_SCORES 1815 -#define IMG_BACKGROUND_EDITOR 1816 -#define IMG_BACKGROUND_INFO 1817 -#define IMG_BACKGROUND_INFO_ELEMENTS 1818 -#define IMG_BACKGROUND_INFO_MUSIC 1819 -#define IMG_BACKGROUND_INFO_CREDITS 1820 -#define IMG_BACKGROUND_INFO_PROGRAM 1821 -#define IMG_BACKGROUND_INFO_VERSION 1822 -#define IMG_BACKGROUND_INFO_LEVELSET 1823 -#define IMG_BACKGROUND_SETUP 1824 -#define IMG_BACKGROUND_PLAYING 1825 -#define IMG_BACKGROUND_DOOR 1826 -#define IMG_BACKGROUND_TAPE 1827 -#define IMG_BACKGROUND_PANEL 1828 -#define IMG_BACKGROUND_PALETTE 1829 -#define IMG_BACKGROUND_TOOLBOX 1830 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1 1831 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2 1832 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3 1833 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4 1834 -#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5 1835 -#define IMG_BACKGROUND_TITLESCREEN_1 1836 -#define IMG_BACKGROUND_TITLESCREEN_2 1837 -#define IMG_BACKGROUND_TITLESCREEN_3 1838 -#define IMG_BACKGROUND_TITLESCREEN_4 1839 -#define IMG_BACKGROUND_TITLESCREEN_5 1840 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1 1841 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2 1842 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3 1843 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4 1844 -#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5 1845 -#define IMG_BACKGROUND_TITLEMESSAGE_1 1846 -#define IMG_BACKGROUND_TITLEMESSAGE_2 1847 -#define IMG_BACKGROUND_TITLEMESSAGE_3 1848 -#define IMG_BACKGROUND_TITLEMESSAGE_4 1849 -#define IMG_BACKGROUND_TITLEMESSAGE_5 1850 -#define IMG_BACKGROUND_ENVELOPE_1 1851 -#define IMG_BACKGROUND_ENVELOPE_2 1852 -#define IMG_BACKGROUND_ENVELOPE_3 1853 -#define IMG_BACKGROUND_ENVELOPE_4 1854 -#define IMG_BACKGROUND_REQUEST 1855 -#define IMG_TITLESCREEN_INITIAL_1 1856 -#define IMG_TITLESCREEN_INITIAL_2 1857 -#define IMG_TITLESCREEN_INITIAL_3 1858 -#define IMG_TITLESCREEN_INITIAL_4 1859 -#define IMG_TITLESCREEN_INITIAL_5 1860 -#define IMG_TITLESCREEN_1 1861 -#define IMG_TITLESCREEN_2 1862 -#define IMG_TITLESCREEN_3 1863 -#define IMG_TITLESCREEN_4 1864 -#define IMG_TITLESCREEN_5 1865 -#define IMG_DOOR_1_GFX_PART_1 1866 -#define IMG_DOOR_1_GFX_PART_2 1867 -#define IMG_DOOR_1_GFX_PART_3 1868 -#define IMG_DOOR_1_GFX_PART_4 1869 -#define IMG_DOOR_1_GFX_PART_5 1870 -#define IMG_DOOR_1_GFX_PART_6 1871 -#define IMG_DOOR_1_GFX_PART_7 1872 -#define IMG_DOOR_1_GFX_PART_8 1873 -#define IMG_DOOR_2_GFX_PART_1 1874 -#define IMG_DOOR_2_GFX_PART_2 1875 -#define IMG_DOOR_2_GFX_PART_3 1876 -#define IMG_DOOR_2_GFX_PART_4 1877 -#define IMG_DOOR_2_GFX_PART_5 1878 -#define IMG_DOOR_2_GFX_PART_6 1879 -#define IMG_DOOR_2_GFX_PART_7 1880 -#define IMG_DOOR_2_GFX_PART_8 1881 -#define IMG_DOOR_2_TOP_BORDER_CORRECTION 1882 -#define IMG_LAST_IMAGE_ENTRY_BUG 1883 +#define IMG_EDITOR_BUTTON_GFX_PROPERTIES 1808 +#define IMG_EDITOR_INPUT_GFX_LEVEL_NUMBER 1809 +#define IMG_BACKGROUND 1810 +#define IMG_BACKGROUND_TITLE_INITIAL 1811 +#define IMG_BACKGROUND_TITLE 1812 +#define IMG_BACKGROUND_MAIN 1813 +#define IMG_BACKGROUND_LEVELS 1814 +#define IMG_BACKGROUND_LEVELNR 1815 +#define IMG_BACKGROUND_SCORES 1816 +#define IMG_BACKGROUND_EDITOR 1817 +#define IMG_BACKGROUND_INFO 1818 +#define IMG_BACKGROUND_INFO_ELEMENTS 1819 +#define IMG_BACKGROUND_INFO_MUSIC 1820 +#define IMG_BACKGROUND_INFO_CREDITS 1821 +#define IMG_BACKGROUND_INFO_PROGRAM 1822 +#define IMG_BACKGROUND_INFO_VERSION 1823 +#define IMG_BACKGROUND_INFO_LEVELSET 1824 +#define IMG_BACKGROUND_SETUP 1825 +#define IMG_BACKGROUND_PLAYING 1826 +#define IMG_BACKGROUND_DOOR 1827 +#define IMG_BACKGROUND_TAPE 1828 +#define IMG_BACKGROUND_PANEL 1829 +#define IMG_BACKGROUND_PALETTE 1830 +#define IMG_BACKGROUND_TOOLBOX 1831 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_1 1832 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_2 1833 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_3 1834 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_4 1835 +#define IMG_BACKGROUND_TITLESCREEN_INITIAL_5 1836 +#define IMG_BACKGROUND_TITLESCREEN_1 1837 +#define IMG_BACKGROUND_TITLESCREEN_2 1838 +#define IMG_BACKGROUND_TITLESCREEN_3 1839 +#define IMG_BACKGROUND_TITLESCREEN_4 1840 +#define IMG_BACKGROUND_TITLESCREEN_5 1841 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_1 1842 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_2 1843 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_3 1844 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_4 1845 +#define IMG_BACKGROUND_TITLEMESSAGE_INITIAL_5 1846 +#define IMG_BACKGROUND_TITLEMESSAGE_1 1847 +#define IMG_BACKGROUND_TITLEMESSAGE_2 1848 +#define IMG_BACKGROUND_TITLEMESSAGE_3 1849 +#define IMG_BACKGROUND_TITLEMESSAGE_4 1850 +#define IMG_BACKGROUND_TITLEMESSAGE_5 1851 +#define IMG_BACKGROUND_ENVELOPE_1 1852 +#define IMG_BACKGROUND_ENVELOPE_2 1853 +#define IMG_BACKGROUND_ENVELOPE_3 1854 +#define IMG_BACKGROUND_ENVELOPE_4 1855 +#define IMG_BACKGROUND_REQUEST 1856 +#define IMG_TITLESCREEN_INITIAL_1 1857 +#define IMG_TITLESCREEN_INITIAL_2 1858 +#define IMG_TITLESCREEN_INITIAL_3 1859 +#define IMG_TITLESCREEN_INITIAL_4 1860 +#define IMG_TITLESCREEN_INITIAL_5 1861 +#define IMG_TITLESCREEN_1 1862 +#define IMG_TITLESCREEN_2 1863 +#define IMG_TITLESCREEN_3 1864 +#define IMG_TITLESCREEN_4 1865 +#define IMG_TITLESCREEN_5 1866 +#define IMG_DOOR_1_GFX_PART_1 1867 +#define IMG_DOOR_1_GFX_PART_2 1868 +#define IMG_DOOR_1_GFX_PART_3 1869 +#define IMG_DOOR_1_GFX_PART_4 1870 +#define IMG_DOOR_1_GFX_PART_5 1871 +#define IMG_DOOR_1_GFX_PART_6 1872 +#define IMG_DOOR_1_GFX_PART_7 1873 +#define IMG_DOOR_1_GFX_PART_8 1874 +#define IMG_DOOR_2_GFX_PART_1 1875 +#define IMG_DOOR_2_GFX_PART_2 1876 +#define IMG_DOOR_2_GFX_PART_3 1877 +#define IMG_DOOR_2_GFX_PART_4 1878 +#define IMG_DOOR_2_GFX_PART_5 1879 +#define IMG_DOOR_2_GFX_PART_6 1880 +#define IMG_DOOR_2_GFX_PART_7 1881 +#define IMG_DOOR_2_GFX_PART_8 1882 +#define IMG_DOOR_2_TOP_BORDER_CORRECTION 1883 +#define IMG_LAST_IMAGE_ENTRY_BUG 1884 -#define NUM_IMAGE_FILES 1884 +#define NUM_IMAGE_FILES 1885 #endif /* CONF_GFX_H */ diff --git a/src/conf_var.c b/src/conf_var.c index 6618b74b..965b5348 100644 --- a/src/conf_var.c +++ b/src/conf_var.c @@ -6110,6 +6110,14 @@ struct TokenIntPtrInfo image_config_vars[] = "editor.button.next_level.y", &editor.button.next_level.y }, + { + "editor.button.properties.x", + &editor.button.properties.x + }, + { + "editor.button.properties.y", + &editor.button.properties.y + }, { "editor.input.level_number.x", &editor.input.level_number.x diff --git a/src/editor.c b/src/editor.c index 6962624b..e007d7a8 100644 --- a/src/editor.c +++ b/src/editor.c @@ -41,6 +41,8 @@ #define ED_CTRL4_BUTTONS_GFX_YPOS 214 #define ED_CTRL1_BUTTONS_ALT_GFX_YPOS 142 #define ED_CTRL3_BUTTONS_ALT_GFX_YPOS 302 +#define ED_CTRL5_BUTTONS_GFX_XPOS 5 +#define ED_CTRL5_BUTTONS_GFX_YPOS 110 #define ED_CTRL1_BUTTON_XSIZE 22 #define ED_CTRL1_BUTTON_YSIZE 22 @@ -58,6 +60,10 @@ #define ED_CTRL4_BUTTON_YSIZE 22 #define ED_CTRL4_BUTTONS_XPOS 6 #define ED_CTRL4_BUTTONS_YPOS 6 +#define ED_CTRL5_BUTTON_XSIZE 90 +#define ED_CTRL5_BUTTON_YSIZE 20 +#define ED_CTRL5_BUTTONS_XPOS 5 +#define ED_CTRL5_BUTTONS_YPOS 230 #define ED_CTRL1_BUTTONS_HORIZ 4 #define ED_CTRL1_BUTTONS_VERT 4 @@ -67,17 +73,18 @@ #define ED_CTRL3_BUTTONS_VERT 1 #define ED_CTRL4_BUTTONS_HORIZ 2 #define ED_CTRL4_BUTTONS_VERT 1 +#define ED_CTRL5_BUTTONS_HORIZ 1 +#define ED_CTRL5_BUTTONS_VERT 1 #define ED_NUM_CTRL1_BUTTONS (ED_CTRL1_BUTTONS_HORIZ * ED_CTRL1_BUTTONS_VERT) #define ED_NUM_CTRL2_BUTTONS (ED_CTRL2_BUTTONS_HORIZ * ED_CTRL2_BUTTONS_VERT) #define ED_NUM_CTRL3_BUTTONS (ED_CTRL3_BUTTONS_HORIZ * ED_CTRL3_BUTTONS_VERT) #define ED_NUM_CTRL4_BUTTONS (ED_CTRL4_BUTTONS_HORIZ * ED_CTRL4_BUTTONS_VERT) +#define ED_NUM_CTRL5_BUTTONS (ED_CTRL5_BUTTONS_HORIZ * ED_CTRL5_BUTTONS_VERT) #define ED_NUM_CTRL1_2_BUTTONS (ED_NUM_CTRL1_BUTTONS + ED_NUM_CTRL2_BUTTONS) #define ED_NUM_CTRL1_3_BUTTONS (ED_NUM_CTRL1_2_BUTTONS + ED_NUM_CTRL3_BUTTONS) -#define ED_NUM_CTRL_BUTTONS (ED_NUM_CTRL1_BUTTONS + \ - ED_NUM_CTRL2_BUTTONS + \ - ED_NUM_CTRL3_BUTTONS + \ - ED_NUM_CTRL4_BUTTONS) +#define ED_NUM_CTRL1_4_BUTTONS (ED_NUM_CTRL1_3_BUTTONS + ED_NUM_CTRL4_BUTTONS) +#define ED_NUM_CTRL_BUTTONS (ED_NUM_CTRL1_4_BUTTONS + ED_NUM_CTRL5_BUTTONS) /* values for the element list */ #define ED_ELEMENTLIST_XPOS (editor.palette.x) @@ -303,7 +310,7 @@ #define GADGET_ID_TEXT (GADGET_ID_TOOLBOX_FIRST + 7) #define GADGET_ID_FLOOD_FILL (GADGET_ID_TOOLBOX_FIRST + 8) #define GADGET_ID_WRAP_LEFT (GADGET_ID_TOOLBOX_FIRST + 9) -#define GADGET_ID_PROPERTIES (GADGET_ID_TOOLBOX_FIRST + 10) +#define GADGET_ID_ZOOM (GADGET_ID_TOOLBOX_FIRST + 10) #define GADGET_ID_WRAP_RIGHT (GADGET_ID_TOOLBOX_FIRST + 11) #define GADGET_ID_RANDOM_PLACEMENT (GADGET_ID_TOOLBOX_FIRST + 12) #define GADGET_ID_GRAB_BRUSH (GADGET_ID_TOOLBOX_FIRST + 13) @@ -323,8 +330,10 @@ #define GADGET_ID_CUSTOM_COPY (GADGET_ID_TOOLBOX_FIRST + 25) #define GADGET_ID_CUSTOM_PASTE (GADGET_ID_TOOLBOX_FIRST + 26) +#define GADGET_ID_PROPERTIES (GADGET_ID_TOOLBOX_FIRST + 27) + /* counter gadget identifiers */ -#define GADGET_ID_COUNTER_FIRST (GADGET_ID_TOOLBOX_FIRST + 27) +#define GADGET_ID_COUNTER_FIRST (GADGET_ID_TOOLBOX_FIRST + 28) #define GADGET_ID_SELECT_LEVEL_DOWN (GADGET_ID_COUNTER_FIRST + 0) #define GADGET_ID_SELECT_LEVEL_TEXT (GADGET_ID_COUNTER_FIRST + 1) @@ -988,7 +997,7 @@ static struct { 't', "enter text elements" }, { 'f', "flood fill" }, { '\0', "wrap (rotate) level left" }, - { '?', "properties of drawing element" }, + { 'z', "zoom level tile size" }, { '\0', "wrap (rotate) level right" }, { '\0', "random element placement" }, { 'b', "grab brush" }, @@ -1008,6 +1017,8 @@ static struct { '\0', "copy settings from this element" }, { '\0', "paste settings to this element" }, + + { 'p', "properties of drawing element" }, }; static int random_placement_value = 10; @@ -5166,6 +5177,7 @@ static void CreateControlButtons() int width, height; int gd_xoffset, gd_yoffset; int gd_x1, gd_x2, gd_y1, gd_y2; + int gd_x1a, gd_x2a, gd_y1a, gd_y2a; int button_type; int radio_button_nr; boolean checked; @@ -5249,7 +5261,7 @@ static void CreateControlButtons() gd_y1 = DOOR_GFX_PAGEY1 + ED_CTRL3_BUTTONS_GFX_YPOS + gd_yoffset; gd_y2 = DOOR_GFX_PAGEY1 + ED_CTRL3_BUTTONS_ALT_GFX_YPOS + gd_yoffset; } - else + else if (id < ED_NUM_CTRL1_4_BUTTONS) { int x = (i - ED_NUM_CTRL1_3_BUTTONS) % ED_CTRL4_BUTTONS_HORIZ; int y = (i - ED_NUM_CTRL1_3_BUTTONS) / ED_CTRL4_BUTTONS_HORIZ + 3; @@ -5264,6 +5276,41 @@ static void CreateControlButtons() gd_y1 = DOOR_GFX_PAGEY1 + ED_CTRL4_BUTTONS_GFX_YPOS + gd_yoffset; gd_y2 = 0; /* no alternative graphic for these buttons */ } + else + { + gd_xoffset = DX - EX + ED_CTRL5_BUTTONS_XPOS; + gd_yoffset = DY - EY + ED_CTRL5_BUTTONS_YPOS; + width = ED_CTRL5_BUTTON_XSIZE; + height = ED_CTRL5_BUTTON_YSIZE; + + gd_x1 = DOOR_GFX_PAGEX6 + ED_CTRL5_BUTTONS_GFX_XPOS; + gd_x2 = 0; /* no alternative graphic for these buttons */ + gd_y1 = DOOR_GFX_PAGEY1 + ED_CTRL5_BUTTONS_GFX_YPOS; + gd_y2 = DOOR_GFX_PAGEY1 + ED_CTRL5_BUTTONS_GFX_YPOS - height; + } + + if (id < ED_NUM_CTRL1_4_BUTTONS) + { + gd_x1a = gd_x1; + gd_y1a = gd_y2; + gd_x2a = gd_x2; + gd_y2a = gd_y2; + gd_x1 = gd_x1; + gd_y1 = gd_y1; + gd_x2 = gd_x2; + gd_y2 = gd_y1; + } + else + { + gd_x1a = 0; + gd_y1a = 0; + gd_x2a = 0; + gd_y2a = 0; + gd_x1 = gd_x1; + gd_y1 = gd_y1; + gd_x2 = gd_x1; + gd_y2 = gd_y2; + } gi = CreateGadget(GDI_CUSTOM_ID, id, GDI_CUSTOM_TYPE_ID, i, @@ -5277,9 +5324,9 @@ static void CreateControlButtons() GDI_RADIO_NR, radio_button_nr, GDI_CHECKED, checked, GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1, - GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y1, - GDI_ALT_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y2, - GDI_ALT_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2, + GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2, + GDI_ALT_DESIGN_UNPRESSED, gd_bitmap, gd_x1a, gd_y1a, + GDI_ALT_DESIGN_PRESSED, gd_bitmap, gd_x2a, gd_y2a, GDI_EVENT_MASK, event_mask, GDI_CALLBACK_INFO, HandleEditorGadgetInfoText, GDI_CALLBACK_ACTION, HandleControlButtons, @@ -6328,6 +6375,9 @@ static void MapControlButtons() for (i = 0; i < ED_NUM_CTRL1_2_BUTTONS; i++) MapGadget(level_editor_gadget[i]); + /* map toolbox buttons (element properties button) */ + MapGadget(level_editor_gadget[ED_NUM_CTRL1_4_BUTTONS]); + /* map buttons to select elements */ for (i = 0; i < ED_NUM_ELEMENTLIST_BUTTONS; i++) MapGadget(level_editor_gadget[GADGET_ID_ELEMENTLIST_FIRST + i]); @@ -6591,7 +6641,6 @@ static void MapOrUnmapLevelEditorToolboxDrawingGadgets(boolean map) for (i = 0; i < ED_NUM_CTRL1_BUTTONS; i++) { if (i != GADGET_ID_SINGLE_ITEMS && - i != GADGET_ID_PROPERTIES && i != GADGET_ID_PICK_ELEMENT) { struct GadgetInfo *gi = level_editor_gadget[i]; @@ -11066,7 +11115,6 @@ static void HandleControlButtons(struct GadgetInfo *gi) if (id < ED_NUM_CTRL1_BUTTONS && id != GADGET_ID_SINGLE_ITEMS && - id != GADGET_ID_PROPERTIES && id != GADGET_ID_PICK_ELEMENT && edit_mode != ED_MODE_DRAWING && drawing_function != GADGET_ID_PICK_ELEMENT && @@ -11192,6 +11240,27 @@ static void HandleControlButtons(struct GadgetInfo *gi) break; + case GADGET_ID_PROPERTIES: + if (edit_mode != ED_MODE_PROPERTIES) + { + properties_element = new_element; + DrawPropertiesWindow(); + edit_mode = ED_MODE_PROPERTIES; + + last_level_drawing_function = drawing_function; + ClickOnGadget(level_editor_gadget[GADGET_ID_SINGLE_ITEMS], + MB_LEFTBUTTON); + } + else + { + DrawDrawingWindow(); + edit_mode = ED_MODE_DRAWING; + + ClickOnGadget(level_editor_gadget[last_level_drawing_function], + MB_LEFTBUTTON); + } + break; + case GADGET_ID_WRAP_LEFT: WrapLevel(-step, 0); break; @@ -11228,25 +11297,8 @@ static void HandleControlButtons(struct GadgetInfo *gi) RandomPlacement(new_element); break; - case GADGET_ID_PROPERTIES: - if (edit_mode != ED_MODE_PROPERTIES) - { - properties_element = new_element; - DrawPropertiesWindow(); - edit_mode = ED_MODE_PROPERTIES; - - last_level_drawing_function = drawing_function; - ClickOnGadget(level_editor_gadget[GADGET_ID_SINGLE_ITEMS], - MB_LEFTBUTTON); - } - else - { - DrawDrawingWindow(); - edit_mode = ED_MODE_DRAWING; - - ClickOnGadget(level_editor_gadget[last_level_drawing_function], - MB_LEFTBUTTON); - } + case GADGET_ID_ZOOM: + printf("::: zoom button pressed with mouse button %d\n", button); break; case GADGET_ID_CUSTOM_COPY_FROM: @@ -11602,6 +11654,10 @@ void HandleLevelEditorKeyInput(Key key) if (id != GADGET_ID_NONE) ClickOnGadget(level_editor_gadget[id], button); + else if (letter >= '1' && letter <= '3') + ClickOnGadget(level_editor_gadget[GADGET_ID_PROPERTIES], letter - '0'); + else if (letter == '?') + ClickOnGadget(level_editor_gadget[GADGET_ID_PROPERTIES], button); else if (letter == '.') ClickOnGadget(level_editor_gadget[GADGET_ID_SINGLE_ITEMS], button); else if (key == KSYM_Return ||