diff options
Diffstat (limited to '')
-rw-r--r-- | widget_bar.c | 10 |
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, |