本文整理汇总了Java中de.lessvoid.nifty.renderer.lwjgl.render.LwjglBatchRenderBackendFactory类的典型用法代码示例。如果您正苦于以下问题:Java LwjglBatchRenderBackendFactory类的具体用法?Java LwjglBatchRenderBackendFactory怎么用?Java LwjglBatchRenderBackendFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LwjglBatchRenderBackendFactory类属于de.lessvoid.nifty.renderer.lwjgl.render包,在下文中一共展示了LwjglBatchRenderBackendFactory类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initNifty
import de.lessvoid.nifty.renderer.lwjgl.render.LwjglBatchRenderBackendFactory; //导入依赖的package包/类
public boolean initNifty(boolean start) {
if (start) {
SlickInputSystem inputSystem = new PlainSlickInputSystem();
Input input = this.getContainer().getInput();
inputSystem.setInput(input);
input.addListener(inputSystem);
this.nifty = new Nifty(new BatchRenderDevice(LwjglBatchRenderBackendFactory.create()), new NullSoundDevice(), inputSystem, new AccurateTimeProvider());
this.nifty.loadStyleFile("nifty-default-styles.xml");
this.nifty.loadControlFile("nifty-default-controls.xml");
return true;
} else {
this.nifty.registerScreenController(this.windowLogin);
this.nifty.registerScreenController(this.windowAccount);
this.nifty.registerScreenController(this.windowInterface);
this.nifty.registerScreenController(this.windowGame);
this.nifty.addXml("assets/old/interface/gui-login.xml");
this.nifty.addXml("assets/old/interface/gui-account.xml");
this.nifty.addXml("assets/old/interface/gui-interface.xml");
this.nifty.addXml("assets/old/interface/gui-game.xml");
try {
this.nifty.getNiftyMouse().registerMouseCursor("crosshair", "assets/old/img/game/cursor.png", 15, 14);
} catch (IOException e) {
e.printStackTrace();
}
// this.nifty.setDebugOptionPanelColors(true);
return true;
}
}