From 003c82ce37610a66bc61b9380fda6fd74223473b Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 4 Mar 2012 12:06:29 +0000 Subject: Remove some calls to TXT_FGColor by using the new TXT_SaveColors system instead. Remove the unused "embedded color code" system from TXT_Puts. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2508 --- textscreen/txt_checkbox.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'textscreen/txt_checkbox.c') diff --git a/textscreen/txt_checkbox.c b/textscreen/txt_checkbox.c index f8fb00bb..3bd0a054 100644 --- a/textscreen/txt_checkbox.c +++ b/textscreen/txt_checkbox.c @@ -43,11 +43,13 @@ static void TXT_CheckBoxSizeCalc(TXT_UNCAST_ARG(checkbox)) static void TXT_CheckBoxDrawer(TXT_UNCAST_ARG(checkbox)) { TXT_CAST_ARG(txt_checkbox_t, checkbox); + txt_saved_colors_t colors; int i; int w; w = checkbox->widget.w; + TXT_SaveColors(&colors); TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); TXT_DrawString("("); @@ -66,11 +68,10 @@ static void TXT_CheckBoxDrawer(TXT_UNCAST_ARG(checkbox)) TXT_DrawString(") "); + TXT_RestoreColors(&colors); TXT_SetWidgetBG(checkbox); - TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); - TXT_DrawString(checkbox->label); - + for (i=strlen(checkbox->label); i < w-5; ++i) { TXT_DrawString(" "); -- cgit v1.2.3