(svn r6562) -Codechange: merged the vehicle list window widget arrays

It made no sense to maintain 8 nearly identically arrays when a single one can do the job
  Also made the two buttons always use half of the bottom width each, even when resizing
This commit is contained in:
bjarni
2006-09-28 23:05:03 +00:00
parent 1ae8aa4b80
commit 4ccdb0686f
13 changed files with 275 additions and 399 deletions

View File

@@ -21,6 +21,7 @@
#include "waypoint.h"
#include "train.h"
#include "water_map.h"
#include "vehicle_gui.h"
static int OrderGetSel(const Window *w)
{
@@ -463,13 +464,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
OrderClick_Transfer(w, v);
break;
case 11: /* Vehicle with same shared Orders button */
switch (v->type) {
case VEH_Train: ShowVehWithSharedOrdersTrains(v); break;
case VEH_Road: ShowVehWithSharedOrdersRoadVehicles(v); break;
case VEH_Ship: ShowVehWithSharedOrdersShips(v); break;
case VEH_Aircraft: ShowVehWithSharedOrdersAircraft(v); break;
default: NOT_REACHED(); break;
}
ShowVehWithSharedOrders(v, v->type);
break;
}
} break;