improved responsiveness of playfield scrolling in editor
authorHolger Schemel <info@artsoft.org>
Wed, 18 Mar 2015 19:10:38 +0000 (20:10 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 18 Mar 2015 19:10:38 +0000 (20:10 +0100)
src/editor.c
src/events.c

index 89e82bceb61db1673d07add0a97b864cbccf29b8..632810d3f2b3fd854475aeb5e39cb12177983d3e 100644 (file)
@@ -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:
index b2bf0979495a2b8e139f49bd043c5cfef18641e3..d599dde4ba1ee695dcd450730cb23da75074bdef 100644 (file)
@@ -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())