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 */);
|
||||
}
|
||||
|
||||
|
||||
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_tooltips.push_back(widget);
|
||||
}
|
||||
}
|
||||
} // drawCheckBox
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user