mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-06-03 02:00:42 +00:00
Add color distinction to button drawing
This commit is contained in:
parent
2722b4367a
commit
efd3bfc5ad
18
button.cpp
18
button.cpp
|
@ -8,6 +8,24 @@ void drawButton(Button* button)
|
|||
uint16_t tc = COLOR_INACTIVE_TEXT;
|
||||
uint16_t bgc = COLOR_INACTIVE_BACKGROUND;
|
||||
const uint16_t bdc = COLOR_INACTIVE_BORDER;
|
||||
switch(button->status())
|
||||
{
|
||||
case ButtonStatus_e::Stateless://Fallthrough intended
|
||||
case ButtonStatus_e::Inactive://Fallthrough intended
|
||||
default:
|
||||
{
|
||||
//Colors are initialized for this, so we're done
|
||||
break;
|
||||
}
|
||||
case ButtonStatus_e::Active:
|
||||
{
|
||||
tc = COLOR_ACTIVE_TEXT;
|
||||
bgc = COLOR_ACTIVE_BACKGROUND;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const char* text = nullptr;
|
||||
if(nullptr != button->text){
|
||||
text = button->text;
|
||||
|
|
Loading…
Reference in New Issue
Block a user