Merge branch 'tooltip'

This commit is contained in:
Marianne Gagnon 2015-03-10 19:48:21 -04:00
commit 9d5c735ccb
2 changed files with 8 additions and 1 deletions

View File

@ -1608,6 +1608,12 @@ void Skin::drawCheckBox(const core::recti &rect, Widget* widget, bool focused)
0 /* no clipping */, 0,
true /* alpha */);
}
if (focused && widget->hasTooltip())
{
m_tooltip_at_mouse.push_back(true);
m_tooltips.push_back(widget);
}
} // drawCheckBox
// ----------------------------------------------------------------------------
@ -1842,7 +1848,7 @@ void Skin::drawTooltip(Widget* widget, bool atMouse)
if (atMouse)
{
pos = irr_driver->getDevice()->getCursorControl()->getPosition()
+ core::position2di(15, 15);
+ core::position2di(10 - size.Width / 2, 20);
}
core::recti r(pos, size);

View File

@ -151,6 +151,7 @@ void OptionsScreenUI::init()
CheckBoxWidget* difficulty = getWidget<CheckBoxWidget>("perPlayerDifficulty");
assert( difficulty != NULL );
difficulty->setState( UserConfigParams::m_per_player_difficulty );
difficulty->setTooltip(_("Players can select handicapped (more difficult) profiles on the kart selection screen"));
CheckBoxWidget* show_login = getWidget<CheckBoxWidget>("show-login");
assert( show_login!= NULL );