Added BackgroundPreview as music source
This commit is contained in:
1 parent
4963431c19
commit
247bff132b
6 files changed
+10
-7
No files matched your search
@@ -216,6 +216,7 @@ namespace Vocaluxe.Base
|
|||||||
return PreviewMusicVolume;
|
return PreviewMusicVolume;
|
||||||
case EMusicType.Game:
|
case EMusicType.Game:
|
||||||
return GameMusicVolume;
|
return GameMusicVolume;
|
||||||
|
case EMusicType.BackgroundPreview:
|
||||||
case EMusicType.Background:
|
case EMusicType.Background:
|
||||||
return BackgroundMusicVolume;
|
return BackgroundMusicVolume;
|
||||||
case EMusicType.None:
|
case EMusicType.None:
|
||||||
@@ -235,6 +236,7 @@ namespace Vocaluxe.Base
|
|||||||
case EMusicType.Game:
|
case EMusicType.Game:
|
||||||
GameMusicVolume = volume;
|
GameMusicVolume = volume;
|
||||||
break;
|
break;
|
||||||
|
case EMusicType.BackgroundPreview:
|
||||||
case EMusicType.Background:
|
case EMusicType.Background:
|
||||||
BackgroundMusicVolume = volume;
|
BackgroundMusicVolume = volume;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ namespace Vocaluxe.Base
|
|||||||
NextScreen.ProcessMouseMove(_Cursor.X, _Cursor.Y);
|
NextScreen.ProcessMouseMove(_Cursor.X, _Cursor.Y);
|
||||||
|
|
||||||
HidePopup(EPopupScreens.PopupPlayerControl);
|
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;
|
CBackgroundMusic.Disabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,10 +279,10 @@ namespace Vocaluxe.Base
|
|||||||
NextScreen = null;
|
NextScreen = null;
|
||||||
CurrentScreen.OnShowFinish();
|
CurrentScreen.OnShowFinish();
|
||||||
CSound.SetGlobalVolume(CConfig.GetVolumeByType(CurrentScreen.CurrentMusicType));
|
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.Disabled = false;
|
||||||
CBackgroundMusic.IsPlayingPreview = CurrentScreen.CurrentMusicType == EMusicType.Preview;
|
CBackgroundMusic.IsPlayingPreview = CurrentScreen.CurrentMusicType == EMusicType.Preview || CurrentScreen.CurrentMusicType == EMusicType.BackgroundPreview;
|
||||||
}
|
}
|
||||||
_Fading = null;
|
_Fading = null;
|
||||||
}
|
}
|
||||||
@@ -361,7 +361,7 @@ namespace Vocaluxe.Base
|
|||||||
bool popupPlayerControlAllowed = CurrentScreen.CurrentMusicType == EMusicType.Background;
|
bool popupPlayerControlAllowed = CurrentScreen.CurrentMusicType == EMusicType.Background;
|
||||||
bool popupVolumeControlAllowed = CurrentScreen.CurrentMusicType != EMusicType.None;
|
bool popupVolumeControlAllowed = CurrentScreen.CurrentMusicType != EMusicType.None;
|
||||||
//Hide volume control for bg-music if bg-music is disabled
|
//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;
|
popupVolumeControlAllowed = false;
|
||||||
|
|
||||||
bool resume = true;
|
bool resume = true;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
public override EMusicType CurrentMusicType
|
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()
|
public override void Init()
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
public override EMusicType CurrentMusicType
|
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
|
#region public methods
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
public override EMusicType CurrentMusicType
|
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()
|
public override void Init()
|
||||||
|
|||||||
@@ -364,6 +364,7 @@ namespace VocaluxeLib
|
|||||||
None,
|
None,
|
||||||
Background,
|
Background,
|
||||||
Preview,
|
Preview,
|
||||||
|
BackgroundPreview,
|
||||||
Game
|
Game
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user