protected void begin () { if (color == null) color = target.getColor(); startR = color.r; startG = color.g; startB = color.b; startA = color.a; }
protected void begin () { if (color == null) color = target.getColor(); startR = color.r; startG = color.g; startB = color.b; startA = color.a; }
protected void begin () { if (color == null) color = target.getColor(); start = color.a; }
protected void begin () { if (color == null) color = target.getColor(); start = color.a; }
protected void onShow (Actor selectBoxList, boolean below) { selectBoxList.getColor().a = 0; selectBoxList.addAction(fadeIn(0.3f, Interpolation.fade)); }
protected void onShow (Actor selectBoxList, boolean below) { selectBoxList.getColor().a = 0; selectBoxList.addAction(fadeIn(0.3f, Interpolation.fade)); }
protected void onHide (Actor selectBoxList) { selectBoxList.getColor().a = 1; selectBoxList.addAction(sequence(fadeOut(0.15f, Interpolation.fade), removeActor())); }
protected void onHide (Actor selectBoxList) { selectBoxList.getColor().a = 1; selectBoxList.addAction(sequence(fadeOut(0.15f, Interpolation.fade), removeActor())); }
/** Draws selection, icons, and expand icons. */ private void draw (Batch batch, Array<Node> nodes, float indent, float plusMinusWidth) { Drawable plus = style.plus, minus = style.minus; float x = getX(), y = getY(), expandX = x + indent, iconX = expandX + plusMinusWidth + iconSpacingLeft; for (int i = 0, n = nodes.size; i < n; i++) { Node node = nodes.get(i); float height = node.height; Actor actor = node.actor; if (selection.contains(node) && style.selection != null) { style.selection.draw(batch, x, y + actor.getY() - ySpacing / 2, getWidth(), height + ySpacing); } else if (node == overNode && style.over != null) { style.over.draw(batch, x, y + actor.getY() - ySpacing / 2, getWidth(), height + ySpacing); } if (node.icon != null) { float iconY = y + actor.getY() + Math.round((height - node.icon.getMinHeight()) / 2); batch.setColor(actor.getColor()); node.icon.draw(batch, iconX, iconY, node.icon.getMinWidth(), node.icon.getMinHeight()); batch.setColor(Color.WHITE); } if (node.children.size == 0) continue; Drawable expandIcon = node.expanded ? minus : plus; float iconY = y + actor.getY() + Math.round((height - expandIcon.getMinHeight()) / 2); expandIcon.draw(batch, expandX, iconY, expandIcon.getMinWidth(), expandIcon.getMinHeight()); if (node.expanded) draw(batch, node.children, indent + indentSpacing, plusMinusWidth); } }
/** Draws selection, icons, and expand icons. */ private void draw (Batch batch, Array<Node> nodes, float indent, float plusMinusWidth) { Drawable plus = style.plus, minus = style.minus; float x = getX(), y = getY(), expandX = x + indent, iconX = expandX + plusMinusWidth + iconSpacingLeft; for (int i = 0, n = nodes.size; i < n; i++) { Node node = nodes.get(i); float height = node.height; Actor actor = node.actor; if (selection.contains(node) && style.selection != null) { style.selection.draw(batch, x, y + actor.getY() - ySpacing / 2, getWidth(), height + ySpacing); } else if (node == overNode && style.over != null) { style.over.draw(batch, x, y + actor.getY() - ySpacing / 2, getWidth(), height + ySpacing); } if (node.icon != null) { float iconY = y + actor.getY() + Math.round((height - node.icon.getMinHeight()) / 2); batch.setColor(actor.getColor()); node.icon.draw(batch, iconX, iconY, node.icon.getMinWidth(), node.icon.getMinHeight()); batch.setColor(Color.WHITE); } if (node.children.size == 0) continue; Drawable expandIcon = node.expanded ? minus : plus; float iconY = y + actor.getY() + Math.round((height - expandIcon.getMinHeight()) / 2); expandIcon.draw(batch, expandX, iconY, expandIcon.getMinWidth(), expandIcon.getMinHeight()); if (node.expanded) draw(batch, node.children, indent + indentSpacing, plusMinusWidth); } }
protected void begin () { if (color == null) color = target.getColor(); startR = color.r; startG = color.g; startB = color.b; startA = color.a; }
protected void begin () { if (color == null) color = target.getColor(); start = color.a; }
public GdxQuery alpha(float a){ for(Actor actor:list()) actor.getColor().a=a; return this; }
/** * Sets the color of this Glyph with the given packed float color; does not allocate any objects. * @param color the color to set this Glyph to, as a packed float */ public void setPackedColor(float color) { Color.abgr8888ToColor(super.getColor(), color); }
public boolean isTransparent() { for(Actor actor : list()) if(actor.getColor().a != 0) return false; return true; }
public UI<T> setAlpha(float alpha) { Color color = t.getColor(); t.setColor(color.r, color.g, color.b, alpha); return this; }
protected void begin () { if (color == null) color = target.getColor(); start = color.toFloatBits(); }
protected void onShow (Actor selectBoxList, boolean below) { selectBoxList.getColor().a = 0; selectBoxList.addAction(fadeIn(0.3f, Interpolation.fade)); }
/** * Makes a Glyph of the given char in the given packed float color, at the specified world coordinates. * @param shown the char to show * @param color the packed float color to use, as produced by {@link Color#toFloatBits()} * @param x x position in world coordinates * @param y y position in world coordinates */ public Glyph(char shown, float color, float x, float y) { super(); this.shown = shown; Color.abgr8888ToColor(super.getColor(), color); setPosition(x, y); }
protected void onHide (Actor selectBoxList) { selectBoxList.getColor().a = 1; selectBoxList.addAction(sequence(fadeOut(0.15f, Interpolation.fade), removeActor())); }