Added BackgroundPreview as music source

This commit is contained in:
Florian Küpper committed 2015-01-16 17:29:22 +01:00
1 parent 4963431c19
commit 247bff132b
6 files changed
+10 -7

No files matched your search

+2
View File
@@ -216,6 +216,7 @@ namespace Vocaluxe.Base
return PreviewMusicVolume;
case EMusicType.Game:
return GameMusicVolume;
case EMusicType.BackgroundPreview:
case EMusicType.Background:
return BackgroundMusicVolume;
case EMusicType.None:
@@ -235,6 +236,7 @@ namespace Vocaluxe.Base
case EMusicType.Game:
GameMusicVolume = volume;
break;
case EMusicType.BackgroundPreview:
case EMusicType.Background:
BackgroundMusicVolume = volume;
break;
+4 -4
View File
@@ -224,7 +224,7 @@ namespace Vocaluxe.Base
NextScreen.ProcessMouseMove(_Cursor.X, _Cursor.Y);
HidePopup(EPopupScreens.PopupPlayerControl);
if (NextScreen.CurrentMusicType != EMusicType.Background && NextScreen.CurrentMusicType != EMusicType.Preview)
if (NextScreen.CurrentMusicType != EMusicType.Background && NextScreen.CurrentMusicType != EMusicType.Preview && NextScreen.CurrentMusicType != EMusicType.BackgroundPreview)
CBackgroundMusic.Disabled = true;
}
@@ -279,10 +279,10 @@ namespace Vocaluxe.Base
NextScreen = null;
CurrentScreen.OnShowFinish();
CSound.SetGlobalVolume(CConfig.GetVolumeByType(CurrentScreen.CurrentMusicType));
if (CurrentScreen.CurrentMusicType == EMusicType.Background || CurrentScreen.CurrentMusicType == EMusicType.Preview)
if (CurrentScreen.CurrentMusicType == EMusicType.Background || CurrentScreen.CurrentMusicType == EMusicType.Preview || CurrentScreen.CurrentMusicType == EMusicType.BackgroundPreview)
{
CBackgroundMusic.Disabled = false;
CBackgroundMusic.IsPlayingPreview = CurrentScreen.CurrentMusicType == EMusicType.Preview;
CBackgroundMusic.IsPlayingPreview = CurrentScreen.CurrentMusicType == EMusicType.Preview || CurrentScreen.CurrentMusicType == EMusicType.BackgroundPreview;
}
_Fading = null;
}
@@ -361,7 +361,7 @@ namespace Vocaluxe.Base
bool popupPlayerControlAllowed = CurrentScreen.CurrentMusicType == EMusicType.Background;
bool popupVolumeControlAllowed = CurrentScreen.CurrentMusicType != EMusicType.None;
//Hide volume control for bg-music if bg-music is disabled
if (popupVolumeControlAllowed && CurrentScreen.CurrentMusicType == EMusicType.Background && CConfig.Config.Sound.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
if (popupVolumeControlAllowed && (CurrentScreen.CurrentMusicType == EMusicType.Background || CurrentScreen.CurrentMusicType == EMusicType.BackgroundPreview) && CConfig.Config.Sound.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
popupVolumeControlAllowed = false;
bool resume = true;
+1 -1
View File
@@ -52,7 +52,7 @@ namespace Vocaluxe.Screens
public override EMusicType CurrentMusicType
{
get { return CConfig.Config.Sound.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF ? EMusicType.None : EMusicType.Preview; }
get { return EMusicType.BackgroundPreview; }
}
public override void Init()
+1 -1
View File
@@ -67,7 +67,7 @@ namespace Vocaluxe.Screens
public override EMusicType CurrentMusicType
{
get { return CConfig.Config.Sound.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF ? EMusicType.None : EMusicType.Preview; }
get { return EMusicType.BackgroundPreview; }
}
#region public methods
+1 -1
View File
@@ -59,7 +59,7 @@ namespace Vocaluxe.Screens
public override EMusicType CurrentMusicType
{
get { return CConfig.Config.Sound.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF ? EMusicType.None : EMusicType.Preview; }
get { return EMusicType.BackgroundPreview; }
}
public override void Init()
+1
View File
@@ -364,6 +364,7 @@ namespace VocaluxeLib
None,
Background,
Preview,
BackgroundPreview,
Game
}