From: Holger Schemel Date: Wed, 18 Mar 2015 19:10:38 +0000 (+0100) Subject: improved responsiveness of playfield scrolling in editor X-Git-Tag: 4.0.0.0-rc1~234 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=1c428c3e9e9625ec4a0fbec9129138baf3cf8a63 improved responsiveness of playfield scrolling in editor --- 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())