From 817066ee451780a3b64ce34fd65e9cbeb9548f3b Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Wed, 7 Mar 2012 14:05:23 +0100 Subject: [PATCH] Added SetPressed to CButton Fixed video playback at start --- Vocaluxe/Base/CBackgroundMusic.cs | 3 ++- Vocaluxe/Menu/CButton.cs | 4 +++- Vocaluxe/Screens/CPopupScreenPlayerControl.cs | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Vocaluxe/Base/CBackgroundMusic.cs b/Vocaluxe/Base/CBackgroundMusic.cs index c097345d..95779f67 100644 --- a/Vocaluxe/Base/CBackgroundMusic.cs +++ b/Vocaluxe/Base/CBackgroundMusic.cs @@ -49,7 +49,8 @@ namespace Vocaluxe.Base if(CConfig.BackgroundMusicSource != EBackgroundMusicSource.TR_CONFIG_ONLY_OWN_MUSIC) AddBackgroundMusic(); - ToggleVideo(); + if (VideoToBackgroundIsEnabled()) + ApplyBackgroundVideo(); _Playing = false; } diff --git a/Vocaluxe/Menu/CButton.cs b/Vocaluxe/Menu/CButton.cs index 0341bf03..d4b5d231 100644 --- a/Vocaluxe/Menu/CButton.cs +++ b/Vocaluxe/Menu/CButton.cs @@ -41,6 +41,7 @@ namespace Vocaluxe.Menu public float SReflectionHeight; private bool _Selected; + public bool Pressed; public bool Selected { get { return _Selected; } @@ -234,7 +235,8 @@ namespace Vocaluxe.Menu return; STexture texture = new STexture(-1); - if (!Selected) + + if (!Selected && !Pressed) { texture = CTheme.GetSkinTexture(_Theme.TextureName); CDraw.DrawTexture(texture, Rect, Color); diff --git a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs index 05a88add..d95df149 100644 --- a/Vocaluxe/Screens/CPopupScreenPlayerControl.cs +++ b/Vocaluxe/Screens/CPopupScreenPlayerControl.cs @@ -139,6 +139,8 @@ namespace Vocaluxe.Screens public override bool UpdateGame() { + Buttons[htButtons(ButtonToBackgroundVideo)].Pressed = CBackgroundMusic.VideoToBackgroundIsEnabled(); + Buttons[htButtons(ButtonShowVideo)].Pressed = CBackgroundMusic.IsVideoEnabled(); return true; }