aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-07-09 02:57:40 +0200
committerTectu <joel@unormal.org>2012-07-09 02:57:40 +0200
commit3e1a25f312037144ede8b7a4580a641e85bccc0f (patch)
treea1fbcfa2af8a39ab8996da3eb820c6826591da53
parenta52e7325640ffc434f535523dc8c662f4a34bf35 (diff)
downloaduGFX-3e1a25f312037144ede8b7a4580a641e85bccc0f.tar.gz
uGFX-3e1a25f312037144ede8b7a4580a641e85bccc0f.tar.bz2
uGFX-3e1a25f312037144ede8b7a4580a641e85bccc0f.zip
added member shadow to guiNode_t struct
-rw-r--r--glcdconf.h3
-rw-r--r--gui.c8
-rw-r--r--gui.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/glcdconf.h b/glcdconf.h
index d7a9f583..5001a9fc 100644
--- a/glcdconf.h
+++ b/glcdconf.h
@@ -20,5 +20,8 @@
#define TOUCHPAD_USE_XPT2046
+/***** GUI OPTIONS *****/
+#define GUI_USE_ANIMATIONS
+
#endif
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;
diff --git a/gui.h b/gui.h
index 625da8c7..c0a006ec 100644
--- a/gui.h
+++ b/gui.h
@@ -16,6 +16,7 @@ struct guiNode_t {
uint16_t y1;
uint16_t r1;
uint16_t r2;
+ uint16_t shadow;
uint8_t orientation;
uint8_t *active;
uint8_t *state;