How do I make a libGDX Desktop application resizable?

喜你入骨 提交于 2019-12-01 07:34:06

问题


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 ?


回答1:


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);

Use newest source from SVN trunk.



来源:https://stackoverflow.com/questions/8779108/how-do-i-make-a-libgdx-desktop-application-resizable

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!