Rename char2idx to char2zchar

This commit is contained in:
Bertrand Songis
2019-02-21 10:35:48 +01:00
parent 61af68caf8
commit e4fa31be28
10 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -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);
}