1
0
forked from me/IronOS

Change SettingsShortNames to use one string

This unifies its behaviour with SettingsMenuEntries.
This commit is contained in:
Alvin Wong
2021-03-29 19:07:50 +08:00
parent 12f98e5f9c
commit 55fa5c95e4
3 changed files with 8 additions and 10 deletions

View File

@@ -239,15 +239,12 @@ const menuitem advancedMenu[] = {
static void printShortDescriptionDoubleLine(SettingsItemIndex settingsItemIndex) {
uint8_t shortDescIndex = static_cast<uint8_t>(settingsItemIndex);
if (SettingsShortNames[shortDescIndex][0][0] == '\x00') {
OLED::setCursor(0, 0);
if (SettingsShortNames[shortDescIndex][0] == '\x01') {
// Empty first line means that this uses large font (for CJK).
OLED::setCursor(0, 0);
OLED::print(SettingsShortNames[shortDescIndex][1], FontStyle::LARGE);
OLED::print(SettingsShortNames[shortDescIndex] + 1, FontStyle::LARGE);
} else {
OLED::setCursor(0, 0);
OLED::print(SettingsShortNames[shortDescIndex][0], FontStyle::SMALL);
OLED::setCursor(0, 8);
OLED::print(SettingsShortNames[shortDescIndex][1], FontStyle::SMALL);
OLED::print(SettingsShortNames[shortDescIndex], FontStyle::SMALL);
}
}