Shows pot and sliders on own line, change colour
Use theme primary colour (def. black) rather than warning (def. red) Show pot/slider list on own row, under switches
This commit is contained in:
@@ -80,11 +80,11 @@ void SwitchWarnDialog::paint(BitmapBuffer * dc)
|
|||||||
unsigned int state = ((g_model.switchWarningState >> (3 * i)) & 0x07);
|
unsigned int state = ((g_model.switchWarningState >> (3 * i)) & 0x07);
|
||||||
if (state && state - 1 != ((switches_states >> (i * 2)) & 0x03)) {
|
if (state && state - 1 != ((switches_states >> (i * 2)) & 0x03)) {
|
||||||
if (y < LCD_H) {
|
if (y < LCD_H) {
|
||||||
x = drawSwitch(dc, x, y, SWSRC_FIRST_SWITCH + i * 3 + state - 1, FONT(BOLD));
|
x = drawSwitch(dc, x, y, SWSRC_FIRST_SWITCH + i * 3 + state - 1, COLOR_THEME_PRIMARY1 | FONT(BOLD));
|
||||||
x += 5;
|
x += 5;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dc->drawText(x, y, "...", FONT(BOLD));
|
dc->drawText(x, y, "...", COLOR_THEME_PRIMARY1 | FONT(BOLD));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,6 +92,8 @@ void SwitchWarnDialog::paint(BitmapBuffer * dc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_model.potsWarnMode) {
|
if (g_model.potsWarnMode) {
|
||||||
|
x = ALERT_MESSAGE_LEFT;
|
||||||
|
y += 20;
|
||||||
for (int i = 0; i < NUM_POTS + NUM_SLIDERS; i++) {
|
for (int i = 0; i < NUM_POTS + NUM_SLIDERS; i++) {
|
||||||
if (!IS_POT_SLIDER_AVAILABLE(POT1 + i)) {
|
if (!IS_POT_SLIDER_AVAILABLE(POT1 + i)) {
|
||||||
continue;
|
continue;
|
||||||
@@ -103,11 +105,11 @@ void SwitchWarnDialog::paint(BitmapBuffer * dc)
|
|||||||
// TODO add an helper
|
// TODO add an helper
|
||||||
strncpy(s, &STR_VSRCRAW[1 + (NUM_STICKS + 1 + i) * STR_VSRCRAW[0]], STR_VSRCRAW[0]);
|
strncpy(s, &STR_VSRCRAW[1 + (NUM_STICKS + 1 + i) * STR_VSRCRAW[0]], STR_VSRCRAW[0]);
|
||||||
s[int(STR_VSRCRAW[0])] = '\0';
|
s[int(STR_VSRCRAW[0])] = '\0';
|
||||||
dc->drawText(x, y, s, COLOR_THEME_WARNING | FONT(BOLD));
|
dc->drawText(x, y, s, COLOR_THEME_PRIMARY1 | FONT(BOLD));
|
||||||
y += 15;
|
x += 40;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dc->drawText(x, y, "...", COLOR_THEME_WARNING | FONT(BOLD));
|
dc->drawText(x, y, "...", COLOR_THEME_PRIMARY1 | FONT(BOLD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user