Pan tweak
This commit is contained in:
@@ -45,6 +45,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
//gesture data
|
//gesture data
|
||||||
private Vector2 vector = new Vector2();
|
private Vector2 vector = new Vector2();
|
||||||
|
private boolean canPan;
|
||||||
private boolean zoomed = false;
|
private boolean zoomed = false;
|
||||||
/** Set of completed guides. */
|
/** Set of completed guides. */
|
||||||
private ObjectSet<String> guides = new ObjectSet<>();
|
private ObjectSet<String> guides = new ObjectSet<>();
|
||||||
@@ -650,7 +651,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean pan(float x, float y, float deltaX, float deltaY){
|
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!
|
//can't pan in line mode with one finger or while dropping items!
|
||||||
if((lineMode && !Gdx.input.isTouched(1)) || droppingItem){
|
if((lineMode && !Gdx.input.isTouched(1)) || droppingItem){
|
||||||
@@ -704,6 +705,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean touchDown(float x, float y, int pointer, int button){
|
public boolean touchDown(float x, float y, int pointer, int button){
|
||||||
|
canPan = !ui.hasMouse();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ public class JoinDialog extends FloatingDialog{
|
|||||||
local.background("button");
|
local.background("button");
|
||||||
local.add("$text.hosts.none").pad(10f);
|
local.add("$text.hosts.none").pad(10f);
|
||||||
local.add().growX();
|
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{
|
}else{
|
||||||
local.background((Drawable) null);
|
local.background((Drawable) null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user