summaryrefslogtreecommitdiff
path: root/src/autoreplace_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-07-22 16:13:42 +0000
committerpeter1138 <peter1138@openttd.org>2008-07-22 16:13:42 +0000
commit759739db3fbe6ec6b731e85da08e11352695cecb (patch)
treeac53d29fff555f0d12825f3db5bf9c97ea31c9f4 /src/autoreplace_gui.cpp
parent54d7d77d4c165d25bfd9f3e9a377a67ed8769393 (diff)
downloadopenttd-759739db3fbe6ec6b731e85da08e11352695cecb.tar.xz
(svn r13784) -Codechange: Truncate vehicle names in purchase list to width of window.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r--src/autoreplace_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 7dd69d3cc..964ded850 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -27,7 +27,7 @@
#include "table/sprites.h"
#include "table/strings.h"
-void DrawEngineList(VehicleType type, int x, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, int count_location, GroupID selected_group);
+void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, int count_location, GroupID selected_group);
static const StringID _rail_types_list[] = {
STR_RAIL_VEHICLES,
@@ -384,7 +384,7 @@ public:
EngineID end = min((i == 0 ? this->vscroll.cap : this->vscroll2.cap) + start, list->Length());
/* Do the actual drawing */
- DrawEngineList((VehicleType)this->window_number, this->widget[widget].left + 2, this->widget[widget].top + 1, list, start, end, this->sel_engine[i], i == 0 ? this->widget[RVW_WIDGET_LEFT_MATRIX].right - 2 : 0, selected_group);
+ DrawEngineList((VehicleType)this->window_number, this->widget[widget].left + 2, this->widget[widget].right, this->widget[widget].top + 1, list, start, end, this->sel_engine[i], i == 0 ? this->widget[RVW_WIDGET_LEFT_MATRIX].right - 2 : 0, selected_group);
/* Also draw the details if an engine is selected */
if (this->sel_engine[i] != INVALID_ENGINE) {