summaryrefslogtreecommitdiff
path: root/textscreen/txt_table.c
diff options
context:
space:
mode:
authorSimon Howard2006-05-23 00:07:02 +0000
committerSimon Howard2006-05-23 00:07:02 +0000
commit1de18c1397bfb069771c02336e47b89e098b6f43 (patch)
tree6fc8d843e31110213543daae8edb145c9f045e05 /textscreen/txt_table.c
parent7666630775f51fe991005ff8219cb4cc0cb70327 (diff)
downloadchocolate-doom-1de18c1397bfb069771c02336e47b89e098b6f43.tar.gz
chocolate-doom-1de18c1397bfb069771c02336e47b89e098b6f43.tar.bz2
chocolate-doom-1de18c1397bfb069771c02336e47b89e098b6f43.zip
Add window action class for action area labels at the bottom of windows.
Adjust txt_table_t to expand tables to their maximum width when they only have one column (ensures separators reach the window edges). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 515
Diffstat (limited to 'textscreen/txt_table.c')
-rw-r--r--textscreen/txt_table.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c
index ccf81db2..4c502c0c 100644
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -365,6 +365,15 @@ static void TXT_TableDrawer(TXT_UNCAST_ARG(table), int w, int selected)
CalcRowColSizes(table, row_heights, column_widths);
+ // If this table only has one column, expand column size to fit
+ // the display width. Ensures that separators reach the window edges
+ // when drawing windows.
+
+ if (table->columns == 1)
+ {
+ column_widths[0] = w;
+ }
+
// Draw all cells
draw_y = origin_y;