X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=367071bf811200b09eb96ee1312809b783a95ea3;hb=0e791f8acbb619ddcda4f77716ee31d4ec34ec16;hp=663234c9ef3f707f69e25e22bf183dd654ff74a0;hpb=e5f088d32c2d83dceac30b8668a3a4b646bf8d0a;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 663234c9..367071bf 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1047,7 +1047,7 @@ static struct { IMG_EDITOR_BUTTON_GFX_UNDO, GADGET_ID_UNDO, &editor.button.undo, GD_TYPE_NORMAL_BUTTON, - "undo/redo last operation", 'U' + "undo/redo last operation", 'u' }, { IMG_EDITOR_BUTTON_GFX_CONF, GADGET_ID_INFO, @@ -3351,7 +3351,10 @@ static int new_element3 = EL_SAND; #define BUTTON_ELEMENT(button) ((button) == 1 ? new_element1 : \ (button) == 2 ? new_element2 : \ (button) == 3 ? new_element3 : EL_EMPTY) -#define BUTTON_STEPSIZE(button) ((button) == 1 ? 1 : (button) == 2 ? 5 : 10) +#define BUTTON_STEPSIZE(button) ((button) == 1 ? 1 : \ + (button) == 2 ? 5 : \ + (button) == 3 ? 10 : \ + (button)) /* forward declaration for internal use */ static void ModifyEditorCounterValue(int, int); @@ -7568,8 +7571,10 @@ void DrawLevelEd() DrawSpecialEditorDoor(); /* draw new control window */ - BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto, - DOOR_GFX_PAGEX8, 236, EXSIZE, EYSIZE, EX, EY); + BlitBitmap(graphic_info[IMG_BACKGROUND_TOOLBOX].bitmap, drawto, + graphic_info[IMG_BACKGROUND_TOOLBOX].src_x, + graphic_info[IMG_BACKGROUND_TOOLBOX].src_y, + EXSIZE, EYSIZE, EX, EY); // redraw_mask |= REDRAW_ALL; @@ -11747,11 +11752,11 @@ void HandleLevelEditorKeyInput(Key key) break; case KSYM_Page_Up: id = GADGET_ID_SCROLL_LIST_UP; - button = MB_RIGHTBUTTON; + button = ED_ELEMENTLIST_BUTTONS_VERT - 1; break; case KSYM_Page_Down: id = GADGET_ID_SCROLL_LIST_DOWN; - button = MB_RIGHTBUTTON; + button = ED_ELEMENTLIST_BUTTONS_VERT - 1; break; case KSYM_Home: @@ -11833,11 +11838,13 @@ void HandleLevelEditorKeyInput(Key key) ClickOnGadget(level_editor_gadget[GADGET_ID_PROPERTIES], button); else if (letter == '.') ClickOnGadget(level_editor_gadget[GADGET_ID_SINGLE_ITEMS], button); - else if (letter == 'R') + else if (letter == 'U') ClickOnGadget(level_editor_gadget[GADGET_ID_UNDO], 3); - else if (letter == '0') + else if (key == KSYM_KP_Subtract) + ClickOnGadget(level_editor_gadget[GADGET_ID_ZOOM], 1); + else if (key == KSYM_KP_0 || letter == '0') ClickOnGadget(level_editor_gadget[GADGET_ID_ZOOM], 2); - else if (letter == '+') + else if (key == KSYM_KP_Add || letter == '+') ClickOnGadget(level_editor_gadget[GADGET_ID_ZOOM], 3); else if (key == KSYM_Return || key == KSYM_space || @@ -11911,7 +11918,7 @@ void PrintEditorGadgetInfoText(struct GadgetInfo *gi) else if (gi->custom_id == GADGET_ID_TEST) sprintf(shortcut, " ('Enter' or 'Shift-%c')", key); else if (gi->custom_id == GADGET_ID_UNDO) - sprintf(shortcut, " ('Shift-%c/R')", key); + sprintf(shortcut, " ('%c/Shift-U')", key); else if (gi->custom_id == GADGET_ID_ZOOM) sprintf(shortcut, " ('%c', '0', '+')", key); else