summaryrefslogtreecommitdiff
path: root/textscreen/txt_button.c
diff options
context:
space:
mode:
authorSimon Howard2006-06-20 18:48:21 +0000
committerSimon Howard2006-06-20 18:48:21 +0000
commitcef6abcea6218c9638ba67edca9755f7d3fa359f (patch)
treedbf0a32d8864397d78bf3723151ed2508b5542ef /textscreen/txt_button.c
parent87cbe9dbbe6a0921f89e08d79b87fad7aec37cd8 (diff)
downloadchocolate-doom-cef6abcea6218c9638ba67edca9755f7d3fa359f.tar.gz
chocolate-doom-cef6abcea6218c9638ba67edca9755f7d3fa359f.tar.bz2
chocolate-doom-cef6abcea6218c9638ba67edca9755f7d3fa359f.zip
Always add a bit of padding inside windows (removes the need to add padding
explicitly in labels). Set the window title from the desktop title. Only draw widget selection highlight in the window with focus (top window). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 560
Diffstat (limited to 'textscreen/txt_button.c')
-rw-r--r--textscreen/txt_button.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c
index 26e148b0..9cd20169 100644
--- a/textscreen/txt_button.c
+++ b/textscreen/txt_button.c
@@ -13,9 +13,7 @@ static void TXT_ButtonSizeCalc(TXT_UNCAST_ARG(button))
{
TXT_CAST_ARG(txt_button_t, button);
- // Minimum width is the string length + two spaces for padding
-
- button->widget.w = strlen(button->label) + 2;
+ button->widget.w = strlen(button->label);
button->widget.h = 1;
}
@@ -29,7 +27,6 @@ static void TXT_ButtonDrawer(TXT_UNCAST_ARG(button), int selected)
TXT_BGColor(TXT_COLOR_BLUE, 0);
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
- TXT_DrawString(" ");
if (selected)
{
@@ -38,7 +35,7 @@ static void TXT_ButtonDrawer(TXT_UNCAST_ARG(button), int selected)
TXT_DrawString(button->label);
- for (i=strlen(button->label); i < w-2; ++i)
+ for (i=strlen(button->label); i < w; ++i)
{
TXT_DrawString(" ");
}