Play song-preview instead of bg-music (if enabled) on names-, score- and highscore-screen.
This commit is contained in:
1 parent
04c2b85e2b
commit
8e8fdc1277
12 files changed
+48
-12
No files matched your search
@@ -60,6 +60,11 @@ namespace Vocaluxe.Base
|
||||
get { return _CurrentScreen; }
|
||||
}
|
||||
|
||||
public static EScreens NextScreen
|
||||
{
|
||||
get { return _NextScreen; }
|
||||
}
|
||||
|
||||
#region public methods
|
||||
public static void Init()
|
||||
{
|
||||
|
||||
+12
-2
@@ -77,6 +77,11 @@ namespace Vocaluxe.Base
|
||||
return CConfig.BackgroundMusicVolume;
|
||||
}
|
||||
|
||||
public EOffOn GetBackgroundMusicStatus()
|
||||
{
|
||||
return CConfig.BackgroundMusic;
|
||||
}
|
||||
|
||||
public int GetPreviewMusicVolume()
|
||||
{
|
||||
return CConfig.PreviewMusicVolume;
|
||||
@@ -436,6 +441,11 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
return CGraphics.GlobalAlpha;
|
||||
}
|
||||
|
||||
public EScreens GetNextScreen()
|
||||
{
|
||||
return CGraphics.NextScreen;
|
||||
}
|
||||
}
|
||||
|
||||
class CBlog : ILog
|
||||
@@ -979,9 +989,9 @@ namespace Vocaluxe.Base
|
||||
CPreviewPlayer.Stop();
|
||||
}
|
||||
|
||||
public void Pause()
|
||||
public void TogglePause()
|
||||
{
|
||||
CPreviewPlayer.Pause();
|
||||
CPreviewPlayer.TogglePause();
|
||||
}
|
||||
|
||||
public CTexture GetCover()
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Vocaluxe.Base
|
||||
_Player.Play();
|
||||
}
|
||||
|
||||
public static void Pause()
|
||||
public static void TogglePause()
|
||||
{
|
||||
_Player.TogglePause();
|
||||
}
|
||||
|
||||
@@ -566,6 +566,9 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
base.OnClose();
|
||||
CRecord.Stop();
|
||||
|
||||
if (CGraphics.NextScreen != EScreens.ScreenSong && CPreviewPlayer.IsPlaying)
|
||||
CPreviewPlayer.TogglePause();
|
||||
}
|
||||
|
||||
public override bool Draw()
|
||||
|
||||
@@ -123,6 +123,9 @@ namespace Vocaluxe.Screens
|
||||
|
||||
public override void OnShow()
|
||||
{
|
||||
if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
|
||||
CPreviewPlayer.TogglePause();
|
||||
|
||||
base.OnShow();
|
||||
//-1 --> Show average
|
||||
_Round = CGame.NumRounds > 1 ? -1 : 0;
|
||||
|
||||
@@ -537,8 +537,6 @@ namespace Vocaluxe.Screens
|
||||
_CloseSong();
|
||||
if (_Webcam)
|
||||
CWebcam.Stop();
|
||||
CBackgroundMusic.Disabled = false;
|
||||
CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
|
||||
}
|
||||
|
||||
private void _CloseSong()
|
||||
|
||||
@@ -716,9 +716,14 @@ namespace Vocaluxe.Screens
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
CBackgroundMusic.Disabled = false;
|
||||
CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
|
||||
|
||||
_SongMenu.OnHide();
|
||||
|
||||
if (CGraphics.NextScreen != EScreens.ScreenNames || CConfig.BackgroundMusic == EOffOn.TR_CONFIG_OFF)
|
||||
{
|
||||
CBackgroundMusic.Disabled = false;
|
||||
CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
|
||||
}
|
||||
}
|
||||
|
||||
private void _HandlePartySongSelection(int songNr)
|
||||
|
||||
Reference in new issue
Block a user