diff options
author | Simon Howard | 2012-03-04 12:06:29 +0000 |
---|---|---|
committer | Simon Howard | 2012-03-04 12:06:29 +0000 |
commit | 003c82ce37610a66bc61b9380fda6fd74223473b (patch) | |
tree | 6e6a6bbc0f767ff938e2667d9a8b79d27fb2b87b /textscreen/txt_checkbox.c | |
parent | 9ffd1cc4d4bbd2b2799cbd0bf927fc4f30aed63e (diff) | |
download | chocolate-doom-003c82ce37610a66bc61b9380fda6fd74223473b.tar.gz chocolate-doom-003c82ce37610a66bc61b9380fda6fd74223473b.tar.bz2 chocolate-doom-003c82ce37610a66bc61b9380fda6fd74223473b.zip |
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
Diffstat (limited to 'textscreen/txt_checkbox.c')
-rw-r--r-- | textscreen/txt_checkbox.c | 7 |
1 files changed, 4 insertions, 3 deletions
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(" "); |