mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Dropping single line menu support
This commit is contained in:
@@ -9,16 +9,12 @@
|
||||
#define TRANSLATION_H_
|
||||
#include "unit.h"
|
||||
#include "stdint.h"
|
||||
enum ShortNameType {
|
||||
SHORT_NAME_SINGLE_LINE = 1, SHORT_NAME_DOUBLE_LINE = 2,
|
||||
};
|
||||
extern const uint8_t USER_FONT_12[];
|
||||
extern const uint8_t USER_FONT_6x8[];
|
||||
/*
|
||||
* When SettingsShortNameType is SHORT_NAME_SINGLE_LINE
|
||||
* use SettingsShortNames as SettingsShortNames[16][1].. second column undefined
|
||||
*/
|
||||
extern const enum ShortNameType SettingsShortNameType;
|
||||
extern const char *SettingsShortNames[28][2];
|
||||
extern const char *SettingsDescriptions[28];
|
||||
extern const char *SettingsMenuEntries[4];
|
||||
|
||||
@@ -230,12 +230,6 @@ const menuitem advancedMenu[] = {
|
||||
{ NULL, NULL, NULL } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
|
||||
static void printShortDescriptionSingleLine(uint32_t shortDescIndex) {
|
||||
OLED::setFont(0);
|
||||
OLED::setCharCursor(0, 0);
|
||||
OLED::print(SettingsShortNames[shortDescIndex][0]);
|
||||
}
|
||||
|
||||
static void printShortDescriptionDoubleLine(uint32_t shortDescIndex) {
|
||||
OLED::setFont(1);
|
||||
OLED::setCharCursor(0, 0);
|
||||
@@ -254,11 +248,7 @@ static void printShortDescriptionDoubleLine(uint32_t shortDescIndex) {
|
||||
static void printShortDescription(uint32_t shortDescIndex,
|
||||
uint16_t cursorCharPosition) {
|
||||
// print short description (default single line, explicit double line)
|
||||
if (SettingsShortNameType == SHORT_NAME_DOUBLE_LINE) {
|
||||
printShortDescriptionDoubleLine(shortDescIndex);
|
||||
} else {
|
||||
printShortDescriptionSingleLine(shortDescIndex);
|
||||
}
|
||||
printShortDescriptionDoubleLine(shortDescIndex);
|
||||
|
||||
// prepare cursor for value
|
||||
OLED::setFont(0);
|
||||
|
||||
Reference in New Issue
Block a user