/** Replaces the root group. This can be useful, for example, to subclass the root group to be notified by * {@link Group#childrenChanged()}. */ public void setRoot (Group root) { if (root.parent != null) root.parent.removeActor(root, false); this.root = root; root.setParent(null); root.setStage(this); }
/** Replaces the root group. This can be useful, for example, to subclass the root group to be notified by * {@link Group#childrenChanged()}. */ public void setRoot (Group root) { if (root.parent != null) root.parent.removeActor(root, false); this.root = root; root.setParent(null); root.setStage(this); }
/** Creates a stage with the specified viewport and batch. This can be used to avoid creating a new batch (which can be * somewhat slow) if multiple stages are used during an application's life time. * @param batch Will not be disposed if {@link #dispose()} is called, handle disposal yourself. */ public Stage (Viewport viewport, Batch batch) { if (viewport == null) throw new IllegalArgumentException("viewport cannot be null."); if (batch == null) throw new IllegalArgumentException("batch cannot be null."); this.viewport = viewport; this.batch = batch; root = new Group(); root.setStage(this); viewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true); }
/** Creates a stage with the specified viewport and batch. This can be used to avoid creating a new batch (which can be * somewhat slow) if multiple stages are used during an application's life time. * @param batch Will not be disposed if {@link #dispose()} is called, handle disposal yourself. */ public Stage (Viewport viewport, Batch batch) { if (viewport == null) throw new IllegalArgumentException("viewport cannot be null."); if (batch == null) throw new IllegalArgumentException("batch cannot be null."); this.viewport = viewport; this.batch = batch; root = new Group(); root.setStage(this); viewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true); }
/** Creates a stage with the specified viewport and batch. This can be used to avoid creating a new batch (which can be * somewhat slow) if multiple stages are used during an application's life time. * @param batch Will not be disposed if {@link #dispose()} is called, handle disposal yourself. */ public Stage (Viewport viewport, Batch batch) { if (viewport == null) throw new IllegalArgumentException("viewport cannot be null."); if (batch == null) throw new IllegalArgumentException("batch cannot be null."); this.viewport = viewport; this.batch = batch; root = new Group(); root.setStage(this); viewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true); }
public void setStage(Stage stage){ super.setStage(stage); game.var3dListener.linkNativeTextField(this,Method.sizeChanged); game.var3dListener.linkNativeTextField(this,Method.positionChanged); game.var3dListener.linkNativeTextField(this,Method.setFontSize); if(isVisible())game.var3dListener.linkNativeTextField(this,Method.setHidden); } }