Rename char2idx to char2zchar
This commit is contained in:
@@ -82,7 +82,7 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, event_t event, ui
|
||||
if (s_editMode > 0) {
|
||||
int8_t c = name[editNameCursorPos];
|
||||
if (!(flags & ZCHAR)) {
|
||||
c = char2idx(c);
|
||||
c = char2zchar(c);
|
||||
}
|
||||
int8_t v = c;
|
||||
|
||||
@@ -132,7 +132,7 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, event_t event, ui
|
||||
if (c != v) {
|
||||
if (!(flags & ZCHAR)) {
|
||||
if (v != '\0' || name[editNameCursorPos+1] != '\0')
|
||||
v = idx2char(v);
|
||||
v = zchar2char(v);
|
||||
}
|
||||
name[editNameCursorPos] = v;
|
||||
storageDirty(menuVerticalPositions[0] == 0 ? EE_MODEL : EE_GENERAL);
|
||||
@@ -140,7 +140,7 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, event_t event, ui
|
||||
|
||||
lcdDrawSizedText(x, y, name, size, flags);
|
||||
coord_t left = (editNameCursorPos == 0 ? 0 : getTextWidth(name, editNameCursorPos, flags));
|
||||
char s[] = { (flags & ZCHAR) ? idx2char(name[editNameCursorPos]) : name[editNameCursorPos], '\0' };
|
||||
char s[] = { (flags & ZCHAR) ? zchar2char(name[editNameCursorPos]) : name[editNameCursorPos], '\0' };
|
||||
lcdDrawSolidFilledRect(x+left-1, y, getTextWidth(s, 1)+1, INVERT_LINE_HEIGHT, TEXT_INVERTED_BGCOLOR);
|
||||
lcdDrawText(x+left, y, s, TEXT_INVERTED_COLOR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user