mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 20:48:33 +07:00
Editor scroll fix
This commit is contained in:
parent
65290dc2bf
commit
c9e969c7b4
@ -680,6 +680,11 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
pane = new ScrollPane(content);
|
pane = new ScrollPane(content);
|
||||||
pane.setFadeScrollBars(false);
|
pane.setFadeScrollBars(false);
|
||||||
pane.setOverscroll(true, false);
|
pane.setOverscroll(true, false);
|
||||||
|
pane.exited(() -> {
|
||||||
|
if(pane.hasScroll()){
|
||||||
|
Core.scene.setScrollFocus(view);
|
||||||
|
}
|
||||||
|
});
|
||||||
ButtonGroup<ImageButton> group = new ButtonGroup<>();
|
ButtonGroup<ImageButton> group = new ButtonGroup<>();
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -56,10 +56,16 @@ public class MapView extends Element implements GestureListener{
|
|||||||
public boolean mouseMoved(InputEvent event, float x, float y){
|
public boolean mouseMoved(InputEvent event, float x, float y){
|
||||||
mousex = x;
|
mousex = x;
|
||||||
mousey = y;
|
mousey = y;
|
||||||
|
requestScroll();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void enter(InputEvent event, float x, float y, int pointer, Element fromActor){
|
||||||
|
requestScroll();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean touchDown(InputEvent event, float x, float y, int pointer, KeyCode button){
|
public boolean touchDown(InputEvent event, float x, float y, int pointer, KeyCode button){
|
||||||
if(pointer != 0){
|
if(pointer != 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user