Tweak tooltip to only display if the mouse is actually over the checkbox
This commit is contained in:
parent
9d5c735ccb
commit
ce9ba74f57
@ -1374,9 +1374,9 @@ void Skin::drawSpinnerBody(const core::recti &rect, Widget* widget,
|
||||
const core::recti source_area(0, 0, texture_w, texture_h);
|
||||
|
||||
draw2DImage(texture,
|
||||
dest_area, source_area,
|
||||
0 /* no clipping */, 0,
|
||||
true /* alpha */);
|
||||
dest_area, source_area,
|
||||
0 /* no clipping */, 0,
|
||||
true /* alpha */);
|
||||
|
||||
}
|
||||
|
||||
@ -1598,21 +1598,28 @@ void Skin::drawCheckBox(const core::recti &rect, Widget* widget, bool focused)
|
||||
SColor(100,255,255,255),
|
||||
SColor(100,255,255,255),
|
||||
SColor(100,255,255,255) };
|
||||
draw2DImage( texture, rect, source_area,
|
||||
0 /* no clipping */, colors,
|
||||
true /* alpha */);
|
||||
draw2DImage(texture, rect, source_area,
|
||||
0 /* no clipping */, colors,
|
||||
true /* alpha */);
|
||||
}
|
||||
else
|
||||
{
|
||||
draw2DImage( texture, rect, source_area,
|
||||
0 /* no clipping */, 0,
|
||||
true /* alpha */);
|
||||
draw2DImage(texture, rect, source_area,
|
||||
0 /* no clipping */, 0,
|
||||
true /* alpha */);
|
||||
}
|
||||
|
||||
|
||||
if (focused && widget->hasTooltip())
|
||||
{
|
||||
m_tooltip_at_mouse.push_back(true);
|
||||
m_tooltips.push_back(widget);
|
||||
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