Fixed scrolling player menu causing panning on mobile

This commit is contained in:
Anuken
2018-05-20 11:47:20 -04:00
parent 8ca861360b
commit 0e35bb4852
3 changed files with 4 additions and 3 deletions

View File

@ -20,7 +20,7 @@ import io.anuke.kryonet.DefaultThreadImpl;
import io.anuke.kryonet.KryoClient;
import io.anuke.kryonet.KryoServer;
import io.anuke.mindustry.core.ThreadHandler.ThreadProvider;
import io.anuke.mindustry.io.Platform;
import io.anuke.mindustry.core.Platform;
import io.anuke.mindustry.net.Net;
import io.anuke.ucore.core.Settings;
import io.anuke.ucore.scene.ui.TextField;

View File

@ -46,9 +46,9 @@ public class GestureHandler extends GestureAdapter{
public boolean pan(float x, float y, float deltaX, float deltaY){
if(control.showCursor() && !Inputs.keyDown("select")) return false;
if(!control.showCursor() && !(control.input().recipe != null
if((!control.showCursor() && !(control.input().recipe != null
&& control.input().placeMode.lockCamera && state.inventory.hasItems(control.input().recipe.requirements)) &&
!(control.input().recipe == null && control.input().breakMode.lockCamera)){
!(control.input().recipe == null && control.input().breakMode.lockCamera)) && !ui.hasMouse(x, y)){
float dx = deltaX*Core.camera.zoom/Core.cameraScale, dy = deltaY*Core.camera.zoom/Core.cameraScale;
player.x -= dx;
player.y += dy;

View File

@ -33,6 +33,7 @@ public class PlayerListFragment implements Fragment{
public void build(){
new table(){{
new table("pane"){{
touchable(Touchable.enabled);
margin(14f);
new label(() -> Bundles.format(playerGroup.size() == 1 ? "text.players.single" :
"text.players", playerGroup.size()));