Back button quitting

This commit is contained in:
Anuken
2019-03-31 13:16:43 -04:00
parent 801eadd8a8
commit c278c632b3
3 changed files with 14 additions and 0 deletions

View File

@ -310,6 +310,10 @@ public class Control implements ApplicationListener{
if(!state.isPaused()){
Time.update();
}
if(!scene.hasDialog() && Core.input.keyTap(KeyCode.BACK)){
Platform.instance.hide();
}
}
}
}

View File

@ -69,6 +69,9 @@ public abstract class Platform {
*/
public void showFileChooser(String text, String content, Consumer<FileHandle> cons, boolean open, String filetype){}
/**Hide the app. Android only.*/
public void hide(){}
/**Forces the app into landscape mode. Currently Android only.*/
public void beginForceLandscape(){}