- [NEW] Labels amb color configurable. Per defecte blanc, com sol ser en els propertygrids

This commit is contained in:
2024-06-11 14:20:13 +02:00
parent 5ddc41e87c
commit f96305b0a4
2 changed files with 7 additions and 5 deletions

View File

@@ -5,11 +5,11 @@
namespace ui
{
void label(const char *label, const int x, const int y, const int w, const int h)
void label(const char *label, const int x, const int y, const int w, const int h, const int color)
{
draw::color(WHITE);
draw::color(color);
draw::fillrect(x, y, w, h);
draw::color(PAPER);
draw::color(WHITE);
draw::rect(x, y, w, h);
draw::print(label, x+3, y+3, BLACK, 0);
}
@@ -116,7 +116,7 @@ namespace ui
draw::color(LIGHT+WHITE);
draw::fillrect(x, y, w, h);
draw::color(PAPER);
draw::color(WHITE);
draw::rect(x, y, w, h);
draw::print(label, x+3, y+3, PAPER, 0);