Merge branch 'master' of github.com:supertuxkart/stk-code
This commit is contained in:
commit
c6d7da45e9
@ -13,7 +13,7 @@
|
||||
I18N="Main menu button" text="Story Mode"/>
|
||||
<icon-button id="new" width="128" height="128"
|
||||
icon="gui/menu_race.png" focus_icon="gui/menu_race_focus.png"
|
||||
I18N="Main menu button" text="Single-player"/>
|
||||
I18N="Main menu button" text="Singleplayer"/>
|
||||
<icon-button id="multiplayer" width="128" height="128"
|
||||
icon="gui/menu_multi.png" focus_icon="gui/menu_multi_focus.png"
|
||||
I18N="Main menu button" text="Multiplayer"/>
|
||||
|
@ -37,9 +37,9 @@
|
||||
<spacer height="4" width="10" />
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="perPlayerDifficulty"/>
|
||||
<checkbox id="show-login"/>
|
||||
<spacer width="20" height="100%" />
|
||||
<label height="100%" I18N="In the ui settings" text="Enable handicaped users"/>
|
||||
<label height="100%" I18N="In the ui settings" text="Always show login screen"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -47,17 +47,18 @@
|
||||
|
||||
<div layout="horizontal-row" width="100%" height="fit">
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="show-login"/>
|
||||
<checkbox id="enable-hw-report"/>
|
||||
<spacer width="20" height="100%" />
|
||||
<label height="100%" I18N="In the ui settings" text="Always show login screen"/>
|
||||
<label height="100%" id="label-hw-report" I18N="In the ui settings"
|
||||
text="Send anonymous HW statistics"/>
|
||||
</div>
|
||||
|
||||
<spacer height="4" width="10" />
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="aiHandicap"/>
|
||||
<checkbox id="perPlayerDifficulty"/>
|
||||
<spacer width="20" height="100%" />
|
||||
<label height="100%" I18N="In the ui settings" text="Handicap AI karts"/>
|
||||
<label height="100%" I18N="In the ui settings" text="Enable handicaped users"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -72,12 +73,7 @@
|
||||
|
||||
<spacer height="4" width="10" />
|
||||
|
||||
<div layout="horizontal-row" proportion="1" height="fit">
|
||||
<checkbox id="enable-hw-report"/>
|
||||
<spacer width="20" height="100%" />
|
||||
<label height="100%" id="label-hw-report" I18N="In the ui settings"
|
||||
text="Send anonymous HW statistics"/>
|
||||
</div>
|
||||
<!-- Nothing here yet -->
|
||||
</div>
|
||||
|
||||
<spacer height="18" width="4"/>
|
||||
|
@ -681,11 +681,6 @@ namespace UserConfigParams
|
||||
&m_handicap,
|
||||
"If handicapped users can be selected") );
|
||||
|
||||
PARAM_PREFIX BoolUserConfigParam m_ai_handicap
|
||||
PARAM_DEFAULT( BoolUserConfigParam(false, "ai_handicap",
|
||||
&m_handicap,
|
||||
"If AIs are handicapped") );
|
||||
|
||||
// ---- Internet related
|
||||
|
||||
PARAM_PREFIX IntUserConfigParam m_internet_status
|
||||
|
@ -351,10 +351,14 @@ void PlayerKartWidget::add()
|
||||
for (int n=0; n<player_amount; n++)
|
||||
{
|
||||
core::stringw name = PlayerManager::get()->getPlayer(n)->getName();
|
||||
m_player_ident_spinner->addLabel(translations->fribidize(name));
|
||||
core::stringw label = translations->fribidize(name);
|
||||
m_player_ident_spinner->addLabel(label);
|
||||
if (UserConfigParams::m_per_player_difficulty)
|
||||
{
|
||||
// The second player is the same, but with handicap
|
||||
m_player_ident_spinner->addLabel(translations->fribidize(name));
|
||||
label = _("%s (handicapped)", label);
|
||||
m_player_ident_spinner->addLabel(label);
|
||||
}
|
||||
}
|
||||
|
||||
// select the right player profile in the spinner
|
||||
@ -366,9 +370,6 @@ void PlayerKartWidget::add()
|
||||
m_player_ident_spinner->setVisible(false);
|
||||
}
|
||||
|
||||
// Add anchor badge if the player is handicapped
|
||||
int spinner_value = m_player_ident_spinner->getValue();
|
||||
|
||||
assert(m_player_ident_spinner->getStringValue() == name);
|
||||
} // add
|
||||
|
||||
@ -630,6 +631,10 @@ void PlayerKartWidget::setSize(const int x, const int y, const int w, const int
|
||||
|
||||
// -- sizes
|
||||
player_name_h = 40;
|
||||
// Set it a bit higher so there's space for "(handicapped)"
|
||||
if(UserConfigParams::m_per_player_difficulty)
|
||||
player_name_w = std::min(500, w);
|
||||
else
|
||||
player_name_w = std::min(400, w);
|
||||
|
||||
kart_name_w = w;
|
||||
|
@ -349,8 +349,7 @@ void RaceManager::startNew(bool from_overworld)
|
||||
for(unsigned int i = 0; i < ai_kart_count; i++)
|
||||
{
|
||||
m_kart_status.push_back(KartStatus(m_ai_kart_list[i], i, -1, -1,
|
||||
init_gp_rank, KT_AI, UserConfigParams::m_ai_handicap ?
|
||||
PLAYER_DIFFICULTY_HANDICAP : PLAYER_DIFFICULTY_NORMAL));
|
||||
init_gp_rank, KT_AI, PLAYER_DIFFICULTY_NORMAL));
|
||||
init_gp_rank ++;
|
||||
if(UserConfigParams::m_ftl_debug)
|
||||
{
|
||||
|
@ -152,9 +152,6 @@ void OptionsScreenUI::init()
|
||||
CheckBoxWidget* difficulty = getWidget<CheckBoxWidget>("perPlayerDifficulty");
|
||||
assert( difficulty != NULL );
|
||||
difficulty->setState( UserConfigParams::m_per_player_difficulty );
|
||||
CheckBoxWidget* ai_handicap = getWidget<CheckBoxWidget>("aiHandicap");
|
||||
assert( ai_handicap != NULL );
|
||||
ai_handicap->setState( UserConfigParams::m_ai_handicap );
|
||||
|
||||
CheckBoxWidget* show_login = getWidget<CheckBoxWidget>("show-login");
|
||||
assert( show_login!= NULL );
|
||||
@ -311,12 +308,6 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
|
||||
assert( difficulty != NULL );
|
||||
UserConfigParams::m_per_player_difficulty = difficulty->getState();
|
||||
}
|
||||
else if (name=="aiHandicap")
|
||||
{
|
||||
CheckBoxWidget* ai_handicap = getWidget<CheckBoxWidget>("aiHandicap");
|
||||
assert( ai_handicap != NULL );
|
||||
UserConfigParams::m_ai_handicap = ai_handicap->getState();
|
||||
}
|
||||
else if (name == "language")
|
||||
{
|
||||
ListWidget* list_widget = getWidget<ListWidget>("language");
|
||||
|
Loading…
Reference in New Issue
Block a user