diff options
author | bjarni <bjarni@openttd.org> | 2007-01-24 14:32:20 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2007-01-24 14:32:20 +0000 |
commit | 8c098db7a81546f3154b845e123bfcb2731d4f35 (patch) | |
tree | 3a5b9fe40052ed1cff61cb6dbf3a984c0ecf84f0 /src/train_gui.cpp | |
parent | 0996de79df839647968838498d1953319705606d (diff) | |
download | openttd-8c098db7a81546f3154b845e123bfcb2731d4f35.tar.xz |
(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
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r-- | src/train_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp index b952b3534..874b9cb55 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -560,7 +560,7 @@ do_change_service_int: break; case WE_RESIZE: - if (e->we.sizing.diff.x != 0) ResizeButtons(w, 9, 13); + if (e->we.sizing.diff.x != 0) ResizeButtons(w, 9, 12); if (e->we.sizing.diff.y == 0) break; w->vscroll.cap += e->we.sizing.diff.y / 14; @@ -582,7 +582,7 @@ static const Widget _train_details_widgets[] = { { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 89, 152, 163, STR_013C_CARGO, STR_884F_SHOW_DETAILS_OF_CARGO_CARRIED}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 90, 178, 152, 163, STR_013D_INFORMATION, STR_8850_SHOW_DETAILS_OF_TRAIN_VEHICLES}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 179, 268, 152, 163, STR_013E_CAPACITIES, STR_8851_SHOW_CAPACITIES_OF_EACH}, -{ WWT_PUSHTXTBTN, RESIZE_TB, 14, 269, 357, 152, 163, STR_013E_TOTAL_CARGO, STR_8852_SHOW_TOTAL_CARGO}, +{ WWT_PUSHTXTBTN, RESIZE_RTB, 14, 269, 357, 152, 163, STR_013E_TOTAL_CARGO, STR_8852_SHOW_TOTAL_CARGO}, { WWT_RESIZEBOX, RESIZE_LRTB, 14, 358, 369, 152, 163, 0x0, STR_RESIZE_BUTTON}, { WIDGETS_END}, }; |