Pan tweak

This commit is contained in:
Anuken 2018-11-28 14:00:51 -05:00
parent aa626947ed
commit e2e6024e8f
2 changed files with 4 additions and 2 deletions

View file

@ -45,6 +45,7 @@ public class MobileInput extends InputHandler implements GestureListener{
//gesture data
private Vector2 vector = new Vector2();
private boolean canPan;
private boolean zoomed = false;
/** Set of completed guides. */
private ObjectSet<String> guides = new ObjectSet<>();
@ -650,7 +651,7 @@ public class MobileInput extends InputHandler implements GestureListener{
@Override
public boolean pan(float x, float y, float deltaX, float deltaY){
if(ui.hasMouse()) return false;
if(!canPan) return false;
//can't pan in line mode with one finger or while dropping items!
if((lineMode && !Gdx.input.isTouched(1)) || droppingItem){
@ -704,6 +705,7 @@ public class MobileInput extends InputHandler implements GestureListener{
@Override
public boolean touchDown(float x, float y, int pointer, int button){
canPan = !ui.hasMouse();
return false;
}

View file

@ -258,7 +258,7 @@ public class JoinDialog extends FloatingDialog{
local.background("button");
local.add("$text.hosts.none").pad(10f);
local.add().growX();
local.addImageButton("icon-loading", 16 * 2f, this::refreshLocal).pad(-10f).padLeft(0).padTop(-6).size(70f, 74f);
local.addImageButton("icon-loading", 16 * 2f, this::refreshLocal).pad(-12f).padLeft(0).size(70f);
}else{
local.background((Drawable) null);
}