mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-19 16:57:15 +07:00
Merge branches 'master' and 'unsector' of https://github.com/Anuken/Mindustry into unsector
This commit is contained in:
commit
5661124d86
@ -251,7 +251,7 @@ project(":net"){
|
|||||||
dependencies{
|
dependencies{
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
compile "org.lz4:lz4-java:1.4.1"
|
compile "org.lz4:lz4-java:1.4.1"
|
||||||
compile 'com.github.Anuken:kryonet:38ca8d51b5763ebe463ed973a63b64390ff51416'
|
compile 'com.github.Anuken:kryonet:a64d2280880e80566ca1bdaffa55de43e51cad38'
|
||||||
compile 'com.github.Anuken:WaifUPnP:05eb46bc577fd7674596946ba288c96c0cedd893'
|
compile 'com.github.Anuken:WaifUPnP:05eb46bc577fd7674596946ba288c96c0cedd893'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
|
|
||||||
public void clampScale(){
|
public void clampScale(){
|
||||||
float s = io.anuke.arc.scene.ui.layout.Unit.dp.scl(1f);
|
float s = io.anuke.arc.scene.ui.layout.Unit.dp.scl(1f);
|
||||||
targetscale = Mathf.clamp(targetscale, Math.round(s * 1), Math.round(s * 6));
|
targetscale = Mathf.clamp(targetscale, s * 2.5f, Math.round(s * 7));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void takeMapScreenshot(){
|
public void takeMapScreenshot(){
|
||||||
|
@ -47,6 +47,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
//gesture data
|
//gesture data
|
||||||
private Vector2 vector = new Vector2();
|
private Vector2 vector = new Vector2();
|
||||||
|
private float lastDistance = -1f;
|
||||||
private boolean canPan;
|
private boolean canPan;
|
||||||
/** Set of completed guides. */
|
/** Set of completed guides. */
|
||||||
private ObjectSet<String> guides = new ObjectSet<>();
|
private ObjectSet<String> guides = new ObjectSet<>();
|
||||||
@ -691,8 +692,11 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean zoom(float initialDistance, float distance){
|
public boolean zoom(float initialDistance, float distance){
|
||||||
float amount = (distance > initialDistance ? 0.1f : -0.1f) * Time.delta();
|
if(lastDistance == -1) lastDistance = initialDistance;
|
||||||
|
|
||||||
|
float amount = (distance > lastDistance ? 0.07f : -0.07f) * Time.delta();
|
||||||
renderer.scaleCamera(io.anuke.arc.scene.ui.layout.Unit.dp.scl(amount));
|
renderer.scaleCamera(io.anuke.arc.scene.ui.layout.Unit.dp.scl(amount));
|
||||||
|
lastDistance = distance;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user