summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2016-05-24 00:27:11 +1000
committerCraig Robbins <kde.psych@gmail.com>2016-05-24 00:27:11 +1000
commit22f78ea38e415c40ef445786b77788a40f4ddac3 (patch)
tree6b59c55774878e00e7bb28baae61a517803a573c /src/guiFormSpecMenu.cpp
parent725edc78b214f8ffa5494ed846755083295c3feb (diff)
downloadminetest-22f78ea38e415c40ef445786b77788a40f4ddac3.tar.gz
minetest-22f78ea38e415c40ef445786b77788a40f4ddac3.tar.bz2
minetest-22f78ea38e415c40ef445786b77788a40f4ddac3.zip
Fix irrlicht version checking macro for tooltip_height calculation
Diffstat (limited to 'src/guiFormSpecMenu.cpp')
-rw-r--r--src/guiFormSpecMenu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index b0215a84a..99b1153c1 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -2265,10 +2265,10 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
this->bringToFront(m_tooltip_element);
m_tooltip_element->setText(tooltip_text.c_str());
s32 tooltip_width = m_tooltip_element->getTextWidth() + m_btn_height;
-#if IRRLICHT_VERSION_MAJOR >= 1 && IRRLICHT_VERSION_MINOR >= 8 && IRRLICHT_VERSION_REVISION >= 2
- s32 tooltip_height = m_tooltip_element->getTextHeight() + 5;
-#else
+#if IRRLICHT_VERSION_MAJOR <= 1 && IRRLICHT_VERSION_MINOR <= 8 && IRRLICHT_VERSION_REVISION < 2
s32 tooltip_height = m_tooltip_element->getTextHeight() * tt_rows.size() + 5;
+#else
+ s32 tooltip_height = m_tooltip_element->getTextHeight() + 5;
#endif
v2u32 screenSize = driver->getScreenSize();
int tooltip_offset_x = m_btn_height;