@Override public void layout () { clampSplitAmount(); if (!vertical) calculateHorizBoundsAndPositions(); else calculateVertBoundsAndPositions(); Actor firstWidget = this.firstWidget; if (firstWidget != null) { Rectangle firstWidgetBounds = this.firstWidgetBounds; firstWidget.setBounds(firstWidgetBounds.x, firstWidgetBounds.y, firstWidgetBounds.width, firstWidgetBounds.height); if (firstWidget instanceof Layout) ((Layout)firstWidget).validate(); } Actor secondWidget = this.secondWidget; if (secondWidget != null) { Rectangle secondWidgetBounds = this.secondWidgetBounds; secondWidget.setBounds(secondWidgetBounds.x, secondWidgetBounds.y, secondWidgetBounds.width, secondWidgetBounds.height); if (secondWidget instanceof Layout) ((Layout)secondWidget).validate(); } }
@Override public void layout () { clampSplitAmount(); if (!vertical) calculateHorizBoundsAndPositions(); else calculateVertBoundsAndPositions(); Actor firstWidget = this.firstWidget; if (firstWidget != null) { Rectangle firstWidgetBounds = this.firstWidgetBounds; firstWidget.setBounds(firstWidgetBounds.x, firstWidgetBounds.y, firstWidgetBounds.width, firstWidgetBounds.height); if (firstWidget instanceof Layout) ((Layout)firstWidget).validate(); } Actor secondWidget = this.secondWidget; if (secondWidget != null) { Rectangle secondWidgetBounds = this.secondWidgetBounds; secondWidget.setBounds(secondWidgetBounds.x, secondWidgetBounds.y, secondWidgetBounds.width, secondWidgetBounds.height); if (secondWidget instanceof Layout) ((Layout)secondWidget).validate(); } }
public void layout () { if (sizeInvalid) computeSize(); float width = getWidth(), height = getHeight(); Array<Actor> children = getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor child = children.get(i); child.setBounds(0, 0, width, height); if (child instanceof Layout) ((Layout)child).validate(); } }
public void layout () { if (sizeInvalid) computeSize(); float width = getWidth(), height = getHeight(); Array<Actor> children = getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor child = children.get(i); child.setBounds(0, 0, width, height); if (child instanceof Layout) ((Layout)child).validate(); } }
actor.setBounds(x, y, width, height); if (actor instanceof Layout) ((Layout)actor).validate();
actor.setBounds(x, y, width, height); if (actor instanceof Layout) ((Layout)actor).validate();
shapeActor.setBounds(0, 0, 100, 150); shapeActor.setOrigin(50, 75); shapeActor.debug();
actor.setBounds(15, 15, 100, 100); actor.setOrigin(50, 50); stage.addActor(actor);
/** @param stage will contain a mock-up blocker actor, which blocks all mouse input. */ protected static void addBlocker (final Stage stage) { stage.addActor(BLOCKER); BLOCKER.setBounds(0f, 0f, stage.getWidth(), stage.getHeight()); BLOCKER.toFront(); }
public void layout () { if (sizeInvalid) computeSize(); float width = getWidth(), height = getHeight(); Array<Actor> children = getChildren(); for (int i = 0, n = children.size; i < n; i++) { Actor child = children.get(i); child.setBounds(0, 0, width, height); if (child instanceof Layout) ((Layout)child).validate(); } }