Merge branch 'develop' of git://github.com/flokuep/Vocaluxe into develop
This commit is contained in:
commit
02e60773ab
3 files changed
+188
-66
No files matched your search
@@ -62,6 +62,8 @@ namespace Vocaluxe.PartyModes
|
||||
public List<int> Songs;
|
||||
public List<int> ProfileIDsTeam1;
|
||||
public List<int> ProfileIDsTeam2;
|
||||
public List<int> PlayerTeam1;
|
||||
public List<int> PlayerTeam2;
|
||||
public int[] NumJokerRandom;
|
||||
public int[] NumJokerRetry;
|
||||
}
|
||||
@@ -96,6 +98,8 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
public bool FadeToSinging;
|
||||
public bool FadeToNameSelection;
|
||||
public List<int> PlayerTeam1;
|
||||
public List<int> PlayerTeam2;
|
||||
public List<Round> Rounds;
|
||||
public int SingRoundNr;
|
||||
public List<int> Songs;
|
||||
@@ -128,6 +132,8 @@ namespace Vocaluxe.PartyModes
|
||||
public int Team;
|
||||
public List<int> ProfileIDsTeam1;
|
||||
public List<int> ProfileIDsTeam2;
|
||||
public List<int> PlayerTeam1;
|
||||
public List<int> PlayerTeam2;
|
||||
|
||||
public ESongSource SongSource;
|
||||
public int CategoryID;
|
||||
@@ -176,6 +182,8 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.NumPlayerTeam2 = 2;
|
||||
GameData.ProfileIDsTeam1 = new List<int>();
|
||||
GameData.ProfileIDsTeam2 = new List<int>();
|
||||
GameData.PlayerTeam1 = new List<int>();
|
||||
GameData.PlayerTeam2 = new List<int>();
|
||||
GameData.CurrentRoundNr = 0;
|
||||
GameData.SingRoundNr = 0;
|
||||
GameData.SongSource = ESongSource.TR_ALLSONGS;
|
||||
@@ -202,8 +210,12 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
ToScreenMain.Rounds = new List<Round>();
|
||||
ToScreenMain.Songs = new List<int>();
|
||||
ToScreenMain.PlayerTeam1 = new List<int>();
|
||||
ToScreenMain.PlayerTeam2 = new List<int>();
|
||||
GameData.Songs = new List<int>();
|
||||
GameData.Rounds = new List<Round>();
|
||||
GameData.PlayerTeam1 = new List<int>();
|
||||
GameData.PlayerTeam2 = new List<int>();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -269,6 +281,8 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.Rounds = data.ScreenMain.Rounds;
|
||||
GameData.SingRoundNr = data.ScreenMain.SingRoundNr;
|
||||
GameData.Songs = data.ScreenMain.Songs;
|
||||
GameData.PlayerTeam1 = data.ScreenMain.PlayerTeam1;
|
||||
GameData.PlayerTeam2 = data.ScreenMain.PlayerTeam2;
|
||||
}
|
||||
if (data.ScreenMain.FadeToNameSelection)
|
||||
{
|
||||
@@ -351,10 +365,13 @@ namespace Vocaluxe.PartyModes
|
||||
ToScreenMain.ProfileIDsTeam1 = GameData.ProfileIDsTeam1;
|
||||
ToScreenMain.ProfileIDsTeam2 = GameData.ProfileIDsTeam2;
|
||||
CreateRounds();
|
||||
PrepareSongList();
|
||||
SetNumJokers();
|
||||
PreparePlayerList(0);
|
||||
PrepareSongList();
|
||||
ToScreenMain.Rounds = GameData.Rounds;
|
||||
ToScreenMain.Songs = GameData.Songs;
|
||||
ToScreenMain.PlayerTeam1 = GameData.PlayerTeam1;
|
||||
ToScreenMain.PlayerTeam1 = GameData.PlayerTeam2;
|
||||
ToScreenMain.NumJokerRandom = GameData.NumJokerRandom;
|
||||
ToScreenMain.NumJokerRetry = GameData.NumJokerRetry;
|
||||
ToScreenMain.Team = GameData.Team;
|
||||
@@ -372,6 +389,8 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.Team = 0;
|
||||
else
|
||||
GameData.Team = 1;
|
||||
UpdateSongList();
|
||||
UpdatePlayerList();
|
||||
ToScreenMain.CurrentRoundNr = GameData.CurrentRoundNr;
|
||||
ToScreenMain.NumPlayerTeam1 = GameData.NumPlayerTeam1;
|
||||
ToScreenMain.NumPlayerTeam2 = GameData.NumPlayerTeam2;
|
||||
@@ -380,6 +399,8 @@ namespace Vocaluxe.PartyModes
|
||||
ToScreenMain.ProfileIDsTeam2 = GameData.ProfileIDsTeam2;
|
||||
ToScreenMain.Rounds = GameData.Rounds;
|
||||
ToScreenMain.Songs = GameData.Songs;
|
||||
ToScreenMain.PlayerTeam1 = GameData.PlayerTeam1;
|
||||
ToScreenMain.PlayerTeam2 = GameData.PlayerTeam2;
|
||||
ToScreenMain.NumJokerRandom = GameData.NumJokerRandom;
|
||||
ToScreenMain.NumJokerRetry = GameData.NumJokerRetry;
|
||||
ToScreenMain.Team = GameData.Team;
|
||||
@@ -490,51 +511,102 @@ namespace Vocaluxe.PartyModes
|
||||
private void CreateRounds()
|
||||
{
|
||||
GameData.Rounds = new List<Round>();
|
||||
//Prepare Player-IDs
|
||||
List<int> Team1 = new List<int>();
|
||||
List<int> Team2 = new List<int>();
|
||||
List<int> IDs1 = new List<int>();
|
||||
List<int> IDs2 = new List<int>();
|
||||
int num = 0;
|
||||
int random = 0;
|
||||
//Add IDs to team-list
|
||||
while (Team1.Count < GameData.NumFields)
|
||||
{
|
||||
if (IDs1.Count == 0)
|
||||
for (int i = 0; i < GameData.NumPlayerTeam1; i++)
|
||||
IDs1.Add(i);
|
||||
if (IDs2.Count == 0)
|
||||
for (int i = 0; i < GameData.NumPlayerTeam2; i++)
|
||||
IDs2.Add(i);
|
||||
if (Team1.Count < GameData.NumFields)
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs1.Count - 1) * 10);
|
||||
num = (int)Math.Round((double)random/10);
|
||||
if (num >= IDs1.Count)
|
||||
num = IDs1.Count - 1;
|
||||
Team1.Add(IDs1[num]);
|
||||
IDs1.Remove(Team1[Team1.Count - 1]);
|
||||
}
|
||||
if (Team2.Count < GameData.NumFields)
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs2.Count - 1) * 20);
|
||||
num = (int)Math.Round((double)random / 20);
|
||||
if (num >= IDs2.Count)
|
||||
num = IDs2.Count - 1;
|
||||
Team2.Add(IDs2[num]);
|
||||
IDs2.Remove(Team2[Team2.Count - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < GameData.NumFields; i++)
|
||||
{
|
||||
Round r = new Round();
|
||||
r.SingerTeam1 = Team1[i];
|
||||
r.SingerTeam2 = Team2[i];
|
||||
GameData.Rounds.Add(r);
|
||||
}
|
||||
}
|
||||
|
||||
private void PreparePlayerList(int Team)
|
||||
{
|
||||
if (Team == 0)
|
||||
{
|
||||
GameData.PlayerTeam1 = new List<int>();
|
||||
GameData.PlayerTeam2 = new List<int>();
|
||||
|
||||
//Prepare Player-IDs
|
||||
List<int> IDs1 = new List<int>();
|
||||
List<int> IDs2 = new List<int>();
|
||||
int num = 0;
|
||||
int random = 0;
|
||||
//Add IDs to team-list
|
||||
while (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0] && IDs1.Count == 0 && GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1] && IDs2.Count == 0)
|
||||
{
|
||||
if (IDs1.Count == 0)
|
||||
for (int i = 0; i < GameData.NumPlayerTeam1; i++)
|
||||
IDs1.Add(i);
|
||||
if (IDs2.Count == 0)
|
||||
for (int i = 0; i < GameData.NumPlayerTeam2; i++)
|
||||
IDs2.Add(i);
|
||||
if (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs1.Count - 1) * 10);
|
||||
num = (int)Math.Round((double)random / 10);
|
||||
if (num >= IDs1.Count)
|
||||
num = IDs1.Count - 1;
|
||||
GameData.PlayerTeam1.Add(IDs1[num]);
|
||||
IDs1.RemoveAt(num);
|
||||
}
|
||||
if (GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs2.Count - 1) * 20);
|
||||
num = (int)Math.Round((double)random / 20);
|
||||
if (num >= IDs2.Count)
|
||||
num = IDs2.Count - 1;
|
||||
GameData.PlayerTeam2.Add(IDs2[num]);
|
||||
IDs2.RemoveAt(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Team == 1)
|
||||
{
|
||||
//Prepare Player-IDs
|
||||
List<int> IDs = new List<int>();
|
||||
int num = 0;
|
||||
int random = 0;
|
||||
//Add IDs to team-list
|
||||
while (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0] && IDs.Count == 0)
|
||||
{
|
||||
if (IDs.Count == 0)
|
||||
for (int i = 0; i < GameData.NumPlayerTeam1; i++)
|
||||
IDs.Add(i);
|
||||
if (GameData.PlayerTeam1.Count < GameData.NumFields + GameData.NumJokerRetry[0])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs.Count - 1) * 10);
|
||||
num = (int)Math.Round((double)random / 10);
|
||||
if (num >= IDs.Count)
|
||||
num = IDs.Count - 1;
|
||||
GameData.PlayerTeam1.Add(IDs[num]);
|
||||
IDs.RemoveAt(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (Team == 2)
|
||||
{
|
||||
//Prepare Player-IDs
|
||||
List<int> IDs = new List<int>();
|
||||
int num = 0;
|
||||
int random = 0;
|
||||
//Add IDs to team-list
|
||||
while (GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1] && IDs.Count == 0)
|
||||
{
|
||||
if (IDs.Count == 0)
|
||||
for (int i = 0; i < GameData.NumPlayerTeam2; i++)
|
||||
IDs.Add(i);
|
||||
if (GameData.PlayerTeam2.Count < GameData.NumFields + GameData.NumJokerRetry[1])
|
||||
{
|
||||
random = _Base.Game.GetRandom((IDs.Count - 1) * 20);
|
||||
num = (int)Math.Round((double)random / 20);
|
||||
if (num >= IDs.Count)
|
||||
num = IDs.Count - 1;
|
||||
GameData.PlayerTeam2.Add(IDs[num]);
|
||||
IDs.RemoveAt(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PrepareSongList()
|
||||
{
|
||||
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
@@ -596,6 +668,20 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePlayerList()
|
||||
{
|
||||
if (GameData.PlayerTeam1.Count == 0)
|
||||
PreparePlayerList(1);
|
||||
if (GameData.PlayerTeam2.Count == 0)
|
||||
PreparePlayerList(2);
|
||||
}
|
||||
|
||||
private void UpdateSongList()
|
||||
{
|
||||
if (GameData.Songs.Count == 0)
|
||||
PrepareSongList();
|
||||
}
|
||||
|
||||
private void StartRound(int RoundNr)
|
||||
{
|
||||
_Base.Game.Reset();
|
||||
@@ -612,6 +698,7 @@ namespace Vocaluxe.PartyModes
|
||||
|
||||
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||
Round r = GameData.Rounds[RoundNr];
|
||||
bool isDuet = _Base.Songs.GetSongByID(player[0].SongID).IsDuet;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
@@ -629,7 +716,7 @@ namespace Vocaluxe.PartyModes
|
||||
player[0].Name = profiles[GameData.ProfileIDsTeam1[r.SingerTeam1]].PlayerName;
|
||||
player[0].Difficulty = profiles[GameData.ProfileIDsTeam1[r.SingerTeam1]].Difficulty;
|
||||
player[0].ProfileID = GameData.ProfileIDsTeam1[r.SingerTeam1];
|
||||
if (GameData.GameMode == EPartyGameMode.TR_GAMEMODE_DUET)
|
||||
if (isDuet)
|
||||
player[0].LineNr = 0;
|
||||
}
|
||||
if (GameData.ProfileIDsTeam2[r.SingerTeam2] < profiles.Length)
|
||||
@@ -637,7 +724,7 @@ namespace Vocaluxe.PartyModes
|
||||
player[1].Name = profiles[GameData.ProfileIDsTeam2[r.SingerTeam2]].PlayerName;
|
||||
player[1].Difficulty = profiles[GameData.ProfileIDsTeam2[r.SingerTeam2]].Difficulty;
|
||||
player[1].ProfileID = GameData.ProfileIDsTeam2[r.SingerTeam2];
|
||||
if (GameData.GameMode == EPartyGameMode.TR_GAMEMODE_DUET)
|
||||
if (isDuet)
|
||||
player[1].LineNr = 1;
|
||||
}
|
||||
SongSelected(r.SongID);
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Vocaluxe.PartyModes
|
||||
private int OldSelectedField = -1;
|
||||
|
||||
private int[,] Possibilities;
|
||||
private EStatus Action;
|
||||
private EStatus Status;
|
||||
|
||||
public PartyScreenTicTacToeMain()
|
||||
{
|
||||
@@ -89,6 +89,8 @@ namespace Vocaluxe.PartyModes
|
||||
config.SingRoundNr = 1;
|
||||
config.Rounds = new List<Round>();
|
||||
config.Songs = new List<int>();
|
||||
config.PlayerTeam1 = new List<int>();
|
||||
config.PlayerTeam2 = new List<int>();
|
||||
config.FadeToNameSelection = false;
|
||||
config.FadeToSinging = false;
|
||||
Data.ScreenMain = config;
|
||||
@@ -135,8 +137,10 @@ namespace Vocaluxe.PartyModes
|
||||
case Keys.Back:
|
||||
case Keys.Escape:
|
||||
if (!ExitPopupVisible)
|
||||
if (GameData.CurrentRoundNr == 1 && Action != EStatus.FieldSelected)
|
||||
if (GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
|
||||
Back();
|
||||
else if(Status == EStatus.None)
|
||||
EndParty();
|
||||
else
|
||||
ShowPopup(true);
|
||||
else
|
||||
@@ -148,13 +152,15 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
if (Buttons[htButtons(ButtonNextRound)].Selected)
|
||||
NextRound();
|
||||
if (Buttons[htButtons(ButtonBack)].Selected && GameData.CurrentRoundNr == 1 && Action != EStatus.FieldSelected)
|
||||
if (Buttons[htButtons(ButtonBack)].Selected && GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected && (GameData.CurrentRoundNr > 1 || Action == EStatus.FieldSelected))
|
||||
if (Buttons[htButtons(ButtonExit)].Selected && (GameData.CurrentRoundNr > 1 || Status == EStatus.FieldSelected) && Status != EStatus.None)
|
||||
ShowPopup(true);
|
||||
else if (Status == EStatus.None)
|
||||
EndParty();
|
||||
for (int i = 0; i < GameData.NumFields; i++)
|
||||
{
|
||||
switch (Action)
|
||||
switch (Status)
|
||||
{
|
||||
case EStatus.FieldChoosing:
|
||||
if (Fields[i].Button.Selected)
|
||||
@@ -173,7 +179,7 @@ namespace Vocaluxe.PartyModes
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Action == EStatus.FieldSelected)
|
||||
if (Status == EStatus.FieldSelected)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonJokerRandomT1)].Selected)
|
||||
UseJoker(0, 0);
|
||||
@@ -211,10 +217,13 @@ namespace Vocaluxe.PartyModes
|
||||
if (Buttons[htButtons(ButtonBack)].Selected)
|
||||
Back();
|
||||
if (Buttons[htButtons(ButtonExit)].Selected)
|
||||
ShowPopup(true);
|
||||
if (Status == EStatus.None)
|
||||
EndParty();
|
||||
else
|
||||
ShowPopup(true);
|
||||
for (int i = 0; i < GameData.NumFields; i++)
|
||||
{
|
||||
switch (Action)
|
||||
switch (Status)
|
||||
{
|
||||
case EStatus.FieldChoosing:
|
||||
if (Fields[i].Button.Selected)
|
||||
@@ -233,7 +242,7 @@ namespace Vocaluxe.PartyModes
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(Action == EStatus.FieldSelected)
|
||||
if(Status == EStatus.FieldSelected)
|
||||
{
|
||||
if (Buttons[htButtons(ButtonJokerRandomT1)].Selected)
|
||||
UseJoker(0, 0);
|
||||
@@ -258,8 +267,10 @@ namespace Vocaluxe.PartyModes
|
||||
if (MouseEvent.RB)
|
||||
{
|
||||
if (!ExitPopupVisible)
|
||||
if (GameData.CurrentRoundNr == 1 && Action != EStatus.FieldSelected)
|
||||
if (GameData.CurrentRoundNr == 1 && Status != EStatus.FieldSelected)
|
||||
Back();
|
||||
else if(Status == EStatus.None)
|
||||
EndParty();
|
||||
else
|
||||
ShowPopup(true);
|
||||
else
|
||||
@@ -291,10 +302,15 @@ namespace Vocaluxe.PartyModes
|
||||
Buttons[htButtons(ButtonBack)].Visible = false;
|
||||
Buttons[htButtons(ButtonExit)].Visible = true;
|
||||
}
|
||||
|
||||
Status = EStatus.FieldChoosing;
|
||||
|
||||
UpdateFields();
|
||||
UpdateFieldContents();
|
||||
|
||||
int Winner = GetWinner();
|
||||
if (GameData.CurrentRoundNr <= GameData.NumFields && Winner == 0)
|
||||
{
|
||||
Action = EStatus.FieldChoosing;
|
||||
UpdateTeamChoosingMessage();
|
||||
Texts[htTexts(TextNextPlayerT1)].Visible = false;
|
||||
Texts[htTexts(TextNextPlayerT2)].Visible = false;
|
||||
@@ -312,9 +328,10 @@ namespace Vocaluxe.PartyModes
|
||||
}
|
||||
else
|
||||
{
|
||||
Action = EStatus.None;
|
||||
Status = EStatus.None;
|
||||
Buttons[htButtons(ButtonNextRound)].Visible = false;
|
||||
Texts[htTexts(TextFinishMessage)].Visible = true;
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = false;
|
||||
if (Winner > 0)
|
||||
{
|
||||
Texts[htTexts(TextFinishMessage)].Color = _Base.Theme.GetPlayerColor(Winner);
|
||||
@@ -328,9 +345,6 @@ namespace Vocaluxe.PartyModes
|
||||
SetInteractionToButton(Buttons[htButtons(ButtonExit)]);
|
||||
}
|
||||
|
||||
UpdateFields();
|
||||
UpdateFieldContents();
|
||||
|
||||
ShowPopup(false);
|
||||
}
|
||||
|
||||
@@ -425,23 +439,23 @@ namespace Vocaluxe.PartyModes
|
||||
Fields[i].Button.Color = _Base.Theme.GetPlayerColor(Fields[i].Content.Winner);
|
||||
Fields[i].Button.SColor = _Base.Theme.GetPlayerColor(Fields[i].Content.Winner);
|
||||
}
|
||||
if (Action == EStatus.FieldSelected && SelectedField == i)
|
||||
if (Status == EStatus.FieldSelected && SelectedField == i)
|
||||
{
|
||||
Fields[i].Button.Texture = _Base.Songs.GetSongByID(Fields[i].Content.SongID).CoverTextureBig;
|
||||
Fields[i].Button.Color = new SColorF(1, 1, 1, 1);
|
||||
Fields[i].Button.SColor = new SColorF(1, 1, 1, 1);
|
||||
Fields[i].Button.Enabled = false;
|
||||
}
|
||||
if (Action == EStatus.JokerRetry && Fields[i].Content.Finished)
|
||||
if (Status == EStatus.JokerRetry && Fields[i].Content.Finished)
|
||||
{
|
||||
Fields[i].Button.SColor = _Base.Theme.GetPlayerColor(GameData.Team+1);
|
||||
Fields[i].Button.Enabled = true;
|
||||
}
|
||||
if (Action == EStatus.JokerRetry && !Fields[i].Content.Finished)
|
||||
if (Status == EStatus.JokerRetry && !Fields[i].Content.Finished)
|
||||
{
|
||||
Fields[i].Button.Enabled = false;
|
||||
}
|
||||
if(Action == EStatus.FieldSelected)
|
||||
if(Status == EStatus.FieldSelected)
|
||||
{
|
||||
Fields[i].Button.Enabled = false;
|
||||
}
|
||||
@@ -451,11 +465,24 @@ namespace Vocaluxe.PartyModes
|
||||
private void FieldSelected()
|
||||
{
|
||||
int SongID = 0;
|
||||
int SingerTeam1 = 0;
|
||||
int SingerTeam2 = 0;
|
||||
if (GameData.Songs.Count > 0)
|
||||
{
|
||||
SongID = GameData.Songs[0];
|
||||
GameData.Songs.RemoveAt(0);
|
||||
}
|
||||
if (GameData.PlayerTeam1.Count > 0)
|
||||
{
|
||||
SingerTeam1 = GameData.PlayerTeam1[0];
|
||||
GameData.PlayerTeam1.RemoveAt(0);
|
||||
}
|
||||
|
||||
if (GameData.PlayerTeam2.Count > 0)
|
||||
{
|
||||
SingerTeam2 = GameData.PlayerTeam2[0];
|
||||
GameData.PlayerTeam2.RemoveAt(0);
|
||||
}
|
||||
Menu.SongMenu.CSong Song = _Base.Songs.GetSongByID(SongID);
|
||||
|
||||
_Base.BackgroundMusic.SetStatus(true);
|
||||
@@ -465,9 +492,11 @@ namespace Vocaluxe.PartyModes
|
||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
_Base.Sound.Play(PreviewStream);
|
||||
_Base.Sound.Fade(PreviewStream, _Base.Config.GetBackgroundMusicVolume(), 1f);
|
||||
Action = EStatus.FieldSelected;
|
||||
Status = EStatus.FieldSelected;
|
||||
Fields[SelectedField].Content.SongID = SongID;
|
||||
GameData.Rounds[SelectedField].SongID = SongID;
|
||||
GameData.Rounds[SelectedField].SingerTeam1 = SingerTeam1;
|
||||
GameData.Rounds[SelectedField].SingerTeam2 = SingerTeam2;
|
||||
UpdateFieldContents();
|
||||
|
||||
Texts[htTexts(TextNextPlayerT1)].Visible = true;
|
||||
@@ -500,7 +529,7 @@ namespace Vocaluxe.PartyModes
|
||||
_Base.Sound.SetStreamVolume(PreviewStream, 0f);
|
||||
_Base.Sound.Play(PreviewStream);
|
||||
_Base.Sound.Fade(PreviewStream, _Base.Config.GetBackgroundMusicVolume(), 1f);
|
||||
Action = EStatus.FieldSelected;
|
||||
Status = EStatus.FieldSelected;
|
||||
Fields[SelectedField].Content.SongID = SongID;
|
||||
GameData.Rounds[SelectedField].SongID = SongID;
|
||||
GameData.Rounds[SelectedField].SingerTeam1 = GameData.Rounds[OldSelectedField].SingerTeam1;
|
||||
@@ -549,7 +578,7 @@ namespace Vocaluxe.PartyModes
|
||||
GameData.Team = TeamNr;
|
||||
if (!_Base.Sound.IsFinished(PreviewStream))
|
||||
_Base.Sound.FadeAndStop(PreviewStream, 0, 1);
|
||||
Action = EStatus.JokerRetry;
|
||||
Status = EStatus.JokerRetry;
|
||||
OldSelectedField = SelectedField;
|
||||
SelectedField = -1;
|
||||
UpdateFieldContents();
|
||||
@@ -563,7 +592,7 @@ namespace Vocaluxe.PartyModes
|
||||
{
|
||||
Texts[htTexts(TextTeamChoosing)].Color = _Base.Theme.GetPlayerColor(GameData.Team + 1);
|
||||
Texts[htTexts(TextTeamChoosing)].Text = _Base.Language.Translate("TR_TEAM", _PartyModeID) + " " + (GameData.Team + 1) + "! " + _Base.Language.Translate("TR_SCREENMAIN_TEAM_CHOOSE", _PartyModeID);
|
||||
if (Action == EStatus.JokerRetry || Action == EStatus.FieldChoosing)
|
||||
if (Status == EStatus.JokerRetry || Status == EStatus.FieldChoosing)
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = true;
|
||||
else
|
||||
Texts[htTexts(TextTeamChoosing)].Visible = false;
|
||||
@@ -575,10 +604,14 @@ namespace Vocaluxe.PartyModes
|
||||
Buttons[htButtons(ButtonJokerRandomT2)].Visible = true;
|
||||
Buttons[htButtons(ButtonJokerRandomT1)].Text.Text = GameData.NumJokerRandom[0].ToString();
|
||||
Buttons[htButtons(ButtonJokerRandomT2)].Text.Text = GameData.NumJokerRandom[1].ToString();
|
||||
Buttons[htButtons(ButtonJokerRandomT1)].Enabled = GameData.NumJokerRandom[0] > 0;
|
||||
Buttons[htButtons(ButtonJokerRandomT2)].Enabled = GameData.NumJokerRandom[1] > 0;
|
||||
Buttons[htButtons(ButtonJokerRetryT1)].Visible = true;
|
||||
Buttons[htButtons(ButtonJokerRetryT2)].Visible = true;
|
||||
Buttons[htButtons(ButtonJokerRetryT1)].Text.Text = GameData.NumJokerRetry[0].ToString();
|
||||
Buttons[htButtons(ButtonJokerRetryT2)].Text.Text = GameData.NumJokerRetry[1].ToString();
|
||||
Buttons[htButtons(ButtonJokerRetryT1)].Enabled = GameData.NumJokerRetry[0] > 0;
|
||||
Buttons[htButtons(ButtonJokerRetryT2)].Enabled = GameData.NumJokerRetry[1] > 0;
|
||||
}
|
||||
|
||||
private void NextRound()
|
||||
@@ -589,6 +622,8 @@ namespace Vocaluxe.PartyModes
|
||||
Data.ScreenMain.FadeToSinging = true;
|
||||
Data.ScreenMain.Songs = GameData.Songs;
|
||||
Data.ScreenMain.SingRoundNr = SelectedField;
|
||||
Data.ScreenMain.PlayerTeam1 = GameData.PlayerTeam1;
|
||||
Data.ScreenMain.PlayerTeam2 = GameData.PlayerTeam2;
|
||||
_PartyMode.DataFromScreen(_ThemeName, Data);
|
||||
}
|
||||
|
||||
|
||||
@@ -612,9 +612,9 @@ namespace Vocaluxe.Screens
|
||||
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].AddValue(CGame.GetSong(1).DuetPart1);
|
||||
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].AddValue(CGame.GetSong(1).DuetPart2);
|
||||
if ((i + 1) % 2 == 0)
|
||||
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].SetSelectionByValueIndex(1);
|
||||
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Selection = 1;
|
||||
else
|
||||
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].SetSelectionByValueIndex(0);
|
||||
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Selection = 0;
|
||||
}
|
||||
else
|
||||
SelectSlides[htSelectSlides(SelectSlideDuetPlayer[i])].Visible = false;
|
||||
|
||||
Reference in new issue
Block a user