feat(radio): sticky LS bold when set, color LS list display bold like BW (#5357)

This commit is contained in:
philmoz
2024-08-01 19:45:26 +10:00
committed by GitHub
parent 23df4f63bb
commit 2f8618803b
5 changed files with 51 additions and 6 deletions
@@ -110,9 +110,6 @@ void menuModelLogicalSwitches(event_t event)
unsigned int sw = SWSRC_FIRST_LOGICAL_SWITCH+k;
drawSwitch(0, y, sw, (getSwitch(sw) ? BOLD : 0) | ((sub==k && CURSOR_ON_LINE()) ? INVERS : 0));
// CSW func
lcdDrawTextAtIndex(CSW_1ST_COLUMN, y, STR_VCSWFUNC, cs->func, horz==0 ? attr : 0);
// CSW params
unsigned int cstate = lswFamily(cs->func);
mixsrc_t v1_val = cs->v1;
@@ -120,6 +117,12 @@ void menuModelLogicalSwitches(event_t event)
int16_t v2_min = 0, v2_max = MIXSRC_LAST_TELEM;
int16_t v3_min =-1, v3_max = 100;
// CSW func
LcdFlags flags = 0;
if (cstate == LS_FAMILY_STICKY && getLSStickyState(k))
flags = BOLD;
lcdDrawTextAtIndex(CSW_1ST_COLUMN, y, STR_VCSWFUNC, cs->func, (horz==0 ? attr : 0) | flags);
if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY) {
drawSwitch(CSW_2ND_COLUMN, y, cs->v1, attr1);
drawSwitch(CSW_3RD_COLUMN, y, cs->v2, attr2);