aboutsummaryrefslogtreecommitdiffstats
path: root/widget_bar.c
diff options
context:
space:
mode:
authorvolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-03-23 17:22:24 +0000
committervolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-03-23 17:22:24 +0000
commit33422af5b63a50e337da8817ad02639a33f6ea5e (patch)
treecf463a8f292bfb52757c5413a8b8e628ac5f7605 /widget_bar.c
parent14e0be7a792ccf87e2e377501fa6e0de8836c1d5 (diff)
downloadlcd4linux-33422af5b63a50e337da8817ad02639a33f6ea5e.tar.gz
test intersection of (displayable) widgets
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@996 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget_bar.c')
-rw-r--r--widget_bar.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/widget_bar.c b/widget_bar.c
index 7e453aa..7558550 100644
--- a/widget_bar.c
+++ b/widget_bar.c
@@ -22,7 +22,7 @@
*
*/
-/*
+/*
* exported functions:
*
* WIDGET_CLASS Widget_Bar
@@ -154,15 +154,23 @@ int widget_bar_init(WIDGET * Self)
switch (toupper(*c)) {
case 'E':
Bar->direction = DIR_EAST;
+ Self->x2 = Self->col + Bar->length - 1;
+ Self->y2 = Self->row;
break;
case 'W':
Bar->direction = DIR_WEST;
+ Self->x2 = Self->col + Bar->length - 1;
+ Self->y2 = Self->row;
break;
case 'N':
Bar->direction = DIR_NORTH;
+ Self->x2 = Self->col;
+ Self->y2 = Self->row + Bar->length - 1;
break;
case 'S':
Bar->direction = DIR_SOUTH;
+ Self->x2 = Self->col;
+ Self->y2 = Self->row + Bar->length - 1;
break;
default:
error("widget %s has unknown direction '%s'; known directions: 'E', 'W', 'N', 'S'; using 'E(ast)'", Self->name,