fixed using 'PageUp' and 'PageDown' keys for element list in editor
authorHolger Schemel <info@artsoft.org>
Mon, 23 Feb 2015 22:20:46 +0000 (23:20 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 23 Feb 2015 22:20:46 +0000 (23:20 +0100)
ChangeLog
src/editor.c

index dc189929dc557c4053256089ce2156b3c911d8cd..79172b1c0d63382ae7636ea1dfc17c1124e498e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2015-02-23
        * added key pad '-', '+' and '0' keys to zoom function in level editor
        * changed editor key shortcut for undo/redo to 'u' and 'Shift-u'
+       * fixed using 'PageUp' and 'PageDown' keys for element list in editor
 
 2015-02-21
        * added 1%, 2% and 5% to volume controls for sound and music settings
index 6f2426752cf19529aee2ca23e9203426e8d5bdaa..81d189decd0a7b1ba08ddddd291c4441abac2e59 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);
@@ -11747,11 +11750,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: