Double click on profile to use it for next free player.

This commit is contained in:
Florian Küpper committed 2013-04-27 16:38:22 +02:00
1 parent 98ad7a6be0
commit d2516d4ad0
1 file changed
+27
+27
View File
@@ -452,6 +452,33 @@ namespace Vocaluxe.Screens
_NameSelections[_NameSelection].UpdateList();
}
if (mouseEvent.LD && _NameSelections[_NameSelection].IsOverTile(mouseEvent) && !_SelectingFast)
{
_SelectedPlayerNr = _NameSelections[_NameSelection].TilePlayerNr(mouseEvent);
if (_SelectedPlayerNr > -1)
{
for (int i = 0; i < CGame.NumPlayer; i++)
{
if (CGame.Players[i].ProfileID == -1)
{
//Update Game-infos with new player
CGame.Players[i].ProfileID = _SelectedPlayerNr;
//Update config for default players.
CConfig.Players[i] = CProfiles.Profiles[_SelectedPlayerNr].ProfileFile;
CConfig.SaveConfig();
//Update texture and name
_Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.Profiles[_SelectedPlayerNr].Avatar.Texture;
_Texts[_TextPlayer[i]].Text = CProfiles.Profiles[_SelectedPlayerNr].PlayerName;
//Update profile-warning
_CheckPlayers();
//Update Tiles-List
_NameSelections[_NameSelection].UpdateList();
break;
}
}
}
}
if (mouseEvent.RB && _SelectingFast)
stopSelectingFast = true;
else if (mouseEvent.RB)