fixed bg music stop in songscreen, fixed bg music start in loadscreen
This commit is contained in:
1 parent
4d3eed294b
commit
b910cc2224
3 files changed
+24
-12
No files matched your search
@@ -156,6 +156,9 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void Play()
|
||||
{
|
||||
if (_Playing)
|
||||
return;
|
||||
|
||||
if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
|
||||
{
|
||||
if (_AllFileNames.Count > 0)
|
||||
@@ -181,6 +184,9 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void Stop()
|
||||
{
|
||||
if (!_Playing)
|
||||
return;
|
||||
|
||||
if (_VideoEnabled && _Video != -1)
|
||||
{
|
||||
CVideo.VdClose(_Video);
|
||||
@@ -195,6 +201,9 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void Pause()
|
||||
{
|
||||
if (!_Playing)
|
||||
return;
|
||||
|
||||
if (_VideoEnabled && _Video != -1)
|
||||
{
|
||||
CVideo.VdPause(_Video);
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace Vocaluxe.Screens
|
||||
private int _CurrentIntroVideoNr;
|
||||
private bool _IntroOutPlayed;
|
||||
private VideoPlayer[] _Intros;
|
||||
|
||||
private bool _BGMusicStartet;
|
||||
|
||||
|
||||
public CScreenLoad()
|
||||
@@ -121,8 +123,7 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
}
|
||||
|
||||
if (!CBackgroundMusic.Playing)
|
||||
CBackgroundMusic.Next();
|
||||
_BGMusicStartet = false;
|
||||
}
|
||||
|
||||
public override void OnShowFinish()
|
||||
@@ -141,9 +142,6 @@ namespace Vocaluxe.Screens
|
||||
_SongLoaderThread.IsBackground = true;
|
||||
_SongLoaderThread.Start();
|
||||
_timer.Start();
|
||||
|
||||
if (!CBackgroundMusic.Playing)
|
||||
CBackgroundMusic.Next();
|
||||
}
|
||||
|
||||
public override bool UpdateGame()
|
||||
@@ -172,12 +170,14 @@ namespace Vocaluxe.Screens
|
||||
CLanguage.Translate("TR_SCREENLOAD_LOADED") + ")";
|
||||
|
||||
if (CSongs.SongsLoaded && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON &&
|
||||
CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)
|
||||
CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC && !_BGMusicStartet)
|
||||
{
|
||||
CBackgroundMusic.AddOwnMusic();
|
||||
|
||||
//if (!CBackgroundMusic.Playing)
|
||||
// CBackgroundMusic.Next();
|
||||
if (!CBackgroundMusic.Playing)
|
||||
CBackgroundMusic.Next();
|
||||
|
||||
_BGMusicStartet = true;
|
||||
}
|
||||
CBackgroundMusic.CanSing = false;
|
||||
|
||||
|
||||
@@ -183,16 +183,19 @@ namespace Vocaluxe.Screens
|
||||
SongMenus[htSongMenus(SongMenu)].Update();
|
||||
Texts[htTexts(TextCategory)].Text = CSongs.GetActualCategoryName();
|
||||
|
||||
if (CSongs.Category > 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF)
|
||||
CBackgroundMusic.Disabled = true;
|
||||
else
|
||||
CBackgroundMusic.Disabled = false;
|
||||
|
||||
int song = SongMenus[htSongMenus(SongMenu)].GetActualSelection();
|
||||
if ((CSongs.Category >= 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF) && song >= 0 && song < CSongs.VisibleSongs.Length)
|
||||
{
|
||||
Texts[htTexts(TextSelection)].Text = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title;
|
||||
CBackgroundMusic.Disabled = true;
|
||||
Texts[htTexts(TextSelection)].Text = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title;
|
||||
}
|
||||
else if (CSongs.Category == -1 && song >= 0 && song < CSongs.Categories.Length)
|
||||
{
|
||||
Texts[htTexts(TextSelection)].Text = CSongs.Categories[song].Name;
|
||||
CBackgroundMusic.Disabled = false;
|
||||
Texts[htTexts(TextSelection)].Text = CSongs.Categories[song].Name;
|
||||
}
|
||||
else
|
||||
Texts[htTexts(TextSelection)].Text = String.Empty;
|
||||
|
||||
Reference in new issue
Block a user