aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-06-27 10:29:00 +0200
committerTectu <joel@unormal.org>2012-06-27 10:29:00 +0200
commitde84bc984cd8e7937d2722e672b6f1f35ca0b985 (patch)
treeb55579fdeff9019a6681b305807c6c8874b2d77e /demos
parent57a68c85d50451789450c57720d6d4a25e9f31a2 (diff)
downloaduGFX-de84bc984cd8e7937d2722e672b6f1f35ca0b985.tar.gz
uGFX-de84bc984cd8e7937d2722e672b6f1f35ca0b985.tar.bz2
uGFX-de84bc984cd8e7937d2722e672b6f1f35ca0b985.zip
example code update
Diffstat (limited to 'demos')
-rwxr-xr-xdemos/gui/main.c9
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) {