如何使libGDX Desktop应用程序可调整大小? [英] How do I make a libGDX Desktop application resizable?
本文介绍了如何使libGDX Desktop应用程序可调整大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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 Desktop应用程序可调整大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文