Fix missing song length and wrong volumes (int=0-100, float=0-1)
Also fade in preview music
This commit is contained in:
1 parent
b99f9467de
commit
4a78dd4b31
17 files changed
+65
-73
No files matched your search
@@ -366,7 +366,6 @@ namespace VocaluxeLib.PartyModes.Challenge
|
||||
_SetNumJokers();
|
||||
_SetTeamNames();
|
||||
GameData.CatSongIndices = null;
|
||||
CBase.Graphics.FadeTo(EScreen.Song);
|
||||
}
|
||||
|
||||
private void _SetNumJokers()
|
||||
|
||||
@@ -193,7 +193,8 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
break;
|
||||
case EStage.Main:
|
||||
_Stage = EStage.Singing;
|
||||
_StartNextRound();
|
||||
if (!_StartNextRound())
|
||||
CBase.Graphics.FadeTo(EScreen.Party);
|
||||
break;
|
||||
case EStage.Singing:
|
||||
_Stage = EStage.Main;
|
||||
@@ -335,7 +336,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
Next();
|
||||
}
|
||||
|
||||
private void _StartNextRound()
|
||||
private bool _StartNextRound()
|
||||
{
|
||||
_ScreenSongOptions.Selection.RandomOnly = _ScreenSongOptions.Sorting.Tabs != EOffOn.TR_CONFIG_ON;
|
||||
_ScreenSongOptions.Selection.CategoryChangeAllowed = _ScreenSongOptions.Sorting.Tabs == EOffOn.TR_CONFIG_ON;
|
||||
@@ -343,8 +344,7 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
_SetTeamNames();
|
||||
GameData.CatSongIndices = null;
|
||||
|
||||
if (_RandomizeSongs())
|
||||
CBase.Graphics.FadeTo(EScreen.Sing);
|
||||
return _RandomizeSongs();
|
||||
}
|
||||
|
||||
private bool _RandomizeSongs()
|
||||
@@ -383,7 +383,6 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
if (visibleSongs.Count == 0)
|
||||
{
|
||||
CBase.Log.LogError("CPartyChallengeMedleyMode Error: There are no songs!");
|
||||
CBase.Graphics.FadeTo(EScreen.Party);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -407,7 +406,6 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
|
||||
if (ids.Count == 0)
|
||||
{
|
||||
CBase.Log.LogError("CPartyChallengeMedleyMode Error: There are no medley songs!");
|
||||
CBase.Graphics.FadeTo(EScreen.Party);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
{
|
||||
base.OnClose();
|
||||
CBase.BackgroundMusic.SetDisabled(false);
|
||||
CBase.Sound.Fade(_PreviewStream, 0f, 0.5f, EStreamAction.Close);
|
||||
CBase.Sound.Fade(_PreviewStream, 0, 0.5f, EStreamAction.Close);
|
||||
}
|
||||
|
||||
private void _CreateFields()
|
||||
@@ -511,9 +511,9 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
_PreviewStream = CBase.Sound.Load(song.GetMP3());
|
||||
CBase.Sound.SetGlobalVolume(CBase.Config.GetMusicVolume(EMusicType.Preview));
|
||||
CBase.Sound.SetPosition(_PreviewStream, song.Preview.StartTime);
|
||||
CBase.Sound.SetStreamVolume(_PreviewStream, 0f);
|
||||
CBase.Sound.SetStreamVolume(_PreviewStream, 0);
|
||||
CBase.Sound.Play(_PreviewStream);
|
||||
CBase.Sound.Fade(_PreviewStream, 1f, 1f);
|
||||
CBase.Sound.Fade(_PreviewStream, 100, 1f);
|
||||
}
|
||||
|
||||
private void _UpdatePlayerInformation()
|
||||
@@ -593,13 +593,13 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
private void _NextRound()
|
||||
{
|
||||
CBase.Sound.Fade(_PreviewStream, 0f, 0.5f, EStreamAction.Close);
|
||||
CBase.Sound.Fade(_PreviewStream, 0, 0.5f, EStreamAction.Close);
|
||||
_PartyMode.Next();
|
||||
}
|
||||
|
||||
private void _EndParty()
|
||||
{
|
||||
CBase.Sound.Fade(_PreviewStream, 0f, 0.5f, EStreamAction.Close);
|
||||
CBase.Sound.Fade(_PreviewStream, 0, 0.5f, EStreamAction.Close);
|
||||
CBase.Graphics.FadeTo(EScreen.Party);
|
||||
}
|
||||
|
||||
@@ -618,7 +618,7 @@ namespace VocaluxeLib.PartyModes.TicTacToe
|
||||
|
||||
private void _Back()
|
||||
{
|
||||
CBase.Sound.Fade(_PreviewStream, 0f, 0.5f, EStreamAction.Close);
|
||||
CBase.Sound.Fade(_PreviewStream, 0, 0.5f, EStreamAction.Close);
|
||||
_PartyMode.Back();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user