1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-24 07:20:53 +00:00

Update ESPUI.h

This commit is contained in:
Noctr 2021-08-01 23:54:50 +07:00 committed by GitHub
parent 5bec1ed988
commit 1a8407a0ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,18 +134,21 @@ public:
void (*callback)(Control*, int); void (*callback)(Control*, int);
String value; String value;
ControlColor color; ControlColor color;
bool visible;
uint16_t parentControl; uint16_t parentControl;
Control* next; Control* next;
static constexpr uint16_t noParent = 0xffff; static constexpr uint16_t noParent = 0xffff;
Control(ControlType type, const char* label, void (*callback)(Control*, int), const String& value, Control(ControlType type, const char* label, void (*callback)(Control*, int), const String& value,
ControlColor color, uint16_t parentControl = Control::noParent) ControlColor color, bool visible = true, uint16_t parentControl = Control::noParent)
: type(type), : type(type),
label(label), label(label),
callback(callback), callback(callback),
value(value), value(value),
color(color), color(color),
visible(visible),
parentControl(parentControl), parentControl(parentControl),
next(nullptr) next(nullptr)
{ {
@ -159,6 +162,7 @@ public:
callback(control.callback), callback(control.callback),
value(control.value), value(control.value),
color(control.color), color(control.color),
visible(control.visible),
parentControl(control.parentControl), parentControl(control.parentControl),
next(control.next) next(control.next)
{ } { }
@ -295,3 +299,4 @@ private:
extern ESPUIClass ESPUI; extern ESPUIClass ESPUI;
#endif #endif