Public Access
M0 step 7: Settings, About, Storage, first-boot setup
- lib/apps_model (host-tested): SettingsMenu (rows, readable values, choices, validation messages) and SetupWizard (names, Region confirmation, timezone; saves only when finished) - AppManager: modal Apps that Home/Back can't leave (setup wizard) - SettingsApp: all settings plus Storage (usage, erase SD behind a dialog) and About (version, node id, battery, memory, uptime) pages, replacing the temporary Diagnostics App - SetupApp: first-boot wizard, opened modally until SetupDone - Node id and default names derived from the MAC like Meshtastic - Widget demo is now hidden (About, then w) - lib_ldf_mode = deep+ so libraries see each other's headers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
+8
-1
@@ -36,7 +36,8 @@ void statusBar(Canvas& c, const StatusInfo& info) {
|
||||
c.setTextDatum(top_left);
|
||||
}
|
||||
|
||||
void list(Canvas& c, const ListModel& model, Rect area, const std::function<std::string(int)>& label) {
|
||||
void list(Canvas& c, const ListModel& model, Rect area, const std::function<std::string(int)>& label,
|
||||
const std::function<std::string(int)>& value) {
|
||||
c.setFont(&fonts::body);
|
||||
c.setTextDatum(top_left);
|
||||
int rows = model.visibleRows();
|
||||
@@ -48,6 +49,12 @@ void list(Canvas& c, const ListModel& model, Rect area, const std::function<std:
|
||||
if (selected) c.fillRect(area.x, y, area.w - 4, kLineHeight, kSelection);
|
||||
c.setTextColor(kText);
|
||||
c.drawString(label(i).c_str(), area.x + 4, y + 1);
|
||||
if (value) {
|
||||
c.setTextColor(selected ? kText : kMuted);
|
||||
c.setTextDatum(top_right);
|
||||
c.drawString(value(i).c_str(), area.x + area.w - 8, y + 1);
|
||||
c.setTextDatum(top_left);
|
||||
}
|
||||
}
|
||||
// Scrollbar
|
||||
if (model.count() > rows) {
|
||||
|
||||
Reference in New Issue
Block a user