diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml
index 1cafa62a..6554f2dc 100644
--- a/Output/Languages/English.xml
+++ b/Output/Languages/English.xml
@@ -76,6 +76,7 @@
Own Music and Background Music
No own Music
Only own Music
+ Only selected song
All
Only names and avatars
Nothing
diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs
index be900321..711c88bb 100644
--- a/Vocaluxe/Base/CBackgroundMusic.cs
+++ b/Vocaluxe/Base/CBackgroundMusic.cs
@@ -164,7 +164,7 @@ namespace Vocaluxe.Base
public static void Play()
{
- if (IsPlaying || (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_OFF && !_PlaysPreview))
+ if (IsPlaying || (CConfig.BackgroundMusic != EBackgroundMusicOffOn.TR_CONFIG_ON && !_PlaysPreview))
return;
if (_PlaysPreview)
diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs
index 2e73bc8e..5b42d5aa 100644
--- a/Vocaluxe/Base/CConfig.cs
+++ b/Vocaluxe/Base/CConfig.cs
@@ -97,7 +97,7 @@ namespace Vocaluxe.Base
public static EBufferSize AudioBufferSize = EBufferSize.B2048;
public static int AudioLatency;
private static int _BackgroundMusicVolume = 30;
- public static EOffOn BackgroundMusic = EOffOn.TR_CONFIG_ON;
+ public static EBackgroundMusicOffOn BackgroundMusic = EBackgroundMusicOffOn.TR_CONFIG_ON;
public static EBackgroundMusicSource BackgroundMusicSource = EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC;
public static EOffOn BackgroundMusicUseStart = EOffOn.TR_CONFIG_ON;
private static int _PreviewMusicVolume = 50;
@@ -478,8 +478,8 @@ namespace Vocaluxe.Base
writer.WriteComment("AudioLatency from -500 to 500 ms");
writer.WriteElementString("AudioLatency", AudioLatency.ToString());
- writer.WriteComment("Background Music: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
- writer.WriteElementString("BackgroundMusic", Enum.GetName(typeof(EOffOn), BackgroundMusic));
+ writer.WriteComment("Background Music: " + CHelper.ListStrings(Enum.GetNames(typeof(EBackgroundMusicOffOn))));
+ writer.WriteElementString("BackgroundMusic", Enum.GetName(typeof(EBackgroundMusicOffOn), BackgroundMusic));
writer.WriteComment("Background Music Volume from 0 to 100");
writer.WriteElementString("BackgroundMusicVolume", BackgroundMusicVolume.ToString());
diff --git a/Vocaluxe/Base/CGraphics.cs b/Vocaluxe/Base/CGraphics.cs
index 6526ac02..69bf1c51 100644
--- a/Vocaluxe/Base/CGraphics.cs
+++ b/Vocaluxe/Base/CGraphics.cs
@@ -340,7 +340,7 @@ namespace Vocaluxe.Base
bool popupVolumeControlAllowed = _CurrentScreen != EScreens.ScreenCredits && _CurrentScreen != EScreens.ScreenOptionsRecord;
//Hide volume control for bg-music if bg-music is disabled
if (popupVolumeControlAllowed && (_CurrentScreen != EScreens.ScreenSong || CSongs.Category == -1)
- && _CurrentScreen != EScreens.ScreenSing && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_OFF)
+ && _CurrentScreen != EScreens.ScreenSing && CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
popupVolumeControlAllowed = false;
@@ -396,13 +396,13 @@ namespace Vocaluxe.Base
if (popupPlayerControlAllowed && keyEvent.Key == Keys.Tab)
{
- if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
+ if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_ON)
ShowPopup(EPopupScreens.PopupPlayerControl);
else
HidePopup(EPopupScreens.PopupPlayerControl);
}
- if (popupPlayerControlAllowed && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
+ if (popupPlayerControlAllowed && CConfig.BackgroundMusic != EBackgroundMusicOffOn.TR_CONFIG_OFF)
{
if (keyEvent.Key == Keys.MediaNextTrack)
CBackgroundMusic.Next();
@@ -502,7 +502,7 @@ namespace Vocaluxe.Base
bool isOverPopupPlayerControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupPlayerControl].ScreenArea, mouseEvent);
if (popupPlayerControlAllowed && isOverPopupPlayerControl)
{
- if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
+ if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_ON)
ShowPopup(EPopupScreens.PopupPlayerControl);
}
diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs
index c0629d36..68bdb588 100644
--- a/Vocaluxe/Base/CMain.cs
+++ b/Vocaluxe/Base/CMain.cs
@@ -76,7 +76,7 @@ namespace Vocaluxe.Base
return CConfig.BackgroundMusicVolume;
}
- public EOffOn GetBackgroundMusicStatus()
+ public EBackgroundMusicOffOn GetBackgroundMusicStatus()
{
return CConfig.BackgroundMusic;
}
diff --git a/Vocaluxe/Screens/CScreenOptionsSound.cs b/Vocaluxe/Screens/CScreenOptionsSound.cs
index 502f4c28..0d711fd0 100644
--- a/Vocaluxe/Screens/CScreenOptionsSound.cs
+++ b/Vocaluxe/Screens/CScreenOptionsSound.cs
@@ -52,7 +52,7 @@ namespace Vocaluxe.Screens
public override void LoadTheme(string xmlPath)
{
base.LoadTheme(xmlPath);
- _SelectSlides[_SelectSlideBackgroundMusic].SetValues((int)CConfig.BackgroundMusic);
+ _SelectSlides[_SelectSlideBackgroundMusic].SetValues((int)CConfig.BackgroundMusic);
_SelectSlides[_SelectSlideBackgroundMusicVolume].AddValues(new string[]
{"0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100"});
_SelectSlides[_SelectSlideBackgroundMusicVolume].Selection = CConfig.BackgroundMusicVolume / 5;
@@ -150,14 +150,14 @@ namespace Vocaluxe.Screens
{
CConfig.GameMusicVolume = _SelectSlides[_SelectSlideGameMusicVolume].Selection * 5;
CConfig.PreviewMusicVolume = _SelectSlides[_SelectSlidePreviewMusicVolume].Selection * 5;
- CConfig.BackgroundMusic = (EOffOn)_SelectSlides[_SelectSlideBackgroundMusic].Selection;
+ CConfig.BackgroundMusic = (EBackgroundMusicOffOn)_SelectSlides[_SelectSlideBackgroundMusic].Selection;
CConfig.BackgroundMusicSource = (EBackgroundMusicSource)_SelectSlides[_SelectSlideBackgroundMusicSource].Selection;
CConfig.BackgroundMusicVolume = _SelectSlides[_SelectSlideBackgroundMusicVolume].Selection * 5;
CConfig.SaveConfig();
CBackgroundMusic.SetMusicSource(CConfig.BackgroundMusicSource);
CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
- if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
+ if (CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_ON)
CBackgroundMusic.Play();
else
CBackgroundMusic.Pause();
diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs
index 94753053..d7722f9a 100644
--- a/Vocaluxe/Screens/CScreenSong.cs
+++ b/Vocaluxe/Screens/CScreenSong.cs
@@ -714,7 +714,7 @@ namespace Vocaluxe.Screens
_SongMenu.OnHide();
- if (CGraphics.NextScreen != EScreens.ScreenNames || CConfig.BackgroundMusic == EOffOn.TR_CONFIG_OFF)
+ if (CGraphics.NextScreen != EScreens.ScreenNames || CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
{
CBackgroundMusic.Disabled = false;
CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
diff --git a/VocaluxeLib/Enums.cs b/VocaluxeLib/Enums.cs
index e7bf8270..4db6424c 100644
--- a/VocaluxeLib/Enums.cs
+++ b/VocaluxeLib/Enums.cs
@@ -248,6 +248,13 @@ namespace VocaluxeLib
// ReSharper restore InconsistentNaming
}
+ public enum EBackgroundMusicOffOn
+ {
+ TR_CONFIG_OFF,
+ TR_CONFIG_ONLY_SONG,
+ TR_CONFIG_ON
+ }
+
public enum EPlayerInfo
{
// ReSharper disable InconsistentNaming
diff --git a/VocaluxeLib/IBasic.cs b/VocaluxeLib/IBasic.cs
index 699a4152..d88a4ea7 100644
--- a/VocaluxeLib/IBasic.cs
+++ b/VocaluxeLib/IBasic.cs
@@ -35,7 +35,7 @@ namespace VocaluxeLib
void SetBackgroundMusicVolume(int newVolume);
int GetBackgroundMusicVolume();
- EOffOn GetBackgroundMusicStatus();
+ EBackgroundMusicOffOn GetBackgroundMusicStatus();
int GetPreviewMusicVolume();
diff --git a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs
index eaeee46b..9a11dde7 100644
--- a/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs
+++ b/VocaluxeLib/Menu/SongMenu/CSongMenuFramework.cs
@@ -382,7 +382,7 @@ namespace VocaluxeLib.Menu.SongMenu
public virtual void OnHide()
{
- if(CBase.Graphics.GetNextScreen() != EScreens.ScreenNames || CBase.Config.GetBackgroundMusicStatus() == EOffOn.TR_CONFIG_OFF)
+ if(CBase.Graphics.GetNextScreen() != EScreens.ScreenNames || CBase.Config.GetBackgroundMusicStatus() == EBackgroundMusicOffOn.TR_CONFIG_OFF)
_ResetPreview();
}