@Override protected void onEnable() { getApplication().setAppProfiler(prof); ((SimpleApplication) getApplication()).getGuiNode().attachChild(ui); }
@Override protected void onEnable() { // Set the number of visible frames to the current width of the screen setFrameCount(getApplication().getCamera().getWidth()); getApplication().setAppProfiler(profiler); Node gui = ((SimpleApplication)getApplication()).getGuiNode(); gui.attachChild(graph); gui.attachChild(background); }
/** * Returns the GUI node that will be used to display the option * panel. By default, this is SimpleApplication.getGuiNode(). */ public Node getGuiNode() { if( guiNode != null ) { return guiNode; } Application app = getApplication(); if( app instanceof SimpleApplication ) { this.guiNode = ((SimpleApplication)app).getGuiNode(); } return guiNode; }
/** * Returns the GUI node that will be used to display the option * panel. By default, this is SimpleApplication.getGuiNode(). */ public Node getGuiNode() { if( guiNode != null ) { return guiNode; } Application app = getApplication(); if( app instanceof SimpleApplication ) { this.guiNode = ((SimpleApplication)app).getGuiNode(); } return guiNode; }
@Override protected void onEnable() { getApplication().setAppProfiler(prof); ((SimpleApplication) getApplication()).getGuiNode().attachChild(ui); }
public void initScoreBoard() { SimpleApplication app = getApp(); // Should be from registry, not this way AppSettings settings = app.getContext().getSettings(); // Should be from registry, not this way int numScoreRows = 4; int rowHeight = 50; int boardWidth = settings.getWidth(); int baseX = 20; int baseY = settings.getHeight() - numScoreRows * rowHeight; float textSizeMult = 0.5f; ScoreBoard sb = new ScoreBoard(app.getAssetManager(), app.getGuiNode(), baseX, baseY, boardWidth, rowHeight, numScoreRows, textSizeMult); setScoreBoard(sb); // Goofy way to do it }
@Override protected void onEnable() { // Set the number of visible frames to the current width of the screen setFrameCount(getApplication().getCamera().getWidth()); getApplication().setAppProfiler(profiler); Node gui = ((SimpleApplication)getApplication()).getGuiNode(); gui.attachChild(graph); gui.attachChild(background); }
app.getGuiNode().addControl(screen); guimainMenu = new GUIMainMenuAppState(screen); guimainMenu.setDisplayFps(displayFps);