1
0
forked from 0ad/0ad

Make tooltips update dynamically when the underlying text changes

This was SVN commit r7333.
This commit is contained in:
Ykkrosh 2010-02-28 21:26:06 +00:00
parent dc0cd4bedd
commit 48c871980e

View File

@ -283,8 +283,16 @@ void GUITooltip::Update(IGUIObject* Nearest, CPos MousePos, CGUI* GUI)
break;
case ST_SHOWING:
if (Nearest != m_PreviousObject)
if (Nearest == m_PreviousObject)
{
// Still showing the same object's tooltip, but the text might have changed
if (GetTooltip(Nearest, style))
ShowTooltip(Nearest, MousePos, style, GUI);
}
else
{
// Mouse moved onto a new object
if (GetTooltip(Nearest, style))
{
CStr style_old;