Skip to content

Commit

Permalink
Update ESPUI.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Noctr authored Aug 1, 2021
1 parent 5bec1ed commit 1a8407a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ESPUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,21 @@ class Control
void (*callback)(Control*, int);
String value;
ControlColor color;
bool visible;
uint16_t parentControl;
Control* next;


static constexpr uint16_t noParent = 0xffff;

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),
label(label),
callback(callback),
value(value),
color(color),
visible(visible),
parentControl(parentControl),
next(nullptr)
{
Expand All @@ -159,6 +162,7 @@ class Control
callback(control.callback),
value(control.value),
color(control.color),
visible(control.visible),
parentControl(control.parentControl),
next(control.next)
{ }
Expand Down Expand Up @@ -295,3 +299,4 @@ class ESPUIClass

extern ESPUIClass ESPUI;
#endif

0 comments on commit 1a8407a

Please sign in to comment.