From 56824b130b786aab49876a71c6c768a17c5a4f1c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 10 Dec 2010 20:31:46 +0000 Subject: Replace txt_widget_t#selectable with a callback function to query whether the widget is selectable. This stops the table code from selecting things that aren't really selectable - eg. empty tables, scrollpanes containing unselectable widgets, etc. Fixes a bug with the warp menu (thanks Proteh). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2207 --- textscreen/txt_radiobutton.c | 1 + 1 file changed, 1 insertion(+) (limited to 'textscreen/txt_radiobutton.c') diff --git a/textscreen/txt_radiobutton.c b/textscreen/txt_radiobutton.c index 7ede7211..efebbf9e 100644 --- a/textscreen/txt_radiobutton.c +++ b/textscreen/txt_radiobutton.c @@ -121,6 +121,7 @@ static void TXT_RadioButtonMousePress(TXT_UNCAST_ARG(radiobutton), txt_widget_class_t txt_radiobutton_class = { + TXT_AlwaysSelectable, TXT_RadioButtonSizeCalc, TXT_RadioButtonDrawer, TXT_RadioButtonKeyPress, -- cgit v1.2.3 From 83fb03a0e09920ec324734e9ae3a6cd15fb041e7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 31 Jan 2011 01:25:47 +0000 Subject: When large numbers of screen resolutions are detected, increase the number of columns in the mode list to fit them all on-screen. Remove superfluous left-side spacing from the checkbox and radio button widgets so that the modes can be packed closer together. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2242 --- textscreen/txt_radiobutton.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'textscreen/txt_radiobutton.c') diff --git a/textscreen/txt_radiobutton.c b/textscreen/txt_radiobutton.c index efebbf9e..00c2c4fc 100644 --- a/textscreen/txt_radiobutton.c +++ b/textscreen/txt_radiobutton.c @@ -34,9 +34,9 @@ static void TXT_RadioButtonSizeCalc(TXT_UNCAST_ARG(radiobutton)) { TXT_CAST_ARG(txt_radiobutton_t, radiobutton); - // Minimum width is the string length + two spaces for padding + // Minimum width is the string length + right-side spaces for padding - radiobutton->widget.w = strlen(radiobutton->label) + 6; + radiobutton->widget.w = strlen(radiobutton->label) + 5; radiobutton->widget.h = 1; } @@ -50,7 +50,7 @@ static void TXT_RadioButtonDrawer(TXT_UNCAST_ARG(radiobutton), int selected) TXT_BGColor(TXT_COLOR_BLUE, 0); TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); - TXT_DrawString(" ("); + TXT_DrawString("("); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); @@ -76,7 +76,7 @@ static void TXT_RadioButtonDrawer(TXT_UNCAST_ARG(radiobutton), int selected) TXT_DrawString(radiobutton->label); - for (i=strlen(radiobutton->label); i < w-6; ++i) + for (i=strlen(radiobutton->label); i < w-5; ++i) { TXT_DrawString(" "); } -- cgit v1.2.3