diff --git a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java index c9b04ad256..b7b1d2345d 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditorDialog.java +++ b/core/src/io/anuke/mindustry/editor/MapEditorDialog.java @@ -680,6 +680,11 @@ public class MapEditorDialog extends Dialog implements Disposable{ pane = new ScrollPane(content); pane.setFadeScrollBars(false); pane.setOverscroll(true, false); + pane.exited(() -> { + if(pane.hasScroll()){ + Core.scene.setScrollFocus(view); + } + }); ButtonGroup group = new ButtonGroup<>(); int i = 0; diff --git a/core/src/io/anuke/mindustry/editor/MapView.java b/core/src/io/anuke/mindustry/editor/MapView.java index 2e06352e49..c637e9b6f2 100644 --- a/core/src/io/anuke/mindustry/editor/MapView.java +++ b/core/src/io/anuke/mindustry/editor/MapView.java @@ -56,10 +56,16 @@ public class MapView extends Element implements GestureListener{ public boolean mouseMoved(InputEvent event, float x, float y){ mousex = x; mousey = y; + requestScroll(); return false; } + @Override + public void enter(InputEvent event, float x, float y, int pointer, Element fromActor){ + requestScroll(); + } + @Override public boolean touchDown(InputEvent event, float x, float y, int pointer, KeyCode button){ if(pointer != 0){