2016-08-02 91 views
-1

我想在我的LibGDX桌面應用程序中設置全屏窗口模式,但窗口仍然是裝飾的。這裏是我的代碼:LibGDX全屏窗口模式有邊框

public class DesktopLauncher { 
    public static void main (String[] arg) { 
     LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); 
     System.setProperty("org.lwjgl.opengl.Window.undecorated", "true"); 
     config.width = LwjglApplicationConfiguration.getDesktopDisplayMode().width; 
     config.height = LwjglApplicationConfiguration.getDesktopDisplayMode().height; 
     config.fullscreen = false; 
     new LwjglApplication(new EnvironmentTest(), config); 
    } 
} 

我錯過了什麼嗎?該窗口如下所示:

enter image description here

正如你可以看到有圖像周圍去邊框。此外,邊界繼續到下一個監視器。

+0

窗口模式具有邊框那名字。邊框標題欄,關閉,調整大小,最小化按鈕..這是窗口模式,但我想你只是用了一個錯誤的術語。 – eldo

+0

我想你從未聽說過遊戲中的全屏窗口模式?因爲在遊戲中,全屏窗口模式指的是沒有邊框的全屏窗口。通過這種方式,它可以方便地進入和退出,並且仍然是全屏顯示。 –

回答

1

要解決此問題請確保您有這行代碼:

config.resizable = false;