mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Support prompting to exit on back with home screen as backdrop
This commit is contained in:
@@ -383,6 +383,10 @@ public abstract class FScreen extends FContainer {
|
|||||||
if (keyCode == Keys.ESCAPE || keyCode == Keys.BACK) {
|
if (keyCode == Keys.ESCAPE || keyCode == Keys.BACK) {
|
||||||
if (Forge.endKeyInput()) { return true; }
|
if (Forge.endKeyInput()) { return true; }
|
||||||
|
|
||||||
|
if (Forge.isLandscapeMode() && getLandscapeBackdropScreen() == HomeScreen.instance) {
|
||||||
|
Forge.exit(false); //prompt to exit if attempting to go back from screen with home screen as backdrop
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Forge.back(); //go back on escape by default
|
Forge.back(); //go back on escape by default
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user