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:
@ -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);
|
||||
|
@ -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
Reference in New Issue
Block a user