Editor scroll fix

This commit is contained in:
Anuken 2019-09-30 21:45:25 -04:00
parent 65290dc2bf
commit c9e969c7b4
2 changed files with 11 additions and 0 deletions

View File

@ -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<ImageButton> group = new ButtonGroup<>();
int i = 0;

View File

@ -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){