Add tooltip to explain usage of per-player handicaps

This commit is contained in:
Flakebi 2015-02-24 23:23:35 +01:00
parent 26b38a3afe
commit 6805ead6e6
2 changed files with 7 additions and 0 deletions

View File

@ -1609,6 +1609,12 @@ void Skin::drawCheckBox(const core::recti &rect, Widget* widget, bool focused)
0 /* no clipping */, 0, 0 /* no clipping */, 0,
true /* alpha */); true /* alpha */);
} }
if (focused && widget->hasTooltip())
{
m_tooltip_at_mouse.push_back(true);
m_tooltips.push_back(widget);
}
} // drawCheckBox } // drawCheckBox
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -151,6 +151,7 @@ void OptionsScreenUI::init()
CheckBoxWidget* difficulty = getWidget<CheckBoxWidget>("perPlayerDifficulty"); CheckBoxWidget* difficulty = getWidget<CheckBoxWidget>("perPlayerDifficulty");
assert( difficulty != NULL ); assert( difficulty != NULL );
difficulty->setState( UserConfigParams::m_per_player_difficulty ); difficulty->setState( UserConfigParams::m_per_player_difficulty );
difficulty->setTooltip(_("Handicap stronger players in the kart selection"));
CheckBoxWidget* show_login = getWidget<CheckBoxWidget>("show-login"); CheckBoxWidget* show_login = getWidget<CheckBoxWidget>("show-login");
assert( show_login!= NULL ); assert( show_login!= NULL );