diff options
author | peter1138 <peter1138@openttd.org> | 2008-01-14 16:10:58 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-01-14 16:10:58 +0000 |
commit | e4c05f8d789b8a83159313d3ce745745038a7b67 (patch) | |
tree | 3a4930e55ee49d4a3da2e6070bc4f6751fd11cda /src/group_gui.cpp | |
parent | 7beb63a93bf48b38cbd1e6a258968acf50099a2c (diff) | |
download | openttd-e4c05f8d789b8a83159313d3ce745745038a7b67.tar.xz |
(svn r11848) -Codechange: New class-based drop down list functionality. Lists are now dynamically generated, and can include parameters, or be extended however needed.
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r-- | src/group_gui.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 7175e555f..9e97db1be 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -23,6 +23,7 @@ #include "viewport_func.h" #include "gfx_func.h" #include "player_func.h" +#include "widgets/dropdown_func.h" #include "table/strings.h" #include "table/sprites.h" @@ -328,14 +329,7 @@ static void GroupWndProc(Window *w, WindowEvent *e) /* The drop down menu is out, *but* it may not be used, retract it. */ if (gv->l.list_length == 0 && w->IsWidgetLowered(GRP_WIDGET_MANAGE_VEHICLES_DROPDOWN)) { w->RaiseWidget(GRP_WIDGET_MANAGE_VEHICLES_DROPDOWN); - Window **w2; - FOR_ALL_WINDOWS(w2) { - if (w->window_class == WP(*w2, dropdown_d).parent_wnd_class && - w->window_number == WP(*w2, dropdown_d).parent_wnd_num) { - DeleteWindow(*w2); - break; - } - } + HideDropDownMenu(w); } /* Disable all lists management button when the list is empty */ |