diff options
Diffstat (limited to 'demos')
-rwxr-xr-x | demos/gui/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/demos/gui/main.c b/demos/gui/main.c index d37c993c..16fdc14e 100755 --- a/demos/gui/main.c +++ b/demos/gui/main.c @@ -54,8 +54,13 @@ int main(void) { clearActive = active;
// draw a button to set, and one to clear the LED
- guiDrawButton(10, 10, 60, 60, "Set", Black, Yellow, &setActive, &setState);
- guiDrawButton(70, 10, 120, 60, "Clear", Black, Red, &clearActive, &clearState);
+ guiDrawButton(10, 10, 60, 60, "Set", Black, Yellow, "SetButton", &setActive, &setState);
+ guiDrawButton(70, 10, 120, 60, "Clear", Black, Red, "ClearButton", &clearActive, &clearState);
+
+ // you can delete a GUI element at any time from the GUI. You have to pass the GUI element name here.
+ // please note that you have to redraw the screen to delete the element yourself.
+ // guiDeleteElement("SetButton");
+ // guiDeleteElement("ClearButton");
while (TRUE) {
|