(svn r15807) -Codechange: let the build vehicle gui helper function pass around left and right instead of only left and assuming infinite width.

This commit is contained in:
rubidium
2009-03-22 11:06:25 +00:00
parent ead0a6a6e5
commit dfe5dad5f6
4 changed files with 52 additions and 53 deletions

View File

@@ -327,7 +327,7 @@ public:
/* Also draw the details if an engine is selected */
if (this->sel_engine[i] != INVALID_ENGINE) {
const Widget *wi = &this->widget[i == 0 ? RVW_WIDGET_LEFT_DETAILS : RVW_WIDGET_RIGHT_DETAILS];
int text_end = DrawVehiclePurchaseInfo(wi->left + 2, wi->top + 1, wi->right - wi->left - 2, this->sel_engine[i]);
int text_end = DrawVehiclePurchaseInfo(wi->left + 2, wi->right - 2, wi->top + 1, this->sel_engine[i]);
if (text_end > wi->bottom) {
this->SetDirty();