📅  最后修改于: 2022-03-11 14:48:45.888000             🧑  作者: Mango
if (Gdx.input.isKeyPressed(Input.Keys.TAB)){
Boolean fullScreen = Gdx.graphics.isFullscreen();
Graphics.DisplayMode currentMode = Gdx.graphics.getDisplayMode();
if (fullScreen == true)
Gdx.graphics.setWindowedMode(currentMode.width, currentMode.height);
else
Gdx.graphics.setFullscreenMode(currentMode);
}