- Color dels ui::button configurable
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace ui
|
namespace ui
|
||||||
{
|
{
|
||||||
const int button(const char *label, const int x, const int y, const int w, const int h)
|
const int button(const char *label, const int x, const int y, const int w, const int h, const int c1, const int c2, const int c3)
|
||||||
{
|
{
|
||||||
const int mx = input::mouseX();
|
const int mx = input::mouseX();
|
||||||
const int my = input::mouseY();
|
const int my = input::mouseY();
|
||||||
@@ -14,7 +14,7 @@ namespace ui
|
|||||||
const int txt_size = strlen(label)*4;
|
const int txt_size = strlen(label)*4;
|
||||||
const int txt_x = x+(w-txt_size)/2;
|
const int txt_x = x+(w-txt_size)/2;
|
||||||
|
|
||||||
draw::color(inside?(btnDown?15:LIGHT+TEAL):TEAL);
|
draw::color(inside?(btnDown?c3:c2):c1);
|
||||||
draw::fillrect(x, y, w, h);
|
draw::fillrect(x, y, w, h);
|
||||||
draw::print(label, 1+txt_x, y+3, LIGHT+WHITE, PAPER);
|
draw::print(label, 1+txt_x, y+3, LIGHT+WHITE, PAPER);
|
||||||
|
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
namespace ui
|
namespace ui
|
||||||
{
|
{
|
||||||
const int button(const char *label, const int x, const int y, const int w, const int h);
|
const int button(const char *label, const int x, const int y, const int w, const int h, const int c1, const int c2, const int c3);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user