Fixed scrolling player menu causing panning on mobile
This commit is contained in:
@@ -20,7 +20,7 @@ import io.anuke.kryonet.DefaultThreadImpl;
|
|||||||
import io.anuke.kryonet.KryoClient;
|
import io.anuke.kryonet.KryoClient;
|
||||||
import io.anuke.kryonet.KryoServer;
|
import io.anuke.kryonet.KryoServer;
|
||||||
import io.anuke.mindustry.core.ThreadHandler.ThreadProvider;
|
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.mindustry.net.Net;
|
||||||
import io.anuke.ucore.core.Settings;
|
import io.anuke.ucore.core.Settings;
|
||||||
import io.anuke.ucore.scene.ui.TextField;
|
import io.anuke.ucore.scene.ui.TextField;
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ public class GestureHandler extends GestureAdapter{
|
|||||||
public boolean pan(float x, float y, float deltaX, float deltaY){
|
public boolean pan(float x, float y, float deltaX, float deltaY){
|
||||||
if(control.showCursor() && !Inputs.keyDown("select")) return false;
|
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().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;
|
float dx = deltaX*Core.camera.zoom/Core.cameraScale, dy = deltaY*Core.camera.zoom/Core.cameraScale;
|
||||||
player.x -= dx;
|
player.x -= dx;
|
||||||
player.y += dy;
|
player.y += dy;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class PlayerListFragment implements Fragment{
|
|||||||
public void build(){
|
public void build(){
|
||||||
new table(){{
|
new table(){{
|
||||||
new table("pane"){{
|
new table("pane"){{
|
||||||
|
touchable(Touchable.enabled);
|
||||||
margin(14f);
|
margin(14f);
|
||||||
new label(() -> Bundles.format(playerGroup.size() == 1 ? "text.players.single" :
|
new label(() -> Bundles.format(playerGroup.size() == 1 ? "text.players.single" :
|
||||||
"text.players", playerGroup.size()));
|
"text.players", playerGroup.size()));
|
||||||
|
|||||||
Reference in New Issue
Block a user