From ce171535d19aaa0aac7397845dadfd358f952b07 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 26 Apr 2009 10:48:30 +0000 Subject: (svn r16157) -Fix: wrong truncation of refit cost/graph x labels because they were multiline strings being drawn using DrawString instead of DrawStringMultiLine. --- src/graph_gui.cpp | 2 +- src/vehicle_gui.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 090fa2a48..157363b89 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -303,7 +303,7 @@ protected: SetDParam(0, month + STR_MONTH_ABBREV_JAN); SetDParam(1, month + STR_MONTH_ABBREV_JAN + 2); SetDParam(2, year); - DrawString(x, x + GRAPH_X_POSITION_SEPARATION, y, month == 0 ? STR_GRAPH_X_LABEL_MONTH_YEAR : STR_GRAPH_X_LABEL_MONTH, graph_axis_label_colour); + DrawStringMultiLine(x, x + GRAPH_X_POSITION_SEPARATION, y, this->height, month == 0 ? STR_GRAPH_X_LABEL_MONTH_YEAR : STR_GRAPH_X_LABEL_MONTH, graph_axis_label_colour); month += 3; if (month >= 12) { diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index f5f000373..a9cceb76d 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -364,7 +364,7 @@ struct RefitWindow : public Window { SetDParam(0, this->cargo->cargo); SetDParam(1, _returned_refit_capacity); SetDParam(2, cost.GetCost()); - DrawString(2, this->width - 2, this->widget[VRW_INFOPANEL].top + 1, STR_REFIT_NEW_CAPACITY_COST_OF_REFIT, TC_FROMSTRING); + DrawStringMultiLine(2, this->width - 2, this->widget[VRW_INFOPANEL].top + 1, this->widget[VRW_INFOPANEL].bottom, STR_REFIT_NEW_CAPACITY_COST_OF_REFIT, TC_FROMSTRING); } } } -- cgit v1.2.3-70-g09d2