Fixed buggy mobile zoom

This commit is contained in:
Anuken
2018-09-21 09:02:25 -04:00
parent 6a6e80b6d8
commit 7937d99a73
2 changed files with 5 additions and 18 deletions

View File

@@ -75,6 +75,7 @@ public class SectorsDialog extends FloatingDialog{
addListener(new InputListener(){
@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button){
if(pointer != 0) return false;
Cursors.setHand();
lastX = x;
lastY = y;
@@ -83,6 +84,7 @@ public class SectorsDialog extends FloatingDialog{
@Override
public void touchDragged(InputEvent event, float x, float y, int pointer){
if(pointer != 0) return;
panX -= x - lastX;
panY -= y - lastY;
@@ -92,6 +94,7 @@ public class SectorsDialog extends FloatingDialog{
@Override
public void touchUp(InputEvent event, float x, float y, int pointer, int button){
if(pointer != 0) return;
Cursors.restoreCursor();
}
});