summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-01-04 13:45:58 +0000
committertruelight <truelight@openttd.org>2005-01-04 13:45:58 +0000
commit86fa7720f98c35e56f0c86ddb969c642b9db64be (patch)
treecf09cbae56035b7bd750f4cd231b622ae130794e
parenta9b3d8c998c524bb4fad27d6e14b64d391301c1f (diff)
downloadopenttd-86fa7720f98c35e56f0c86ddb969c642b9db64be.tar.xz
(svn r1368) -Fix: Disabled dropdown menu options are gray again (instead of blue)
(redid revision 1357)
-rw-r--r--widget.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/widget.c b/widget.c
index b06aef1eb..e64adbae2 100644
--- a/widget.c
+++ b/widget.c
@@ -443,7 +443,7 @@ static WindowNumber _dropdown_windownum;
static byte _dropdown_var1;
static byte _dropdown_var2;
-static Widget _dropdown_menu_widgets[] = {
+static const Widget _dropdown_menu_widgets[] = {
{ WWT_IMGBTN, RESIZE_NONE, 0, 0, 0, 0, 0, 0x0, STR_NULL},
{ WIDGETS_END},
};
@@ -497,11 +497,11 @@ void DropdownMenuWndProc(Window *w, WindowEvent *e)
if (dis & 1) {
GfxFillRect(x, y, x+w->width-3, y + 9, 0x8000 +
- _color_list[_dropdown_menu_widgets[0].color].window_color_bga);
+ _color_list[w->widget[0].color].window_color_bga);
}
} else {
- int color_1 = _color_list[_dropdown_menu_widgets[0].color].window_color_1a;
- int color_2 = _color_list[_dropdown_menu_widgets[0].color].window_color_2;
+ int color_1 = _color_list[w->widget[0].color].window_color_1a;
+ int color_2 = _color_list[w->widget[0].color].window_color_2;
GfxFillRect(x+1, y+3, x+w->width-5, y+3, color_1);
GfxFillRect(x+1, y+4, x+w->width-5, y+4, color_2);
}
@@ -617,8 +617,6 @@ void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int butt
}
}
- _dropdown_menu_widgets[0].color = wi->color;
-
w2 = AllocateWindow(
w->left + wi[-1].left + 1,
w->top + wi->bottom + 2,