Refactor NanoVGGUI - prepare to support NVGPaint and images
This commit is contained in:
@@ -67,11 +67,15 @@ public interface GUI extends Renderable, Disposable, KeyEventHandler {
|
||||
|
||||
void setGlobalAlpha(float alpha);
|
||||
|
||||
void fillColor(float red, float green, float blue, float alpha);
|
||||
void setFillColor(float red, float green, float blue, float alpha);
|
||||
|
||||
void fill();
|
||||
|
||||
void setStrokeColor(float red, float green, float blue, float alpha);
|
||||
|
||||
void setStrokeWidth(float width);
|
||||
|
||||
void strokeColor(float red, float green, float blue, float alpha);
|
||||
void stroke();
|
||||
|
||||
void clip(float x, float y, float width, float height);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,8 @@ public class Label extends BaseComponent {
|
||||
gui.setFontFace(font);
|
||||
gui.setTextAlignment(alignment);
|
||||
gui.setFontSize(fontSize);
|
||||
gui.fillColor(red, green, blue, alpha);
|
||||
gui.setFillColor(red, green, blue, alpha);
|
||||
gui.fill();
|
||||
gui.putTextBox(x + paddingLeft, y + paddingTop, getWidth() - paddingLeft - paddingRight, text, bounds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user