diff options
author | bjarni <bjarni@openttd.org> | 2007-01-24 02:36:55 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2007-01-24 02:36:55 +0000 |
commit | 4dd0d007b1cf1f595fba5d690a096e69c7bbca20 (patch) | |
tree | 6db06687d695ee0417f9694efa9466b841ab1481 /src/depot_gui.cpp | |
parent | 802d1065b2d181ad71b4a1506e5af44b60907859 (diff) | |
download | openttd-4dd0d007b1cf1f595fba5d690a096e69c7bbca20.tar.xz |
(svn r8384) -Codechange: [GUI] instead of writing a resize button function for each window, a global ResizeButtons() is added
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r-- | src/depot_gui.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 71ab1e799..4b5166da3 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -497,13 +497,7 @@ static void ClonePlaceObj(const Window *w) static void ResizeDepotButtons(Window *w) { - /* We got the widget moved around. Now we will make some widgets to fill the gap between some widgets in equal sizes */ - - /* Make the buttons in the bottom equal in size */ - w->widget[DEPOT_WIDGET_BUILD].right = w->widget[DEPOT_WIDGET_LOCATION].right / 3; - w->widget[DEPOT_WIDGET_LOCATION].left = w->widget[DEPOT_WIDGET_BUILD].right * 2; - w->widget[DEPOT_WIDGET_CLONE].left = w->widget[DEPOT_WIDGET_BUILD].right + 1; - w->widget[DEPOT_WIDGET_CLONE].right = w->widget[DEPOT_WIDGET_LOCATION].left - 1; + ResizeButtons(w, DEPOT_WIDGET_BUILD, DEPOT_WIDGET_VEHICLE_LIST); 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. |