diff options
author | alberth <alberth@openttd.org> | 2009-09-16 19:00:53 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-09-16 19:00:53 +0000 |
commit | 24e9ee8ab4244b5562d3a780b153b33d1a5b64df (patch) | |
tree | b393d386de7c7af4e76727b9b33d531b4feacfd1 /src/order_gui.cpp | |
parent | 893f1282cb308fdf38160b68c5b30d3a6180bbda (diff) | |
download | openttd-24e9ee8ab4244b5562d3a780b153b33d1a5b64df.tar.xz |
(svn r17557) -Codechange: Pass left and right edge to DrawOrderString().
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r-- | src/order_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 00b5843dd..70c18c173 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -183,7 +183,7 @@ static int DepotActionStringIndex(const Order *order) } } -void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int y, bool selected, bool timetable, int width) +void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int y, bool selected, bool timetable, int left, int right) { StringID str = (v->cur_order_index == order_index) ? STR_ORDER_SELECTED : STR_ORDER; SetDParam(6, STR_EMPTY); @@ -287,7 +287,7 @@ void DrawOrderString(const Vehicle *v, const Order *order, int order_index, int } SetDParam(0, order_index + 1); - DrawString(2, width + 2, y, str, selected ? TC_WHITE : TC_BLACK); + DrawString(left, right, y, str, selected ? TC_WHITE : TC_BLACK); } @@ -842,7 +842,7 @@ public: /* Don't draw anything if it extends past the end of the window. */ if (!this->vscroll.IsVisible(i)) break; - DrawOrderString(this->vehicle, order, i, y, i == this->selected_order, false, this->widget[ORDER_WIDGET_ORDER_LIST].right - 4); + DrawOrderString(this->vehicle, order, i, y, i == this->selected_order, false, this->widget[ORDER_WIDGET_ORDER_LIST].left + 2, this->widget[ORDER_WIDGET_ORDER_LIST].right - 2); y += ORDER_LIST_LINE_HEIGHT; i++; |