1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 07:38:48 -05:00

Fixed tooltips not resizing with \n (#4766)

* Fixed tooltips not resizing with \n

* Fixed it for 1.8.4 too.

* Fixed not working with Freetype disabled.

* Modified it to use Zeno-'s solution.
This commit is contained in:
lisacvuk 2016-11-11 12:16:34 +01:00 committed by Zeno-
parent b98f98b367
commit 8a1a9fdc24

View File

@ -2314,7 +2314,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase,
this->bringToFront(m_tooltip_element);
setStaticText(m_tooltip_element, 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
#if (IRRLICHT_VERSION_MAJOR <= 1 && IRRLICHT_VERSION_MINOR <= 8 && IRRLICHT_VERSION_REVISION < 2) || USE_FREETYPE == 1
s32 tooltip_height = m_tooltip_element->getTextHeight() * tt_rows.size() + 5;
#else
s32 tooltip_height = m_tooltip_element->getTextHeight() + 5;