Zoom fixes

This commit is contained in:
Anuken 2019-01-04 11:39:49 -05:00
parent e24d96da6f
commit f61f3af687
2 changed files with 2 additions and 2 deletions

View File

@ -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(){

View File

@ -691,7 +691,7 @@ 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(); float amount = (distance > initialDistance ? 0.1f : -0.1f);
renderer.scaleCamera(io.anuke.arc.scene.ui.layout.Unit.dp.scl(amount)); renderer.scaleCamera(io.anuke.arc.scene.ui.layout.Unit.dp.scl(amount));
return true; return true;
} }