summaryrefslogtreecommitdiff
path: root/src/graph_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-08 17:18:51 +0000
committerfrosch <frosch@openttd.org>2012-12-08 17:18:51 +0000
commitb533523258dfd943caa307d28413693bcaa64007 (patch)
tree1236d0e560354d9b22d34269ba5ff99265a94cf6 /src/graph_gui.cpp
parent18a5ba4ad7967c537854a3061df9e600c8f55bf7 (diff)
downloadopenttd-b533523258dfd943caa307d28413693bcaa64007.tar.xz
(svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations.
Diffstat (limited to 'src/graph_gui.cpp')
-rw-r--r--src/graph_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index 0d87bba00..82d862d33 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -504,7 +504,7 @@ public:
}
} else {
/* Draw the label under the data point rather than on the grid line. */
- SetDParam(0, this->x_values_start + this->num_on_x_axis * this->x_values_increment);
+ SetDParamMaxValue(0, this->x_values_start + this->num_on_x_axis * this->x_values_increment);
x_label_width = GetStringBoundingBox(STR_GRAPH_Y_LABEL_NUMBER).width;
}
@@ -1322,10 +1322,10 @@ struct PerformanceRatingDetailWindow : Window {
for (uint i = SCORE_BEGIN; i < SCORE_END; i++) {
score_info_width = max(score_info_width, GetStringBoundingBox(STR_PERFORMANCE_DETAIL_VEHICLES + i).width);
}
- SetDParam(0, 1000);
+ SetDParamMaxValue(0, 1000);
score_info_width += GetStringBoundingBox(STR_BLACK_COMMA).width + WD_FRAMERECT_LEFT;
- SetDParam(0, 100);
+ SetDParamMaxValue(0, 100);
this->bar_width = GetStringBoundingBox(STR_PERFORMANCE_DETAIL_PERCENT).width + 20; // Wide bars!
/* At this number we are roughly at the max; it can become wider,