mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-21 02:35:57 +10:00
* InkHUD: Region Picker on initial setup * Added Node Config menu with Lora Region Picker * Role picker * Preset Picker * Timezone picker added * Power save mode and bluetooth configs * Config section Headers * Channel Config * Cleaning some behavior * Add back to all Options * Display config added * Position Toggle added * Network Config for ESP32 * Wifi details * Reduce line spacing to fit more content * Recent list with checkboxes * Timezone labels easier to understand * Trunk fix * Added "Saving Changes" screen when reboot is needed * Trunk fix * Make Tips show after first boot if the region is Unset * Added ResetDB and keep only favorite commands * quick fix to joystick * Trunk Fix * Fix to tips to work with new joystick input * Added ADC multiplier value display on power config * added ADC calibration feature * Fixed missing stray endiff * GPS toggle now is aware if gps is present.
54 lines
1.3 KiB
C++
54 lines
1.3 KiB
C++
#ifdef MESHTASTIC_INCLUDE_INKHUD
|
|
|
|
/*
|
|
|
|
One item of a MenuPage, in InkHUD::MenuApplet
|
|
|
|
Added to MenuPages in InkHUD::showPage
|
|
|
|
- May open a submenu or exit
|
|
- May perform an action
|
|
- May toggle a bool value, shown by a checkbox
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "configuration.h"
|
|
|
|
#include "./MenuAction.h"
|
|
#include "./MenuPage.h"
|
|
|
|
namespace NicheGraphics::InkHUD
|
|
{
|
|
|
|
// One item of a MenuPage
|
|
class MenuItem
|
|
{
|
|
public:
|
|
std::string label;
|
|
MenuAction action = NO_ACTION;
|
|
MenuPage nextPage = EXIT;
|
|
bool *checkState = nullptr;
|
|
bool isHeader = false; // Non-selectable section label
|
|
|
|
// Various constructors, depending on the intended function of the item
|
|
|
|
MenuItem(const char *label, MenuPage nextPage) : label(label), nextPage(nextPage) {}
|
|
MenuItem(const char *label, MenuAction action) : label(label), action(action) {}
|
|
MenuItem(const char *label, MenuAction action, MenuPage nextPage) : label(label), action(action), nextPage(nextPage) {}
|
|
MenuItem(const char *label, MenuAction action, MenuPage nextPage, bool *checkState)
|
|
: label(label), action(action), nextPage(nextPage), checkState(checkState)
|
|
{
|
|
}
|
|
static MenuItem Header(const char *label)
|
|
{
|
|
MenuItem item(label, NO_ACTION, EXIT);
|
|
item.isHeader = true;
|
|
return item;
|
|
}
|
|
};
|
|
|
|
} // namespace NicheGraphics::InkHUD
|
|
|
|
#endif |