Skip to content

Commit f479f12

Browse files
committed
chore: resize down when exiting fullscreen mode
1 parent 363d3ba commit f479f12

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/main/java/tbooop/view/InputManagerImpl.java

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public void handleInput(final Optional<Keybinds> keybind) {
8585
case SHOOT_LEFT -> sendCommand(new ShootCommand(CardinalDirection.LEFT));
8686
case SHOOT_RIGHT -> sendCommand(new ShootCommand(CardinalDirection.RIGHT));
8787
case FULLSCREEN -> view.getStage().setFullScreen(!view.getStage().isFullScreen());
88+
case EXIT_FULLSCREEN -> resizeWindow(false);
8889
case ZOOM_IN -> resizeWindow(true);
8990
case ZOOM_OUT -> resizeWindow(false);
9091
default -> {

src/main/java/tbooop/view/api/Keybinds.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ public enum Keybinds {
6161
/**
6262
* Keybind for toggling fullscreen mode.
6363
*/
64-
FULLSCREEN(KeyCode.F11);
64+
FULLSCREEN(KeyCode.F11),
65+
66+
/**
67+
* Keybind for exiting fullscreen mode.
68+
*/
69+
EXIT_FULLSCREEN(KeyCode.ESCAPE);
6570

6671
private final KeyCode keyCode;
6772

0 commit comments

Comments
 (0)