mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-19 16:57:15 +07:00
Zoom fixes
This commit is contained in:
parent
e24d96da6f
commit
f61f3af687
@ -297,7 +297,7 @@ public class Renderer implements ApplicationListener{
|
||||
|
||||
public void clampScale(){
|
||||
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(){
|
||||
|
@ -691,7 +691,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
@Override
|
||||
public boolean zoom(float initialDistance, float distance){
|
||||
float amount = (distance > initialDistance ? 0.1f : -0.1f) * Time.delta();
|
||||
float amount = (distance > initialDistance ? 0.1f : -0.1f);
|
||||
renderer.scaleCamera(io.anuke.arc.scene.ui.layout.Unit.dp.scl(amount));
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user