Death to unit.dp
This commit is contained in:
@@ -121,7 +121,7 @@ public class AndroidInput extends InputHandler{
|
||||
public void update(){
|
||||
enableHold = player.breakMode == PlaceMode.holdDelete;
|
||||
|
||||
if(enableHold && player.recipe != null && Gdx.input.isTouched(0) && Mathf.near2d(lmousex, lmousey, Gdx.input.getX(0), Gdx.input.getY(0), Unit.dp.inPixels(50))
|
||||
if(enableHold && Gdx.input.isTouched(0) && Mathf.near2d(lmousex, lmousey, Gdx.input.getX(0), Gdx.input.getY(0), Unit.dp.scl(50))
|
||||
&& !ui.hasMouse()){
|
||||
warmup += Timers.delta();
|
||||
|
||||
|
||||
@@ -83,9 +83,9 @@ public class GestureHandler extends GestureAdapter{
|
||||
initzoom = initialDistance;
|
||||
}
|
||||
|
||||
if(Math.abs(distance - initzoom) > Unit.dp.inPixels(100f) && !zoomed){
|
||||
if(Math.abs(distance - initzoom) > Unit.dp.scl(100f) && !zoomed){
|
||||
int amount = (distance > initzoom ? 1 : -1);
|
||||
renderer.scaleCamera(Math.round(Unit.dp.inPixels(amount)));
|
||||
renderer.scaleCamera(Math.round(Unit.dp.scl(amount)));
|
||||
initzoom = distance;
|
||||
zoomed = true;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user