Make sure the 'standard' group is listed before the 'add-ons' group, and is selected by default.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5339 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d114f2844b
commit
7d23dd95f6
@ -56,12 +56,27 @@ void ArenasScreen::loadedFromFile()
|
||||
//FIXME: this returns groups for arenas but tracks too. this means that some of them
|
||||
// may contain only tracks, no arenas, and thus add an empty tab here...
|
||||
const std::vector<std::string>& groups = track_manager->getAllGroups();
|
||||
|
||||
const int group_amount = groups.size();
|
||||
|
||||
// add standard group first
|
||||
for (int n=0; n<group_amount; n++)
|
||||
{
|
||||
//FIXME: group name not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str(), groups[n]);
|
||||
if (groups[n] == DEFAULT_GROUP_NAME)
|
||||
{
|
||||
//FIXME: group name not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str(), groups[n]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// add others after
|
||||
for (int n=0; n<group_amount; n++)
|
||||
{
|
||||
if (groups[n] != DEFAULT_GROUP_NAME)
|
||||
{
|
||||
//FIXME: group name not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str(), groups[n]);
|
||||
}
|
||||
}
|
||||
|
||||
if (group_amount > 1)
|
||||
|
@ -726,13 +726,27 @@ void KartSelectionScreen::loadedFromFile()
|
||||
tabs->clearAllChildren();
|
||||
|
||||
const std::vector<std::string>& groups = kart_properties_manager->getAllGroups();
|
||||
|
||||
const int group_amount = groups.size();
|
||||
|
||||
// add default group first
|
||||
for (int n=0; n<group_amount; n++)
|
||||
{
|
||||
//FIXME: group name not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str() , groups[n]);
|
||||
if (groups[n] == DEFAULT_GROUP_NAME)
|
||||
{
|
||||
//FIXME: group name not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str() , groups[n]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// add others after
|
||||
for (int n=0; n<group_amount; n++)
|
||||
{
|
||||
if (groups[n] != DEFAULT_GROUP_NAME)
|
||||
{
|
||||
//FIXME: group name not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str() , groups[n]);
|
||||
}
|
||||
}
|
||||
|
||||
if (group_amount > 1)
|
||||
|
@ -56,12 +56,27 @@ void TracksScreen::loadedFromFile()
|
||||
tabs->clearAllChildren();
|
||||
|
||||
const std::vector<std::string>& groups = track_manager->getAllGroups();
|
||||
|
||||
const int group_amount = groups.size();
|
||||
|
||||
// add standard group first
|
||||
for (int n=0; n<group_amount; n++)
|
||||
{
|
||||
// FIXME: group name is not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str(), groups[n] );
|
||||
if (groups[n] == DEFAULT_GROUP_NAME)
|
||||
{
|
||||
// FIXME: group name is not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str(), groups[n] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// add others after
|
||||
for (int n=0; n<group_amount; n++)
|
||||
{
|
||||
if (groups[n] != DEFAULT_GROUP_NAME)
|
||||
{
|
||||
// FIXME: group name is not translated
|
||||
tabs->addTextChild( stringw(groups[n].c_str()).c_str(), groups[n] );
|
||||
}
|
||||
}
|
||||
|
||||
if (group_amount > 1)
|
||||
|
Loading…
Reference in New Issue
Block a user