From 1c428c3e9e9625ec4a0fbec9129138baf3cf8a63 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 18 Mar 2015 20:10:38 +0100 Subject: [PATCH] improved responsiveness of playfield scrolling in editor --- src/editor.c | 6 ++++++ src/events.c | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/editor.c b/src/editor.c index 89e82bce..632810d3 100644 --- a/src/editor.c +++ b/src/editor.c @@ -11475,12 +11475,18 @@ static void HandleControlButtons(struct GadgetInfo *gi) case GADGET_ID_SCROLL_HORIZONTAL: level_xpos = gi->event.item_position - 1; + DrawEditorLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + BackToFront(); + break; case GADGET_ID_SCROLL_VERTICAL: level_ypos = gi->event.item_position - 1; + DrawEditorLevel(ed_fieldx, ed_fieldy, level_xpos, level_ypos); + BackToFront(); + break; case GADGET_ID_SCROLL_LIST_UP: diff --git a/src/events.c b/src/events.c index b2bf0979..d599dde4 100644 --- a/src/events.c +++ b/src/events.c @@ -108,9 +108,8 @@ boolean SkipPressedMouseMotionEvent(const Event *event) if (event->type != EVENT_MOTIONNOTIFY) return FALSE; - /* only skip motion events with pressed button outside level editor */ - if (button_status == MB_RELEASED || - game_status == GAME_MODE_EDITOR || game_status == GAME_MODE_PLAYING) + /* only skip motion events with pressed button outside the game */ + if (button_status == MB_RELEASED || game_status == GAME_MODE_PLAYING) return FALSE; if (PendingEvent()) -- 2.34.1