List of usage examples for com.badlogic.gdx.scenes.scene2d Actor draw
public void draw(Batch batch, float parentAlpha)
From source file:com.kotcrab.vis.ui.widget.MultiSplitPane.java
License:Apache License
@Override public void draw(Batch batch, float parentAlpha) { validate();// w ww . j a v a2 s . c o m Color color = getColor(); applyTransform(batch, computeTransform()); SnapshotArray<Actor> actors = getChildren(); for (int i = 0; i < actors.size; i++) { Actor actor = actors.get(i); Rectangle bounds = widgetBounds.get(i); Rectangle scissor = scissors.get(i); getStage().calculateScissors(bounds, scissor); if (ScissorStack.pushScissors(scissor)) { if (actor.isVisible()) actor.draw(batch, parentAlpha * color.a); batch.flush(); ScissorStack.popScissors(); } } batch.setColor(color.r, color.g, color.b, parentAlpha * color.a); Drawable handle = style.handle; Drawable handleOver = style.handle; if (isTouchable() && style.handleOver != null) handleOver = style.handleOver; for (Rectangle rect : handleBounds) { if (this.handleOver == rect) { handleOver.draw(batch, rect.x, rect.y, rect.width, rect.height); } else { handle.draw(batch, rect.x, rect.y, rect.width, rect.height); } } resetTransform(batch); }
From source file:com.o2d.pkayjava.editor.view.ui.widget.actors.basic.SandboxBackUI.java
License:Apache License
public void render(float delta) { ResourceManager resourceManager = Overlap2DFacade.getInstance().retrieveProxy(ResourceManager.NAME); batch.begin();// w ww . j av a2 s. c o m for (Actor actor : actors) { actor.setScale(1f / resourceManager.getProjectVO().pixelToWorld); actor.act(delta); actor.draw(batch, 1); } batch.setColor(Color.WHITE); batch.end(); }