Skip to content

Commit

Permalink
Fix irrlicht version checking macro for tooltip_height calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno- committed May 23, 2016
1 parent 725edc7 commit 22f78ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/guiFormSpecMenu.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 22f78ea

Please sign in to comment.