aboutsummaryrefslogtreecommitdiffstats
path: root/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'gui.c')
-rw-r--r--gui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gui.c b/gui.c
index 5bafb640..7e6652f4 100644
--- a/gui.c
+++ b/gui.c
@@ -80,7 +80,7 @@ void guiPrintElements(BaseSequentialStream *chp) {
}
static void guiThread(const uint16_t interval) {
- uint16_t x, y;
+ uint16_t x, y, color;
struct guiNode_t *node;
chRegSetThreadName("GUI");
@@ -94,10 +94,11 @@ static void guiThread(const uint16_t interval) {
// we got a button
if(node->type == button) {
- if(x >= node->x0 && x <= node->x1 && y >= node->y0 && y <= node->y1)
+ if(x >= node->x0 && x <= node->x1 && y >= node->y0 && y <= node->y1) {
*(node->state) = 1;
- else
+ } else {
*(node->state) = 0;
+ }
} else {
*(node->state) = 0;
}
@@ -149,6 +150,7 @@ uint8_t guiDrawButton(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, char *
newNode->y0 = y0;
newNode->x1 = x1;
newNode->y1 = y1;
+ newNode->shadow = shadow;
newNode->active = active;
newNode->state = state;