use of org.terasology.engine.rendering.nui.widgets.browser.ui.style.TextRenderStyle in project Terasology by MovingBlocks.
the class TextFlowRenderable method render.
@Override
public void render(Canvas canvas, Rectanglei bounds, TextRenderStyle defaultRenderStyle) {
TextRenderStyle safeRenderStyle = getTextRenderStyle(defaultRenderStyle);
Font font = safeRenderStyle.getFont(hyperlink != null);
int lineHeight = font.getLineHeight();
Rectanglei bottomBounds = new Rectanglei(bounds.minX, bounds.maxY - lineHeight).setSize(bounds.getSizeX(), lineHeight);
canvas.drawTextRaw(text, font, safeRenderStyle.getColor(hyperlink != null), bottomBounds);
}
Aggregations