(svn r8390) -Codechange (r8384): Rewrote ResizeButtons()

Now it only works on first and last widget to resize
  It now works with offsets correctly (no longer assumes the left is 0)
  It's no longer needed to have a widget right of the ones you resize
  Can handle any number of widgets
This commit is contained in:
bjarni
2007-01-24 14:32:20 +00:00
parent 7fffe8b3d4
commit 058df1b99f
5 changed files with 62 additions and 45 deletions

View File

@@ -497,7 +497,7 @@ static void ClonePlaceObj(const Window *w)
static void ResizeDepotButtons(Window *w)
{
ResizeButtons(w, DEPOT_WIDGET_BUILD, DEPOT_WIDGET_VEHICLE_LIST);
ResizeButtons(w, DEPOT_WIDGET_BUILD, DEPOT_WIDGET_LOCATION);
if (WP(w, depot_d).type == VEH_Train) {
/* Divide the size of DEPOT_WIDGET_SELL into two equally big buttons so DEPOT_WIDGET_SELL and DEPOT_WIDGET_SELL_CHAIN will get the same size.