本文整理匯總了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;
}
}