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
+9 -6
View File
@@ -391,7 +391,7 @@ void menuModelExposAll(event_t event)
coord_t y = MENU_HEADER_HEIGHT+1+(cur-menuVerticalOffset)*FH;
if (i<MAX_EXPOS && (ed=expoAddress(i))->chn+1 == ch && EXPO_VALID(ed)) {
if (cur-menuVerticalOffset >= 0 && cur-menuVerticalOffset < NUM_BODY_LINES) {
drawSource(0, y, ch, 0);
drawSource(0, y, ch, ((s_copyMode || sub != cur) ? 0 : INVERS));
}
uint8_t mixCnt = 0;
do {
@@ -410,10 +410,10 @@ void menuModelExposAll(event_t event)
s_currIdx = i;
}
if (cur-menuVerticalOffset >= 0 && cur-menuVerticalOffset < NUM_BODY_LINES) {
LcdFlags attr = ((s_copyMode || sub != cur) ? 0 : INVERS);
GVAR_MENU_ITEM(EXPO_LINE_WEIGHT_POS, y, ed->weight, -100, 100, RIGHT | attr | (isExpoActive(i) ? BOLD : 0), 0, 0);
displayExpoLine(y, ed, attr);
editSrcVarFieldValue(EXPO_LINE_WEIGHT_POS, y, nullptr, ed->weight,
-100, 100, RIGHT | (isExpoActive(i) ? BOLD : 0),
0, 0, 0);
displayExpoLine(y, ed, 0);
if (s_copyMode) {
if ((s_copyMode==COPY_MODE || s_copyTgtOfs == 0) && s_copySrcCh == ch && i == (s_copySrcIdx + (s_copyTgtOfs<0))) {
@@ -422,11 +422,14 @@ void menuModelExposAll(event_t event)
}
if (cur == sub) {
/* invert the raw when it's the current one */
lcdDrawSolidFilledRect(EXPO_LINE_SELECT_POS+1, y, LCD_W-EXPO_LINE_SELECT_POS-2, 7);
lcdDrawSolidFilledRect(0, y, LCD_W, 7);
}
}
}
cur++; y+=FH; mixCnt++; i++; ed++;
if (sub == cur && ed->chn+1 == ch) {
lcdDrawText(INDENT_WIDTH, y, "->", ((s_copyMode || sub != cur) ? 0 : INVERS));
}
} while (i<MAX_EXPOS && ed->chn+1 == ch && EXPO_VALID(ed));
if (s_copyMode == MOVE_MODE && cur-menuVerticalOffset >= 0 && cur-menuVerticalOffset < NUM_BODY_LINES && s_copySrcCh == ch && i == (s_copySrcIdx + (s_copyTgtOfs<0))) {
lcdDrawRect(EXPO_LINE_SELECT_POS, y-1, LCD_W-EXPO_LINE_SELECT_POS, 9, DOTTED);