feat: use any source for expo/weight/offset (#5220)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: elecpower <elecpower@users.noreply.github.com>
This commit is contained in:
philmoz
2024-07-26 20:51:21 +10:00
committed by GitHub
co-authored by philmoz 3djc elecpower
parent 326c58a7fd
commit 4b917b762c
87 changed files with 2751 additions and 1671 deletions
+7 -7
View File
@@ -307,7 +307,7 @@ void menuModelMixAll(event_t event)
MixData * md = mixAddress(i);
if (i < getMixCount() && (md->destCh + 1 == ch)) {
if (cur-menuVerticalOffset >= 0 && cur-menuVerticalOffset < NUM_BODY_LINES) {
putsChn(0, y, ch, 0); // show CHx
putsChn(0, y, ch, ((s_copyMode || sub != cur) ? 0 : INVERS)); // show CHx
}
uint8_t mixCnt = 0;
do {
@@ -326,17 +326,17 @@ void menuModelMixAll(event_t event)
s_currIdx = i;
}
if (cur-menuVerticalOffset >= 0 && cur-menuVerticalOffset < NUM_BODY_LINES) {
LcdFlags attr = ((s_copyMode || sub != cur) ? 0 : INVERS);
if (mixCnt > 0) lcdDrawTextAtIndex(FW, y, STR_VMLTPX2, md->mltpx, 0);
if (mixCnt > 0) lcdDrawTextAtIndex(FW, y, STR_VMLTPX2, md->mltpx, ((s_copyMode || sub != cur) ? 0 : INVERS));
drawSource(MIX_LINE_SRC_POS, y, md->srcRaw, 0);
if (mixCnt == 0 && md->mltpx == 1) {
lcdDrawText(MIX_LINE_WEIGHT_POS, y, "MULT!", RIGHT | attr | (isMixActive(i) ? BOLD : 0));
lcdDrawText(MIX_LINE_WEIGHT_POS, y, "MULT!", RIGHT | ((isMixActive(i) ? BOLD : 0)));
}
else {
gvarWeightItem(MIX_LINE_WEIGHT_POS, y, md, RIGHT | attr | (isMixActive(i) ? BOLD : 0), 0);
editSrcVarFieldValue(MIX_LINE_WEIGHT_POS, y, nullptr, md->weight,
MIX_WEIGHT_MIN, MIX_WEIGHT_MAX, RIGHT | ((isMixActive(i) ? BOLD : 0)),
0, 0, 0);
}
#if LCD_W >= 212
@@ -352,7 +352,7 @@ void menuModelMixAll(event_t event)
}
if (cur == sub) {
/* invert the raw when it's the current one */
lcdDrawSolidFilledRect(23, y, LCD_W-24, 7);
lcdDrawSolidFilledRect(0, y, LCD_W, 7);
}
}
}