diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index be0b28c6..3262bf6f 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -180,5 +180,6 @@ Video-Hintergründe Video-Vorschau Videos während des Singens + Videos der Hintergrundmusik diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index 50a87ba8..f0df105b 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -180,5 +180,6 @@ Video Backgrounds Video Preview Videos while singing + Display current backgroundmusic video diff --git a/Output/Languages/French.xml b/Output/Languages/French.xml index 2c2f7944..4c2d3ec9 100644 --- a/Output/Languages/French.xml +++ b/Output/Languages/French.xml @@ -180,5 +180,6 @@ Vidéo en arrière plan Prévisualisation des Vidéos Vidéos pendant que l'on chante + TODO: Display current backgroundmusic video diff --git a/Output/Languages/Spanish.xml b/Output/Languages/Spanish.xml index f9f92cff..8787eca0 100644 --- a/Output/Languages/Spanish.xml +++ b/Output/Languages/Spanish.xml @@ -180,5 +180,6 @@ Videos de Fondo Previsualización del Video Videos al Cantar + TODO: Display current backgroundmusic video diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml b/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml index 292cce63..767bdcc5 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsVideo.xml @@ -185,6 +185,33 @@ + + + 75 + 285 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Left + + + + Normal + + TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND + + + + Button @@ -435,5 +462,70 @@ 3 + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 500 + 280 + 0,00 + 700 + 50 + + 505 + 225 + 0,00 + 40 + 40 + + 1170 + 225 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 205,33 + + Normal + + Bold + + 3 + \ No newline at end of file diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index 7f8098fc..c097345d 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -28,7 +28,6 @@ namespace Vocaluxe.Base private static bool _BackgroundMusicAdded; private static bool _Playing; private static bool _VideoEnabled; - private static bool _VideoToBackground; private static int _Video = -1; private static STexture _CurrentVideoTexture = new STexture(-1); @@ -50,6 +49,7 @@ namespace Vocaluxe.Base if(CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_ONLY_OWN_MUSIC) AddBackgroundMusic(); + ToggleVideo(); _Playing = false; } @@ -352,7 +352,7 @@ namespace Vocaluxe.Base public static bool VideoToBackgroundIsEnabled() { - return _VideoToBackground; + return CConfig.VideosToBackground == EOffOn.TR_CONFIG_ON; } public static bool HasVideo() @@ -384,8 +384,20 @@ namespace Vocaluxe.Base public static void ToggleVideoToBackground() { - ToggleVideo(); - _VideoToBackground = !_VideoToBackground; + if (VideoToBackgroundIsEnabled()) + CConfig.VideosToBackground = EOffOn.TR_CONFIG_OFF; + else + { + CConfig.VideosToBackground = EOffOn.TR_CONFIG_ON; + ApplyBackgroundVideo(); + } + CConfig.SaveConfig(); + } + + public static void ApplyBackgroundVideo() + { + if (!_VideoEnabled) + ToggleVideo(); } } } diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 1aad119c..9bbafce3 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -198,6 +198,7 @@ namespace Vocaluxe.Base public static EOffOn VideoBackgrounds = EOffOn.TR_CONFIG_ON; public static EOffOn VideoPreview = EOffOn.TR_CONFIG_ON; public static EOffOn VideosInSongs = EOffOn.TR_CONFIG_ON; + public static EOffOn VideosToBackground = EOffOn.TR_CONFIG_OFF; // Record public static SMicConfig[] MicConfig; @@ -349,6 +350,7 @@ namespace Vocaluxe.Base CHelper.TryGetEnumValueFromXML("//root/Video/VideoBackgrounds", navigator, ref VideoBackgrounds); CHelper.TryGetEnumValueFromXML("//root/Video/VideoPreview", navigator, ref VideoPreview); CHelper.TryGetEnumValueFromXML("//root/Video/VideosInSongs", navigator, ref VideosInSongs); + CHelper.TryGetEnumValueFromXML("//root/Video/VideosToBackground", navigator, ref VideosToBackground); #endregion Video #region Record @@ -558,6 +560,9 @@ namespace Vocaluxe.Base writer.WriteComment("Show Videos while singing: " + ListStrings(Enum.GetNames(typeof(EOffOn)))); writer.WriteElementString("VideosInSongs", Enum.GetName(typeof(EOffOn), VideosInSongs)); + writer.WriteComment("Show backgroundmusic videos as background: " + ListStrings(Enum.GetNames(typeof(EOffOn)))); + writer.WriteElementString("VideosToBackground", Enum.GetName(typeof(EOffOn), VideosToBackground)); + writer.WriteEndElement(); #endregion Video diff --git a/Vocaluxe/Menu/CBackground.cs b/Vocaluxe/Menu/CBackground.cs index 8bd602da..1a21156b 100644 --- a/Vocaluxe/Menu/CBackground.cs +++ b/Vocaluxe/Menu/CBackground.cs @@ -137,7 +137,7 @@ namespace Vocaluxe.Menu public bool Draw() { bool ok = false; - if (_Theme.Type == EBackgroundTypes.Video && CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON && CBackgroundMusic.VideoToBackgroundIsEnabled() && CBackgroundMusic.IsPlaying() && CBackgroundMusic.HasVideo()) + if (_Theme.Type == EBackgroundTypes.Video && CConfig.VideoBackgrounds == EOffOn.TR_CONFIG_ON && CBackgroundMusic.VideoToBackgroundIsEnabled() && CBackgroundMusic.IsPlaying() && CBackgroundMusic.HasVideo() && CBackgroundMusic.IsVideoEnabled()) { Pause(); ok = DrawBackgroundMusicVideo(); diff --git a/Vocaluxe/Screens/CScreenOptionsVideo.cs b/Vocaluxe/Screens/CScreenOptionsVideo.cs index 04e9d4e1..b578eb68 100644 --- a/Vocaluxe/Screens/CScreenOptionsVideo.cs +++ b/Vocaluxe/Screens/CScreenOptionsVideo.cs @@ -17,6 +17,7 @@ namespace Vocaluxe.Screens private const string SelectSlideVideoBackgrounds = "SelectSlideVideoBackgrounds"; private const string SelectSlideVideoPreview = "SelectSlideVideoPreview"; private const string SelectSlideVideosInSongs = "SelectSlideVideosInSongs"; + private const string SelectSlideVideosToBackground = "SelectSlideVideosToBackground"; private const string ButtonExit = "ButtonExit"; @@ -33,7 +34,7 @@ namespace Vocaluxe.Screens _ScreenVersion = ScreenVersion; _ThemeButtons = new string[] { ButtonExit }; - _ThemeSelectSlides = new string[] { SelectSlideVideoBackgrounds, SelectSlideVideoPreview, SelectSlideVideosInSongs }; + _ThemeSelectSlides = new string[] { SelectSlideVideoBackgrounds, SelectSlideVideoPreview, SelectSlideVideosInSongs, SelectSlideVideosToBackground }; } public override void LoadTheme() @@ -43,6 +44,7 @@ namespace Vocaluxe.Screens SelectSlides[htSelectSlides(SelectSlideVideoBackgrounds)].SetValues((int)CConfig.VideoBackgrounds); SelectSlides[htSelectSlides(SelectSlideVideoPreview)].SetValues((int)CConfig.VideoPreview); SelectSlides[htSelectSlides(SelectSlideVideosInSongs)].SetValues((int)CConfig.VideosInSongs); + SelectSlides[htSelectSlides(SelectSlideVideosToBackground)].SetValues((int)CConfig.VideosToBackground); } public override bool HandleInput(KeyEvent KeyEvent) @@ -110,6 +112,7 @@ namespace Vocaluxe.Screens public override bool UpdateGame() { + SelectSlides[htSelectSlides(SelectSlideVideosToBackground)].Selection = (int)CConfig.VideosToBackground; return true; } @@ -124,6 +127,8 @@ namespace Vocaluxe.Screens CConfig.VideoBackgrounds = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideoBackgrounds)].Selection; CConfig.VideoPreview = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideoPreview)].Selection; CConfig.VideosInSongs = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideosInSongs)].Selection; + CConfig.VideosToBackground = (EOffOn)SelectSlides[htSelectSlides(SelectSlideVideosToBackground)].Selection; + CBackgroundMusic.ApplyBackgroundVideo(); CConfig.SaveConfig(); }