aboutsummaryrefslogtreecommitdiffstats
path: root/gui.c
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-06-27 10:10:45 +0200
committerTectu <joel@unormal.org>2012-06-27 10:10:45 +0200
commitdb7d8d0aeacc61e1fe75072b802e5f8790591181 (patch)
tree431e0644433bda03d8a931d5ed86db5833ce095d /gui.c
parent3d041a9d4b8c6592468b4b6e7dca29b4e243d795 (diff)
downloaduGFX-db7d8d0aeacc61e1fe75072b802e5f8790591181.tar.gz
uGFX-db7d8d0aeacc61e1fe75072b802e5f8790591181.tar.bz2
uGFX-db7d8d0aeacc61e1fe75072b802e5f8790591181.zip
added guiDeleteElement
Diffstat (limited to 'gui.c')
-rw-r--r--gui.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui.c b/gui.c
index 29a40564..a1dc3431 100644
--- a/gui.c
+++ b/gui.c
@@ -29,7 +29,7 @@ static uint16_t addNode(struct guiNode_t *newNode) {
return 1;
}
-static void deleteNode(char *name) {
+static uint8_t deleteNode(char *name) {
struct guiNode_t *pointer, *pointer1;
if(firstGUI != NULL) {
@@ -53,7 +53,11 @@ static void deleteNode(char *name) {
}
}
+
+ return 1; // successful
}
+
+ return 0; // not successful
}
void guiPrintNodes(BaseSequentialStream *chp) {
@@ -127,6 +131,10 @@ Thread *guiInit(uint16_t interval, tprio_t priority) {
return tp;
}
+uint8_t guiDeleteElement(char *name) {
+ return deleteNode(name);
+}
+
uint8_t guiDrawButton(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, char *str, uint16_t fontColor, uint16_t buttonColor, char *name, uint8_t *active, uint8_t *state) {
struct guiNode_t *newNode;