summaryrefslogtreecommitdiff
path: root/textscreen/txt_widget.c
diff options
context:
space:
mode:
authorSimon Howard2012-10-28 23:45:08 +0000
committerSimon Howard2012-10-28 23:45:08 +0000
commit993315afc4b1fddaf8952e7e55d1373b5052dd7c (patch)
tree94aa07d101ddced8404ceaa92ce051ed17fe2a88 /textscreen/txt_widget.c
parenta1b2ce54d02823aa85c7df6aa016c567185451ae (diff)
parentad11652dcd8e0923432ad272e6535276c51d39eb (diff)
downloadchocolate-doom-993315afc4b1fddaf8952e7e55d1373b5052dd7c.tar.gz
chocolate-doom-993315afc4b1fddaf8952e7e55d1373b5052dd7c.tar.bz2
chocolate-doom-993315afc4b1fddaf8952e7e55d1373b5052dd7c.zip
Merge from trunk.
Subversion-branch: /branches/v2-branch Subversion-revision: 2537
Diffstat (limited to 'textscreen/txt_widget.c')
-rw-r--r--textscreen/txt_widget.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/textscreen/txt_widget.c b/textscreen/txt_widget.c
index 7d31ad68..e0303531 100644
--- a/textscreen/txt_widget.c
+++ b/textscreen/txt_widget.c
@@ -162,14 +162,22 @@ void TXT_CalcWidgetSize(TXT_UNCAST_ARG(widget))
void TXT_DrawWidget(TXT_UNCAST_ARG(widget))
{
TXT_CAST_ARG(txt_widget_t, widget);
+ txt_saved_colors_t colors;
+
+ // The drawing function might change the fg/bg colors,
+ // so make sure we restore them after it's done.
+
+ TXT_SaveColors(&colors);
// For convenience...
TXT_GotoXY(widget->x, widget->y);
// Call drawer method
-
+
widget->widget_class->drawer(widget);
+
+ TXT_RestoreColors(&colors);
}
void TXT_DestroyWidget(TXT_UNCAST_ARG(widget))
@@ -319,7 +327,7 @@ void TXT_SetWidgetBG(TXT_UNCAST_ARG(widget))
}
else
{
- TXT_BGColor(TXT_WINDOW_BACKGROUND, 0);
+ // Use normal window background.
}
}