summaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-07-28 08:49:29 +0000
committercelestar <celestar@openttd.org>2005-07-28 08:49:29 +0000
commit727dea58244fd5f898b3ba2ac99e0d4c6ebe3812 (patch)
tree22cc5e3249b18e166df3a4845fb3ea769391dfef /window.c
parent4a4829fa0e74dbb29741030163cadc5b3adf0932 (diff)
downloadopenttd-727dea58244fd5f898b3ba2ac99e0d4c6ebe3812.tar.xz
(svn r2734) -Feature: The Main Toolbar Dropdown Menu can now display disabled items
Diffstat (limited to 'window.c')
-rw-r--r--window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/window.c b/window.c
index e51b07a72..04f679c5e 100644
--- a/window.c
+++ b/window.c
@@ -1534,7 +1534,7 @@ int GetMenuItemIndex(Window *w, int x, int y)
if ((x -= w->left) >= 0 && x < w->width && (y -= w->top + 1) >= 0) {
y /= 10;
- if (y < WP(w,menu_d).item_count)
+ if (y < WP(w,menu_d).item_count && !HASBIT(WP(w,menu_d).disabled_items, y))
return y;
}
return -1;