libGDX 1.11.0 (#972)
This commit is contained in:
parent
43cfcd4a81
commit
36e4116d39
@ -6,7 +6,7 @@ allprojects {
|
||||
group = 'org.mapsforge'
|
||||
version = 'master-SNAPSHOT'
|
||||
|
||||
ext.gdxVersion = "1.9.10"
|
||||
ext.gdxVersion = "1.11.0"
|
||||
ext.gwtVersion = "2.8.2"
|
||||
ext.slf4jVersion = "1.7.28"
|
||||
|
||||
@ -32,12 +32,12 @@ def versionName() { return version }
|
||||
|
||||
subprojects {
|
||||
tasks.withType(JavaCompile) {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
options.encoding = 'UTF-8'
|
||||
if (JavaVersion.current().isJava9Compatible()) {
|
||||
if (!project.properties.containsKey('android')) {
|
||||
options.compilerArgs.addAll(['--release', '7'])
|
||||
options.compilerArgs.addAll(['--release', '8'])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class GdxModelRenderer extends LayerRenderer {
|
||||
cam = new MapCamera(mMap);
|
||||
|
||||
renderContext =
|
||||
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
|
||||
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.LRU, 1));
|
||||
|
||||
// shader = new DefaultShader(renderable.material,
|
||||
// renderable.mesh.getVertexAttributes(), true, false, 1, 0, 0, 0);
|
||||
|
@ -61,7 +61,7 @@ public class GdxRenderer3D extends LayerRenderer {
|
||||
cam = new MapCamera(mMap);
|
||||
|
||||
renderContext =
|
||||
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
|
||||
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.LRU, 1));
|
||||
|
||||
// shader = new DefaultShader(renderable.material,
|
||||
// renderable.mesh.getVertexAttributes(), true, false, 1, 0, 0, 0);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -135,10 +135,10 @@ public class MapApplicationAdapter extends ApplicationAdapter {
|
||||
InputMultiplexer mux = new InputMultiplexer();
|
||||
mux.addProcessor(new MotionHandler(map) {
|
||||
@Override
|
||||
public boolean scrolled(int amount) {
|
||||
super.scrolled(amount);
|
||||
public boolean scrolled(float amountX, float amountY) {
|
||||
super.scrolled(amountX, amountY);
|
||||
MapPosition mapPosition = map.getMapPosition();
|
||||
int zoomLevel = mapPosition.getZoomLevel() - amount;
|
||||
int zoomLevel = (int) (mapPosition.getZoomLevel() - amountY);
|
||||
mapPosition.setZoomLevel(zoomLevel);
|
||||
map.setMapPosition(mapPosition);
|
||||
bothMapPositionHandler.mapPositionChangedFromVtmMap(mapPosition);
|
||||
|
Loading…
x
Reference in New Issue
Block a user