fixed using 'background.TOOLBOX', which was simply ignored before
[rocksndiamonds.git] / src / editor.c
index 6f2426752cf19529aee2ca23e9203426e8d5bdaa..367071bf811200b09eb96ee1312809b783a95ea3 100644 (file)
@@ -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: