1
0
forked from me/IronOS

Implement OLED::drawUnavailableIcon() to simplify duplicated calls (#1947)

This commit is contained in:
Ivan Zorin
2024-07-11 17:34:12 +03:00
committed by GitHub
parent c19e882338
commit 18e936ae6d
2 changed files with 15 additions and 18 deletions

View File

@@ -136,6 +136,7 @@ public:
static void drawBattery(uint8_t state) { drawSymbol(3 + (state > 10 ? 10 : state)); }
// Draws a checkbox
static void drawCheckbox(bool state) { drawSymbol((state) ? 16 : 17); }
inline static void drawUnavailableIcon() { drawArea(OLED_WIDTH - 16 - 2, 0, 16, 16, UnavailableIcon); }
static void debugNumber(int32_t val, FontStyle fontStyle);
static void drawHex(uint32_t x, FontStyle fontStyle, uint8_t digits);
static void drawSymbol(uint8_t symbolID); // Used for drawing symbols of a predictable width