GdxMap: support onKeyUp (#1000)
This commit is contained in:
parent
1207262c72
commit
eef08827e5
@ -26,7 +26,6 @@ import com.badlogic.gdx.graphics.glutils.GLVersion;
|
||||
import com.badlogic.gdx.input.GestureDetector;
|
||||
import com.badlogic.gdx.utils.Timer;
|
||||
import com.badlogic.gdx.utils.Timer.Task;
|
||||
|
||||
import org.oscim.layers.TileGridLayer;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||
@ -150,6 +149,10 @@ public abstract class GdxMap implements ApplicationListener {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean onKeyUp(int keycode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Map getMap() {
|
||||
return mMap;
|
||||
}
|
||||
|
@ -172,6 +172,9 @@ public class InputHandler implements InputProcessor {
|
||||
|
||||
@Override
|
||||
public boolean keyUp(int keycode) {
|
||||
if (mGdxApp.onKeyUp(keycode))
|
||||
return true;
|
||||
|
||||
switch (keycode) {
|
||||
case Input.Keys.SHIFT_LEFT:
|
||||
case Input.Keys.SHIFT_RIGHT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user