mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-03-13 19:39:14 +07:00
Bound ESCAPE to reset camera zoom and position to origin
This commit is contained in:
parent
0e5fc03f31
commit
daedefa04f
@ -35,6 +35,7 @@ import com.riiablo.tool.LwjglTool;
|
||||
import com.riiablo.tool.Tool;
|
||||
import com.riiablo.util.InstallationFinder;
|
||||
|
||||
import static com.badlogic.gdx.Input.Keys.ESCAPE;
|
||||
import static com.badlogic.gdx.Input.Keys.GRAVE;
|
||||
import static com.riiablo.map2.util.DebugMode.TILE;
|
||||
|
||||
@ -150,6 +151,12 @@ public class MapDebugger extends Tool {
|
||||
case GRAVE:
|
||||
debugMode = debugMode.next;
|
||||
return true;
|
||||
case ESCAPE:
|
||||
camera.zoom = 1.0f;
|
||||
camera.setToOrtho(false); // calls camera#update()
|
||||
camera.position.set(0, 0, 0);
|
||||
camera.update(); // required due to camera.position.set(Vector3) call
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user