diff options
author | Simon Howard | 2011-06-13 22:21:37 +0000 |
---|---|---|
committer | Simon Howard | 2011-06-13 22:21:37 +0000 |
commit | 391e7466b1efb7cbede4a1c356a210d9e7ee616b (patch) | |
tree | 90d13346d9cd3636df44290ded13d59ae3712543 /textscreen/txt_window.c | |
parent | fa328faf056affa216f2f3a8764ca0d56262efe9 (diff) | |
parent | 822664b4ff873d462370e9e96a9d91e6066c221d (diff) | |
download | chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.gz chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.bz2 chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.zip |
Merge from trunk.
Subversion-branch: /branches/raven-branch
Subversion-revision: 2347
Diffstat (limited to 'textscreen/txt_window.c')
-rw-r--r-- | textscreen/txt_window.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c index 46e71d3a..cd8a6c7a 100644 --- a/textscreen/txt_window.c +++ b/textscreen/txt_window.c @@ -40,6 +40,13 @@ void TXT_SetWindowAction(txt_window_t *window, } window->actions[position] = action; + + // Maintain parent pointer. + + if (action != NULL) + { + action->widget.parent = &window->table.widget; + } } txt_window_t *TXT_NewWindow(char *title) @@ -158,7 +165,7 @@ static void LayoutActionArea(txt_window_t *window) TXT_CalcWidgetSize(widget); - widget->x = window->window_x + 2; + widget->x = window->window_x + 1; widget->y = window->window_y + window->window_h - widget->h - 1; // Adjust available space: @@ -175,7 +182,7 @@ static void LayoutActionArea(txt_window_t *window) TXT_CalcWidgetSize(widget); - widget->x = window->window_x + window->window_w - 2 - widget->w; + widget->x = window->window_x + window->window_w - 1 - widget->w; widget->y = window->window_y + window->window_h - widget->h - 1; // Adjust available space: @@ -220,7 +227,7 @@ static void CalcActionAreaSize(txt_window_t *window, txt_widget_t *widget; int i; - *w = 1; + *w = 0; *h = 0; // Calculate the width of all the action widgets and use this @@ -233,7 +240,7 @@ static void CalcActionAreaSize(txt_window_t *window, if (widget != NULL) { TXT_CalcWidgetSize(widget); - *w += widget->w + 1; + *w += widget->w; if (widget->h > *h) { |