summaryrefslogtreecommitdiff
path: root/src/bridge_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-12-31 10:15:35 +0000
committersmatz <smatz@openttd.org>2010-12-31 10:15:35 +0000
commit4a0ce4bb14e2a69eb9231296460a1898d294c9be (patch)
tree69ceb7f6673ebce39b58476eb93205b1a267e99f /src/bridge_gui.cpp
parente166a0eaed0dbbd660d381743127e502bc31df97 (diff)
downloadopenttd-4a0ce4bb14e2a69eb9231296460a1898d294c9be.tar.xz
(svn r21673) -Change [FS#4358]: do not show price to build a bridge in the scenario editor, it is free there
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r--src/bridge_gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 6c61f21f2..c62da1036 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -22,6 +22,7 @@
#include "sortlist_type.h"
#include "widgets/dropdown_func.h"
#include "core/geometry_func.hpp"
+#include "openttd.h"
#include "table/strings.h"
@@ -190,7 +191,7 @@ public:
SetDParam(2, this->bridges->Get(i)->cost);
SetDParam(1, b->speed);
SetDParam(0, b->material);
- text_dim = maxdim(text_dim, GetStringBoundingBox(STR_SELECT_BRIDGE_INFO));
+ text_dim = maxdim(text_dim, GetStringBoundingBox(_game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO));
}
sprite_dim.height++; // Sprite is rendered one pixel down in the matrix field.
text_dim.height++; // Allowing the bottom row pixels to be rendered on the edge of the matrix field.
@@ -231,7 +232,8 @@ public:
SetDParam(0, b->material);
DrawSprite(b->sprite, b->pal, r.left + WD_MATRIX_LEFT, y + this->resize.step_height - 1 - GetSpriteSize(b->sprite).height);
- DrawStringMultiLine(r.left + this->bridgetext_offset, r.right, y + 2, y + this->resize.step_height, STR_SELECT_BRIDGE_INFO);
+ DrawStringMultiLine(r.left + this->bridgetext_offset, r.right, y + 2, y + this->resize.step_height,
+ _game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO);
y += this->resize.step_height;
}
break;