added handling for song selection and fade to sing screen
This commit is contained in:
1 parent
9069553330
commit
fea7b42fba
7 files changed
+58
-11
No files matched your search
@@ -314,6 +314,35 @@ namespace Vocaluxe.PartyModes
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SongSelected(int SongID)
|
||||||
|
{
|
||||||
|
|
||||||
|
EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||||
|
|
||||||
|
_Base.Game.Reset();
|
||||||
|
_Base.Game.ClearSongs();
|
||||||
|
_Base.Game.AddSong(SongID, gm);
|
||||||
|
_Base.Game.SetNumPlayer(GameData.NumPlayerAtOnce);
|
||||||
|
|
||||||
|
SPlayer[] player = _Base.Game.GetPlayer();
|
||||||
|
if (player == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (player.Length < GameData.NumPlayerAtOnce)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//TODO: set the right data
|
||||||
|
SProfile[] profiles = _Base.Profiles.GetProfiles();
|
||||||
|
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||||
|
{
|
||||||
|
player[i].Name = _ScreenSongOptions.Selection.TeamNames[i];
|
||||||
|
player[i].Difficulty = profiles[GameData.ProfileIDs[i]].Difficulty;
|
||||||
|
player[i].ProfileID = GameData.ProfileIDs[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
_Base.Graphics.FadeTo(EScreens.ScreenSing);
|
||||||
|
}
|
||||||
|
|
||||||
private void StartNextRound()
|
private void StartNextRound()
|
||||||
{
|
{
|
||||||
_ScreenSongOptions.Selection.RandomOnly = false;
|
_ScreenSongOptions.Selection.RandomOnly = false;
|
||||||
@@ -371,7 +400,7 @@ namespace Vocaluxe.PartyModes
|
|||||||
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
|
_ScreenSongOptions.Selection.TeamNames = new string[] { "foo", "bar" };
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//TODO: set the right data
|
||||||
_ScreenSongOptions.Selection.TeamNames = new string[GameData.NumPlayerAtOnce];
|
_ScreenSongOptions.Selection.TeamNames = new string[GameData.NumPlayerAtOnce];
|
||||||
|
|
||||||
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
|
||||||
|
|||||||
@@ -473,6 +473,11 @@ namespace Vocaluxe.Base
|
|||||||
return CGame.NumPlayer;
|
return CGame.NumPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetNumPlayer(int NumPlayer)
|
||||||
|
{
|
||||||
|
CGame.NumPlayer = NumPlayer;
|
||||||
|
}
|
||||||
|
|
||||||
public SPlayer[] GetPlayer()
|
public SPlayer[] GetPlayer()
|
||||||
{
|
{
|
||||||
return CGame.Player;
|
return CGame.Player;
|
||||||
|
|||||||
@@ -171,6 +171,11 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
_CurrentPartyMode.PartyMode.JokerUsed(TeamNr);
|
_CurrentPartyMode.PartyMode.JokerUsed(TeamNr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SongSelected(int SongID)
|
||||||
|
{
|
||||||
|
_CurrentPartyMode.PartyMode.SongSelected(SongID);
|
||||||
|
}
|
||||||
#endregion Interface
|
#endregion Interface
|
||||||
|
|
||||||
#region private stuff
|
#region private stuff
|
||||||
|
|||||||
@@ -212,15 +212,12 @@ namespace Vocaluxe.Screens
|
|||||||
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
|
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CSongs.NumVisibleSongs > 0)
|
if (CSongs.NumVisibleSongs > 0 && !_sso.Selection.PartyMode)
|
||||||
{
|
{
|
||||||
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
|
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
|
||||||
{
|
{
|
||||||
if (!_sso.Selection.PartyMode)
|
if (!_sso.Selection.PartyMode)
|
||||||
ToggleSongOptions(ESongOptionsView.Song);
|
ToggleSongOptions(ESongOptionsView.Song);
|
||||||
else
|
|
||||||
//Is this still needed?
|
|
||||||
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -552,7 +549,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
|
if (_sso.Selection.RandomOnly && _sso.Selection.NumJokers != null)
|
||||||
{
|
{
|
||||||
if (Buttons[htButtons(ButtonOptionsOpenPlaylist)].Selected)
|
if (Buttons[htButtons(ButtonStart)].Selected)
|
||||||
{
|
{
|
||||||
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
|
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
|
||||||
return true;
|
return true;
|
||||||
@@ -572,15 +569,13 @@ namespace Vocaluxe.Screens
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1)
|
if (CSongs.NumVisibleSongs > 0 && SongMenus[htSongMenus(SongMenu)].GetActualSelection() != -1 && !_sso.Selection.PartyMode)
|
||||||
{
|
{
|
||||||
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
|
if (SongMenus[htSongMenus(SongMenu)].GetSelectedSong() != -1 && !_SongOptionsActive)
|
||||||
{
|
{
|
||||||
if (!_sso.Selection.PartyMode)
|
if (!_sso.Selection.PartyMode)
|
||||||
ToggleSongOptions(ESongOptionsView.Song);
|
ToggleSongOptions(ESongOptionsView.Song);
|
||||||
else
|
|
||||||
//Is this still needed?
|
|
||||||
HandlePartySongSelection(SongMenus[htSongMenus(SongMenu)].GetSelectedSong());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -771,7 +766,14 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
private void HandlePartySongSelection(int SongNr)
|
private void HandlePartySongSelection(int SongNr)
|
||||||
{
|
{
|
||||||
CGraphics.FadeTo(EScreens.ScreenPartyDummy);
|
if ((CSongs.Category >= 0) && (SongNr >= 0))
|
||||||
|
{
|
||||||
|
CSong song = CSongs.VisibleSongs[SongNr];
|
||||||
|
if (song != null)
|
||||||
|
{
|
||||||
|
CParty.SongSelected(song.ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StartSong(int SongNr)
|
private void StartSong(int SongNr)
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ namespace Vocaluxe.Menu
|
|||||||
public interface IGame
|
public interface IGame
|
||||||
{
|
{
|
||||||
int GetNumPlayer();
|
int GetNumPlayer();
|
||||||
|
void SetNumPlayer(int NumPlayer);
|
||||||
SPlayer[] GetPlayer();
|
SPlayer[] GetPlayer();
|
||||||
float GetMidBeatD();
|
float GetMidBeatD();
|
||||||
int GetCurrentBeatD();
|
int GetCurrentBeatD();
|
||||||
|
|||||||
@@ -107,6 +107,10 @@ namespace Vocaluxe.PartyModes
|
|||||||
if (_ScreenSongOptions.Selection.NumJokers[TeamNr] > 0)
|
if (_ScreenSongOptions.Selection.NumJokers[TeamNr] > 0)
|
||||||
_ScreenSongOptions.Selection.NumJokers[TeamNr]--;
|
_ScreenSongOptions.Selection.NumJokers[TeamNr]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void SongSelected(int SongID)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endregion Implementation
|
#endregion Implementation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,5 +77,6 @@ namespace Vocaluxe.PartyModes
|
|||||||
void SetSearchString(string SearchString, bool Visible);
|
void SetSearchString(string SearchString, bool Visible);
|
||||||
|
|
||||||
void JokerUsed(int TeamNr);
|
void JokerUsed(int TeamNr);
|
||||||
|
void SongSelected(int SongID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user