public TestBitmapFontLayout() { super(new StatsAppState(), new DebugKeysAppState(), new ScreenshotAppState("", System.currentTimeMillis())); }
public void onAction(String name, boolean value, float tpf) { if (!value) { return; } if (name.equals(INPUT_MAPPING_EXIT)) { stop(); }else if (name.equals(INPUT_MAPPING_HIDE_STATS)){ if (stateManager.getState(StatsAppState.class) != null) { stateManager.getState(StatsAppState.class).toggleStats(); } } } }
public void setDarkenBehind(boolean darkenBehind) { this.darkenBehind = darkenBehind; setEnabled(isEnabled()); }
public void toggleStats() { setDisplayFps( !showFps ); setDisplayStatView( !showStats ); }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; if (app instanceof SimpleApplication) { SimpleApplication simpleApp = (SimpleApplication)app; if (guiNode == null) { guiNode = simpleApp.guiNode; } if (guiFont == null ) { guiFont = simpleApp.guiFont; } } if (guiNode == null) { throw new RuntimeException( "No guiNode specific and cannot be automatically determined." ); } if (guiFont == null) { guiFont = app.getAssetManager().loadFont("Interface/Fonts/Default.fnt"); } loadFpsText(); loadStatsView(); loadDarken(); }
stateManager.getState(StatsAppState.class).setFont(guiFont); fpsText = stateManager.getState(StatsAppState.class).getFpsText();
public void setDisplayStatView(boolean show) { if (stateManager.getState(StatsAppState.class) != null) { stateManager.getState(StatsAppState.class).setDisplayStatView(show); } }
public void setDisplayFps(boolean show) { if (stateManager.getState(StatsAppState.class) != null) { stateManager.getState(StatsAppState.class).setDisplayFps(show); } }
@Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); this.app = app; if (app instanceof SimpleApplication) { SimpleApplication simpleApp = (SimpleApplication)app; if (guiNode == null) { guiNode = simpleApp.guiNode; } if (guiFont == null ) { guiFont = simpleApp.guiFont; } } if (guiNode == null) { throw new RuntimeException( "No guiNode specific and cannot be automatically determined." ); } if (guiFont == null) { guiFont = app.getAssetManager().loadFont("Interface/Fonts/Default.fnt"); } loadFpsText(); loadStatsView(); loadDarken(); }
public void toggleStats() { setDisplayFps( !showFps ); setDisplayStatView( !showStats ); }
stateManager.getState(StatsAppState.class).setFont(guiFont); fpsText = stateManager.getState(StatsAppState.class).getFpsText();
public void setDisplayStatView(boolean show) { if (stateManager.getState(StatsAppState.class) != null) { stateManager.getState(StatsAppState.class).setDisplayStatView(show); } }
public void setDisplayFps(boolean show) { if (stateManager.getState(StatsAppState.class) != null) { stateManager.getState(StatsAppState.class).setDisplayFps(show); } }
public TestSceneStress() { super(new StatsAppState(), new DebugKeysAppState(), new BasicProfilerState(false), new FlyCamAppState(), new ScreenshotAppState("", System.currentTimeMillis())); }
public void setDarkenBehind(boolean darkenBehind) { this.darkenBehind = darkenBehind; setEnabled(isEnabled()); }
public void onAction(String name, boolean value, float tpf) { if (!value) { return; } if (name.equals(INPUT_MAPPING_EXIT)) { stop(); }else if (name.equals(INPUT_MAPPING_HIDE_STATS)){ if (stateManager.getState(StatsAppState.class) != null) { stateManager.getState(StatsAppState.class).toggleStats(); } } } }
public SimpleApplication() { this(new StatsAppState(), new FlyCamAppState(), new AudioListenerState(), new DebugKeysAppState()); }
protected void simpleInit() { this.fpp = new FilterPostProcessor(assetManager); // Base Setup deflogger = Logger.getLogger(""); niftylogger = Logger.getLogger("de.lessvoid.nifty"); niftyinput = Logger.getLogger("NiftyInputEventHandlingLog"); deflogger.setLevel(Level.SEVERE); niftylogger.setLevel(Level.SEVERE); niftyinput.setLevel(Level.SEVERE); viewPort.setBackgroundColor(ColorRGBA.Black); stateManager.getState(StatsAppState.class).toggleStats(); initRoot(); initRenderer(complexShadows); initAudio(); initNifty(); initCam(); initSelection(); initCustom(); }
private Main() { super(new StatsAppState(), new DebugKeysAppState()); }
public ProtoDemo() { super(new StatsAppState(), new DebugKeysAppState(), new BasicProfilerState(false), new OptionPanelState("glass"), new ScreenshotAppState("", System.currentTimeMillis())); }