From 5857c5a0a0f909f1dd9a0d1ddfd5481999290e24 Mon Sep 17 00:00:00 2001 From: Lance Ewing Date: Tue, 16 Apr 2024 07:21:38 +0100 Subject: [PATCH] Desktop will now exit full screen when back arrow clicked, since dialog won't show in full screen. --- .../java/com/agifans/agile/ui/GameScreenInputProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java b/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java index 837b921..5ba32a7 100644 --- a/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java +++ b/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java @@ -6,6 +6,7 @@ import com.badlogic.gdx.Graphics; import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.InputAdapter; +import com.badlogic.gdx.Application.ApplicationType; import com.badlogic.gdx.math.Vector2; /** @@ -405,6 +406,11 @@ else if ((touchXY.y > 0) && (touchXY.y < 128)) { } if (backArrowClicked) { + if (Gdx.app.getType().equals(ApplicationType.Desktop) && Gdx.graphics.isFullscreen()) { + // Dialog won't show for desktop unless we exit full screen, + switchOutOfFullScreen(); + } + dialogHandler.confirm("Are you sure you want to quit the game?", new ConfirmResponseHandler() { @Override