Tweak tooltip to only display if the mouse is actually over the checkbox
This commit is contained in:
parent
9d5c735ccb
commit
ce9ba74f57
@ -1609,11 +1609,18 @@ void Skin::drawCheckBox(const core::recti &rect, Widget* widget, bool focused)
|
|||||||
true /* alpha */);
|
true /* alpha */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (focused && widget->hasTooltip())
|
if (focused && widget->hasTooltip())
|
||||||
|
{
|
||||||
|
const core::position2di mouse_position =
|
||||||
|
irr_driver->getDevice()->getCursorControl()->getPosition();
|
||||||
|
|
||||||
|
if (rect.isPointInside(mouse_position))
|
||||||
{
|
{
|
||||||
m_tooltip_at_mouse.push_back(true);
|
m_tooltip_at_mouse.push_back(true);
|
||||||
m_tooltips.push_back(widget);
|
m_tooltips.push_back(widget);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} // drawCheckBox
|
} // drawCheckBox
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user