List of usage examples for com.badlogic.gdx.graphics.g2d BitmapFontCache tint
public void tint(Color tint)
From source file:de.longri.cachebox3.gui.widgets.ScrollLabel.java
License:Open Source License
@Override public void draw(Batch batch, float parentAlpha) { BitmapFontCache cache = super.getBitmapFontCache(); validate();/*from w w w . j a v a 2 s .c o m*/ Color color = tempColor.set(getColor()); color.a *= parentAlpha; if (style.background != null) { batch.setColor(color.r, color.g, color.b, color.a); style.background.draw(batch, getX(), getY(), getWidth(), getHeight()); } if (style.fontColor != null) color.mul(style.fontColor); cache.tint(color); cache.setPosition(getX() + scrollPosition, getY()); getStage().calculateScissors(localRec, scissorRec); ScissorStack.pushScissors(scissorRec); cache.draw(batch); batch.flush(); try { ScissorStack.popScissors(); } catch (Exception e) { } }