(svn r11848) -Codechange: New class-based drop down list functionality. Lists are now dynamically generated, and can include parameters, or be extended however needed.

This commit is contained in:
peter1138
2008-01-14 16:10:58 +00:00
parent c6de18c3db
commit 1fa2285327
17 changed files with 379 additions and 252 deletions

View File

@@ -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 */