1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-06-14 02:30:41 +00:00

Implement separators, and grouped controls

This adds separator elements, and allows arbitrary grouping of controls. For details
see the updates to README.md
This commit is contained in:
Ian Gray
2022-01-08 20:58:22 +00:00
parent cdd0f5bac3
commit 9b228800f9
12 changed files with 392 additions and 894 deletions

View File

@ -714,6 +714,10 @@ uint16_t ESPUIClass::gauge(const char* label, ControlColor color, int number, in
return numberId;
}
uint16_t ESPUIClass::separator(const char* label) {
return addControl(ControlType::Separator, label, "", ControlColor::Alizarin, Control::noParent, nullptr);
}
uint16_t ESPUIClass::accelerometer(const char* label, void (*callback)(Control*, int), ControlColor color)
{
return addControl(ControlType::Accel, label, "", color, Control::noParent, callback);

View File

@ -56,6 +56,7 @@ enum ControlType : uint8_t
Step,
Gauge,
Accel,
Separator,
UpdateOffset = 100,
UpdatePad = 101,
@ -75,6 +76,7 @@ enum ControlType : uint8_t
UpdateStep,
UpdateGauge,
UpdateAccel,
UpdateSeparator,
InitialGui = 200,
Reload = 201,
@ -256,6 +258,7 @@ public:
uint16_t graph(const char* label, ControlColor color); // Create Graph display
uint16_t gauge(const char* label, ControlColor color, int value, int min = 0,
int max = 100); // Create Gauge display
uint16_t separator(const char* label); //Create separator
// Input only
uint16_t accelerometer(const char* label, void (*callback)(Control*, int), ControlColor color);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long