summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-10 13:46:36 +0000
committerrubidium <rubidium@openttd.org>2008-05-10 13:46:36 +0000
commitd24442ae8b1b84646982cbdf0ff638caf42e1132 (patch)
tree03bcd6a5e6e6fd5771fa462f05a599c97c6a9661 /src/widgets
parent935434333badb8376f9dde535ddc50c18e9af3aa (diff)
downloadopenttd-d24442ae8b1b84646982cbdf0ff638caf42e1132.tar.xz
(svn r13029) -Codechange: more work in the road to getting the WP macros and byte[WINDOW_CUSTOM_SIZE] removed. This step changes the event handling to work directly on the Window class instead of via a function pointer and big switches while keeping backward compatability while we're rewriting the Windows to the new scheme.
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 37f0ccdf7..6a3d26f4d 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -177,11 +177,7 @@ static void DropDownMenuWndProc(Window *w, WindowEvent *e)
}
if (WP(w, dropdown_d).click_delay != 0 && --WP(w,dropdown_d).click_delay == 0) {
- WindowEvent e;
- e.event = WE_DROPDOWN_SELECT;
- e.we.dropdown.button = WP(w, dropdown_d).parent_button;
- e.we.dropdown.index = WP(w, dropdown_d).selected_index;
- w2->HandleWindowEvent(&e);
+ w2->OnDropdownSelect(WP(w, dropdown_d).parent_button, WP(w, dropdown_d).selected_index);
delete w;
return;
}