如何使 LibGDX 桌面默认全屏 [英] How to make LibGDX Desktop go fullscreen by default

查看:22
本文介绍了如何使 LibGDX 桌面默认全屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部.只是想知道如何让我的桌面应用程序在启动时全屏显示.我是 LibGDX 的新手,非常感谢任何帮助.谢谢.

all. Just wondering how to make my desktop app go fullscreen upon start up. I am new to LibGDX and any help is greatly appreciated. Thank you.

推荐答案

只需在 LwjglApplicationConfiguration 中定义 fullscreen 字段:

Just define fullscreen field in your LwjglApplicationConfiguration:

LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();

cfg.title = "yourGame";
cfg.width = 1024;
cfg.height = 768;
cfg.fullscreen = true;

new LwjglApplication(new ...(), cfg);

这篇关于如何使 LibGDX 桌面默认全屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆