libGDX 应用程序必须实现 .resize(int width, int height) 方法,所以我认为调整 libGDX 应用程序的大小并不是什么大问题,但我发现无法制作实际的应用程序 JFrame 或任何可拖动的东西使用 JFrame.setResizable(true).这对 libGDX 来说是不可能的吗?
libGDX Applications must implement the .resize(int width, int height) method, so I figured that resizing a libGDX app is not a big deal, but I found no way to make the actual application JFrame or whatever that is draggable as with JFrame.setResizable(true). Is that simply not possible with libGDX ?
如果你的桌面应用使用 gdx-backend-lwjgl,那么你可以使用:
If you use gdx-backend-lwjgl for you desktop app, then you can use:
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.resizable = true;
new LwjglApplication(new YourGame(), config);
使用来自 SVN 中继的最新源.
Use newest source from SVN trunk.
这篇关于如何使 libGDX 桌面应用程序可调整大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何创建漩涡/漩涡效果?How to create whirlpool/vortex effect?(如何创建漩涡/漩涡效果?)
Android/Java - GoogleMaps FragmentActivity 上的自定义视图Android/Java - Custom View on GoogleMaps FragmentActivity isnt shown(Android/Java - GoogleMaps FragmentActivity 上的自定义视图未显示)
LibGdx 2 半屏“按钮"LibGdx 2 half screen quot;buttonsquot;(LibGdx 2 半屏“按钮)
libgdx 剪切图像libgdx Cutting an image(libgdx 剪切图像)
如何在启动 Android LibGDX 项目时修复 NoClassDefFounHow do I fix a NoClassDefFoundError while launching Android LibGDX Project?(如何在启动 Android LibGDX 项目时修复 NoClassDefFoundError?)
如何让玩家通过相机被摧毁?How to make player get destroyed through camera?(如何让玩家通过相机被摧毁?)