2016-02-27 26 views
5

私は彼にゲームをプレイさせたいという選択肢をユーザーに与えようとします。ウィンドウモードとフルスクリーンモードは問題ありません。私が働かないように見えるのは、ボーダーレスのフルスクリーン/ウィンドウフルスクリーンです。 私はウェブを検索し、私を助けた唯一のサイトが見つかりました:私は、一番下にあるウィンドウ10ツールバーが常にあり、私の問題があり、言われ、私はそれがちょっとうまくいくと思うたように私がやったlibgdxボーダーレス全画面

http://badlogicgames.com/forum/viewtopic.php?f=11&t=13863

を窓の正面。ここ それがどのように見えるかの写真:

http://imgur.com/hdA3LAb

色がちょうどテストの目的のために、ひどいです。コードは次のようになります。

if (screenManager.FULLSCREEN) { 
    Gdx.graphics.setDisplayMode(Gdx.graphics.getDesktopDisplayMode().width, Gdx.graphics.getDesktopDisplayMode().height, true); 
} else if (screenManager.WINDOWEDFULLSCREEN) { 
    System.setProperty("org.lwjgl.opengl.Window.undecorated", "true"); 
    Gdx.graphics.setDisplayMode(Gdx.graphics.getDesktopDisplayMode().width, 
    Gdx.graphics.getDesktopDisplayMode().height, false); 
} else { 
    Gdx.graphics.setDisplayMode(screenManager.WIDTH, screenManager.HEIGTH, false); 
} 

どうすればこの問題を解決できますか?

編集: 1.9.2に更新されましたが、setDisplayModeメソッドはありません。 コードは次のようになります。

DisplayMode mode = Gdx.graphics.getDisplayMode(); 
if (screenManager.FULLSCREEN) { 
    Gdx.graphics.setWindowedMode(Gdx.graphics.getDisplayMode().width, Gdx.graphics.getDisplayMode().height); 
    Gdx.graphics.setFullscreenMode(mode); 
} else if (screenManager.WINDOWEDFULLSCREEN) { 
    System.setProperty("org.lwjgl.opengl.Window.undecorated", "true"); 
    Gdx.graphics.setWindowedMode(Gdx.graphics.getDisplayMode().width, Gdx.graphics.getDisplayMode().height); 
    //Gdx.graphics.setFullscreenMode(mode); 
} else { 
    Gdx.graphics.setWindowedMode(screenManager.WIDTH, screenManager.HEIGTH); 
} 

すべてがちょうどボーダレスフルスクリーンだけの絵のように、それのインフロントウインドウのツールバー(ボタン上のもの)を持って、前のように動作します。通常のフルスクリーンが正常に動作します。

+0

ウィンドウアプリケーションの境界線を削除しますか?その場合は、「ウィンドウアプリケーションからボーダーを削除する方法」を試してみてください。以来、あなたはあなたの質問の混乱に多くの人々を混乱させています。質問をしたり、無関係なものをすべて外したりするときは、具体的にしてください。 – Madmenyo

+0

@MennoGouwコードは実際にはすでに境界線を取り除いています... – LePotatoCannon

答えて

4

ただのWindows 10で私のマシン上で以下の設定をテストし、それが働いた:

public class DesktopLauncher { 
    public static void main (String[] arg) { 
     LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); 
     config.width = LwjglApplicationConfiguration.getDesktopDisplayMode().width; 
     config.height = LwjglApplicationConfiguration.getDesktopDisplayMode().height; 
     config.fullscreen = true; 
     new LwjglApplication(new MyGame(), config); 
    } 
} 

あなたはデスクトップモジュールにDesktopLauncher

UPDATE
ていることに設定する必要がありますが、試してみてください:

Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); 

また、どのバージョンのLib GDXを使用していますか?私はバージョン1.8.0です。私はGdx.graphics.setDisplayMode()メソッドを持っていません。

+0

私がこれを好きなら、ゲームは常にフルスクリーンになります。しかし、ユーザーはフルスクリーン、ウィンドウフルスクリーン、ウィンドウモードから選択できるはずです... – LePotatoCannon

+0

@LePotatoCannon更新された回答を参照 – Enigo

+0

私は1.6.0を持っています、フルスクリーンモードが動作します、私はウィンドウ全体の画面に問題があります。 mean ... – LePotatoCannon