mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-04 03:06:12 +00:00
refactor(ui): readable compile-time icon authoring (ASCII-art + dims)
Author mini-icons as ASCII-art rows packed to bytes at compile time via constexpr packRow(), so the glyph shape is visible in source while the binary holds only the packed bytes (strings never reach flash, identical to the previous hand-written hex). Bundle each icon's width/height with its data through MiniIcon and the MINI_ICON(name, width, ...) macro, so draw sites carry no magic numbers: miniIconDraw(d, x, y, ICON_CHECK). Also add an unused-by-design skeleton for full-size page icons (≤32 px): packRow32 / BigIcon / BIG_ICON / bigIconDraw, for authoring a future big glyph the same readable way. Existing XBM bitmaps left untouched. Flash size unchanged; verified no ASCII-art strings reach the .elf. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
019f739b8b
commit
c05e722afc
@@ -290,8 +290,8 @@ class QuickMsgScreen : public UIScreen {
|
||||
static void drawAckGlyph(DisplayDriver& d, int x, int top_y, AckState s, int sends = 1) {
|
||||
switch (s) {
|
||||
case ACK_PENDING: miniIconDotRow(d, x, top_y, sends); break;
|
||||
case ACK_OK: miniIconDraw(d, x, top_y, ICON_CHECK, 5, 4); break;
|
||||
case ACK_FAIL: miniIconDraw(d, x, top_y, ICON_CROSS, 4, 4); break;
|
||||
case ACK_OK: miniIconDraw(d, x, top_y, ICON_CHECK); break;
|
||||
case ACK_FAIL: miniIconDraw(d, x, top_y, ICON_CROSS); break;
|
||||
default: break; // ACK_NONE → nothing
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user