libGDX 1.11.0 (#972)

This commit is contained in:
Wolfgang Schramm
2022-11-11 16:52:29 +01:00
committed by Emux
parent 43cfcd4a81
commit 36e4116d39
6 changed files with 13 additions and 12 deletions

View File

@@ -255,10 +255,10 @@ public class InputHandler implements InputProcessor {
}
@Override
public boolean scrolled(int amount) {
public boolean scrolled(float amountX, float amountY) {
float fx = mPosX - mMap.getWidth() / 2;
float fy = mPosY - mMap.getHeight() / 2;
mMap.animator().animateZoom(250, amount > 0 ? 0.75f : 1.333f, fx, fy, Easing.Type.LINEAR);
mMap.animator().animateZoom(250, amountY > 0 ? 0.75f : 1.333f, fx, fy, Easing.Type.LINEAR);
mMap.updateMap(false);
return true;
}
@@ -276,4 +276,5 @@ public class InputHandler implements InputProcessor {
}
return false;
}
}

View File

@@ -211,7 +211,7 @@ public class MotionHandler extends MotionEvent implements InputProcessor {
}
@Override
public boolean scrolled(int amount) {
public boolean scrolled(float amountX, float amountY) {
mTime = Gdx.input.getCurrentEventTime();
return false;