summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-10-08 20:33:23 +0000
committerrubidium <rubidium@openttd.org>2010-10-08 20:33:23 +0000
commit969e3a9e45364d8c8d7a74ed1f84727bd272da33 (patch)
treea41ee126e2bce6a63160984aa03fcca96c6598d5
parentffdc88a5d659d33067787a2233f64a9d5637ac55 (diff)
downloadopenttd-969e3a9e45364d8c8d7a74ed1f84727bd272da33.tar.xz
(svn r20907) -Fix [FS#4156-ish]: callback 15C's string didn't actually get drawn
-rw-r--r--src/object_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/object_gui.cpp b/src/object_gui.cpp
index 3246b5fdd..f54492caf 100644
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -57,7 +57,7 @@ class BuildObjectWindow : public PickerWindowBase {
}
public:
- BuildObjectWindow(const WindowDesc *desc, Window *w) : PickerWindowBase(w)
+ BuildObjectWindow(const WindowDesc *desc, Window *w) : PickerWindowBase(w), info_height(1)
{
this->CreateNestedTree(desc);
@@ -191,7 +191,7 @@ public:
/* Use all the available space left from where we stand up to the
* end of the window. We ALSO enlarge the window if needed, so we
* can 'go' wild with the bottom of the window. */
- int y = DrawStringMultiLine(r.left, r.right, r.top, UINT16_MAX, message);
+ int y = DrawStringMultiLine(r.left, r.right, r.top, UINT16_MAX, message) - r.top;
StopTextRefStackUsage();
if (y > this->info_height) {
BuildObjectWindow *bow = const_cast<BuildObjectWindow *>(this);
@@ -305,7 +305,7 @@ static const NWidgetPart _nested_build_object_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY, BOW_OBJECT_SPRITE), SetMinimalSize(130, 0), SetFill(1, 0), SetDataTip(0x0, STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP), EndContainer(),
EndContainer(),
NWidget(WWT_TEXT, COLOUR_DARK_GREEN, BOW_OBJECT_SIZE), SetDataTip(STR_OBJECT_BUILD_SIZE, STR_NULL), SetPadding(2, 5, 2, 5),
- NWidget(WWT_PANEL, COLOUR_DARK_GREEN, BOW_INFO), SetPadding(2, 5, 0, 5),
+ NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, BOW_INFO), SetPadding(2, 5, 0, 5),
EndContainer(),
};