Skip to content

Commit

Permalink
Added autoclosing of virtual keyboard when switching to and from full…
Browse files Browse the repository at this point in the history
… screen.
  • Loading branch information
lanceewing committed Mar 17, 2024
1 parent ae45c36 commit 9114872
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,13 @@ public boolean touchUp(int screenX, int screenY, int pointer, int button) {
if (fullScreenClicked) {
Boolean fullScreen = Gdx.graphics.isFullscreen();
if (fullScreen == true) {
if (screenWidthBeforeFullScreen > screenHeightBeforeFullScreen) {
keyboardType = KeyboardType.OFF;
}
Gdx.graphics.setWindowedMode(screenWidthBeforeFullScreen, screenHeightBeforeFullScreen);
}
else {
keyboardType = KeyboardType.OFF;
Graphics.DisplayMode currentMode = Gdx.graphics.getDisplayMode();
screenWidthBeforeFullScreen = Gdx.graphics.getWidth();
screenHeightBeforeFullScreen = Gdx.graphics.getHeight();
Expand Down

0 comments on commit 9114872

Please sign in to comment.