VideosToBackground is now saved in CConfig and will start up automatically if set

This commit is contained in:
Stephan Sundermann committed 2012-03-06 21:26:15 +01:00
1 parent 7147e6d649
commit c6574a3743
9 files changed
+124 -6

No files matched your search

+1
View File
@@ -180,5 +180,6 @@
<TR_SCREENOVIDEO_VIDEOBACKGROUNDS>Video-Hintergründe</TR_SCREENOVIDEO_VIDEOBACKGROUNDS>
<TR_SCREENOVIDEO_VIDEOPREVIEW>Video-Vorschau</TR_SCREENOVIDEO_VIDEOPREVIEW>
<TR_SCREENOVIDEO_VIDEOINSONGS>Videos während des Singens</TR_SCREENOVIDEO_VIDEOINSONGS>
<TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>Videos der Hintergrundmusik</TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>
</Texts>
</root>
+1
View File
@@ -180,5 +180,6 @@
<TR_SCREENOVIDEO_VIDEOBACKGROUNDS>Video Backgrounds</TR_SCREENOVIDEO_VIDEOBACKGROUNDS>
<TR_SCREENOVIDEO_VIDEOPREVIEW>Video Preview</TR_SCREENOVIDEO_VIDEOPREVIEW>
<TR_SCREENOVIDEO_VIDEOINSONGS>Videos while singing</TR_SCREENOVIDEO_VIDEOINSONGS>
<TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>Display current backgroundmusic video</TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>
</Texts>
</root>
+1
View File
@@ -180,5 +180,6 @@
<TR_SCREENOVIDEO_VIDEOBACKGROUNDS>Vidéo en arrière plan</TR_SCREENOVIDEO_VIDEOBACKGROUNDS>
<TR_SCREENOVIDEO_VIDEOPREVIEW>Prévisualisation des Vidéos</TR_SCREENOVIDEO_VIDEOPREVIEW>
<TR_SCREENOVIDEO_VIDEOINSONGS>Vidéos pendant que l'on chante</TR_SCREENOVIDEO_VIDEOINSONGS>
<TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>TODO: Display current backgroundmusic video</TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>
</Texts>
</root>
+1
View File
@@ -180,5 +180,6 @@
<TR_SCREENOVIDEO_VIDEOBACKGROUNDS>Videos de Fondo</TR_SCREENOVIDEO_VIDEOBACKGROUNDS>
<TR_SCREENOVIDEO_VIDEOPREVIEW>Previsualización del Video</TR_SCREENOVIDEO_VIDEOPREVIEW>
<TR_SCREENOVIDEO_VIDEOINSONGS>Videos al Cantar</TR_SCREENOVIDEO_VIDEOINSONGS>
<TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>TODO: Display current backgroundmusic video</TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>
</Texts>
</root>
@@ -185,6 +185,33 @@
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text4>
<Text5>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>285</Y>
<!--<Z>: Text position-->
<Z>0,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<!--<Color>: Text color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<SColor>: Selected Text color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>TextSColor</SColor>
<!--<Align>: Text align: Left, Center, Right-->
<Align>Left</Align>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Normal</Font>
<!--<Text>: Text or translation tag-->
<Text>TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text5>
<ButtonExit>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
@@ -435,5 +462,70 @@
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>3</NumVisible>
</SelectSlideVideosInSongs>
<SelectSlideVideosToBackground>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
<!--<SkinArrowRight>: Texture name of right arrow-->
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
<!--<SkinSelected>: Texture name for selected SelectSlide-->
<SkinSelected>SelectSlide</SkinSelected>
<!--<SkinArrowLeftSelected>: Texture name of selected left arrow-->
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
<!--<SkinArrowRightSelected>: Texture name of selected right arrow-->
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
<SkinHighlighted>SelectSlide</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>500</X>
<Y>280</Y>
<Z>0,00</Z>
<W>700</W>
<H>50</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>505</ArrowLeftX>
<ArrowLeftY>225</ArrowLeftY>
<ArrowLeftZ>0,00</ArrowLeftZ>
<ArrowLeftW>40</ArrowLeftW>
<ArrowLeftH>40</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>1170</ArrowRightX>
<ArrowRightY>225</ArrowRightY>
<ArrowRightZ>0,00</ArrowRightZ>
<ArrowRightW>40</ArrowRightW>
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
<!--<ArrowSColor>: Selected arrow color from ColorScheme (high priority)-->
<!--or <ArrowSR>, <ArrowSG>, <ArrowSB>, <ArrowSA> (lower priority)-->
<ArrowSColor>ArrowSColor</ArrowSColor>
<!--<TextColor>: Text color from ColorScheme (high priority)-->
<!--or <TextR>, <TextG>, <TextB>, <TextA> (lower priority)-->
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
<TextMaxW>205,33</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Normal</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>3</NumVisible>
</SelectSlideVideosToBackground>
</ScreenOptionsVideo>
</root>
+16 -4
View File
@@ -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();
}
}
}
+5
View File
@@ -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<EOffOn>("//root/Video/VideoBackgrounds", navigator, ref VideoBackgrounds);
CHelper.TryGetEnumValueFromXML<EOffOn>("//root/Video/VideoPreview", navigator, ref VideoPreview);
CHelper.TryGetEnumValueFromXML<EOffOn>("//root/Video/VideosInSongs", navigator, ref VideosInSongs);
CHelper.TryGetEnumValueFromXML<EOffOn>("//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
+1 -1
View File
@@ -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();
+6 -1
View File
@@ -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<EOffOn>((int)CConfig.VideoBackgrounds);
SelectSlides[htSelectSlides(SelectSlideVideoPreview)].SetValues<EOffOn>((int)CConfig.VideoPreview);
SelectSlides[htSelectSlides(SelectSlideVideosInSongs)].SetValues<EOffOn>((int)CConfig.VideosInSongs);
SelectSlides[htSelectSlides(SelectSlideVideosToBackground)].SetValues<EOffOn>((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();
}