From 33422af5b63a50e337da8817ad02639a33f6ea5e Mon Sep 17 00:00:00 2001 From: volker Date: Mon, 23 Mar 2009 17:22:24 +0000 Subject: test intersection of (displayable) widgets git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@996 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- widget_bar.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'widget_bar.c') 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, -- cgit v1.2.3