From 753225dadc348905deb53998f3512293feeb13f2 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 23 Feb 2015 23:20:46 +0100 Subject: [PATCH] fixed using 'PageUp' and 'PageDown' keys for element list in editor --- ChangeLog | 1 + src/editor.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc189929..79172b1c 100644 --- 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 diff --git a/src/editor.c b/src/editor.c index 6f242675..81d189de 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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: -- 2.34.1