Merge remote-tracking branch 'remotes/upstream/develop' into webcam

Conflicts:
	Output/Languages/Deutsch.xml
	Output/Languages/English.xml
Merged conflicts automatically
This commit is contained in:
Stephan Sundermann committed 2012-12-08 12:25:59 +01:00
commit 009f80e024
20 files changed
+691 -11

No files matched your search

+4
View File
@@ -194,6 +194,8 @@
<TR_SCREENOSOUND_BACKGROUNDMUSIC>Hintergrundmusik</TR_SCREENOSOUND_BACKGROUNDMUSIC>
<TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME>Hintergrundmusiklautstärke</TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME>
<TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE>Hintergrundmusikquelle</TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE>
<TR_SCREENOSOUND_PREVIEWMUSICVOLUME>Vorschaulautstärke</TR_SCREENOSOUND_PREVIEWMUSICVOLUME>
<TR_SCREENOSOUND_GAMEMUSICVOLUME>Spiellautstärke</TR_SCREENOSOUND_GAMEMUSICVOLUME>
<!--ScreenOptionsTheme-->
<TR_SCREENOTHEME_OPTIONS>Designeinstellungen</TR_SCREENOTHEME_OPTIONS>
<TR_SCREENOTHEME_THEME>Design</TR_SCREENOTHEME_THEME>
@@ -216,5 +218,7 @@
<TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>Videos der Hintergrundmusik</TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>
<TR_SCREENO_VIDEO_WEBCAMDEVICES>Webcams</TR_SCREENO_VIDEO_WEBCAMDEVICES>
<TR_SCREENO_VIDEO_WEBCAMCAPABILITIES>Webcamfähigkeiten</TR_SCREENO_VIDEO_WEBCAMCAPABILITIES>
<!--ScreenPopupVolumeControl-->
<TR_SCREENPVOLUMECONTROL_VOLUME>Lautstärke</TR_SCREENPVOLUMECONTROL_VOLUME>
</Texts>
</root>
+4
View File
@@ -194,6 +194,8 @@
<TR_SCREENOSOUND_BACKGROUNDMUSIC>Background Music</TR_SCREENOSOUND_BACKGROUNDMUSIC>
<TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME>Background Music Volume</TR_SCREENOSOUND_BACKGROUNDMUSICVOLUME>
<TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE>Background Music Source</TR_SCREENOSOUND_BACKGROUNDMUSICSOURCE>
<TR_SCREENOSOUND_PREVIEWMUSICVOLUME>Preview Music Volume</TR_SCREENOSOUND_PREVIEWMUSICVOLUME>
<TR_SCREENOSOUND_GAMEMUSICVOLUME>Game Music Volume</TR_SCREENOSOUND_GAMEMUSICVOLUME>
<!--ScreenOptionsTheme-->
<TR_SCREENOTHEME_OPTIONS>Theme Options</TR_SCREENOTHEME_OPTIONS>
<TR_SCREENOTHEME_THEME>Theme</TR_SCREENOTHEME_THEME>
@@ -216,5 +218,7 @@
<TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>Display current backgroundmusic video</TR_SCREENO_VIDEO_VIDEOSTOBACKGROUND>
<TR_SCREENO_VIDEO_WEBCAMDEVICES>Webcams</TR_SCREENO_VIDEO_WEBCAMDEVICES>
<TR_SCREENO_VIDEO_WEBCAMCAPABILITIES>Webcamcapabilities</TR_SCREENO_VIDEO_WEBCAMCAPABILITIES>
<!--ScreenPopupVolumeControl-->
<TR_SCREENPVOLUMECONTROL_VOLUME>Volume</TR_SCREENPVOLUMECONTROL_VOLUME>
</Texts>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<ScreenOptionsSound>
<ScreenVersion>2</ScreenVersion>
<ScreenVersion>3</ScreenVersion>
<Background1>
<!--<Type>: Background type: None, Color, Texture, Video-->
<Type>Video</Type>
@@ -145,6 +145,64 @@
<!-- <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 horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENOSOUND_PREVIEWMUSICVOLUME</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text5>
<Text6>
<!--<X>, <Y>: Text position-->
<X>75</X>
<Y>345</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 horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENOSOUND_GAMEMUSICVOLUME</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text6>
<ButtonExit>
<!--<Skin>: Texture name-->
<Skin>Button</Skin>
@@ -397,5 +455,135 @@
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>1</NumVisible>
</SelectSlideBackgroundMusicSource>
<SelectSlidePreviewMusicVolume>
<!--<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>285</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>285</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>500,00</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>3</NumVisible>
</SelectSlidePreviewMusicVolume>
<SelectSlideGameMusicVolume>
<!--<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>340</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>345</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>345</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>500,00</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>3</NumVisible>
</SelectSlideGameMusicVolume>
</ScreenOptionsSound>
</root>
</root>
+3 -1
View File
@@ -333,6 +333,8 @@
<DeleteIcon>Delete.png</DeleteIcon>
<SaveIcon>Save.png</SaveIcon>
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
</Skins>
<Videos>
<BG_Video>[Blue]BG_Video.mp4</BG_Video>
@@ -340,4 +342,4 @@
<IntroMid>[Blue]IntroMid.mp4</IntroMid>
<IntroOut>[Blue]IntroOut.mp4</IntroOut>
</Videos>
</root>
</root>
+3 -1
View File
@@ -327,6 +327,8 @@
<DeleteIcon>Delete.png</DeleteIcon>
<SaveIcon>Save.png</SaveIcon>
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
</Skins>
<Videos>
<BG_Video>[Green]BG_Video.mp4</BG_Video>
@@ -334,4 +336,4 @@
<IntroMid>[Green]IntroMid.mp4</IntroMid>
<IntroOut>[Green]IntroOut.mp4</IntroOut>
</Videos>
</root>
</root>
+3 -1
View File
@@ -327,6 +327,8 @@
<DeleteIcon>Delete.png</DeleteIcon>
<SaveIcon>Save.png</SaveIcon>
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
</Skins>
<Videos>
<BG_Video>[Red]BG_Video.mp4</BG_Video>
@@ -334,4 +336,4 @@
<IntroMid>[Red]IntroMid.mp4</IntroMid>
<IntroOut>[Red]IntroOut.mp4</IntroOut>
</Videos>
</root>
</root>
+3 -1
View File
@@ -327,6 +327,8 @@
<DeleteIcon>Delete.png</DeleteIcon>
<SaveIcon>Save.png</SaveIcon>
<SingIcon>Sing.png</SingIcon>
<Minus>Minus.png</Minus>
<Plus>Plus.png</Plus>
</Skins>
<Videos>
<BG_Video>[Yellow]BG_Video.mp4</BG_Video>
@@ -334,4 +336,4 @@
<IntroMid>[Yellow]IntroMid.mp4</IntroMid>
<IntroOut>[Yellow]IntroOut.mp4</IntroOut>
</Videos>
</root>
</root>
@@ -1,5 +1,17 @@
ScreenOptionsSound
++++++++++
Version 3:
Add:
<SelectSlidePreviewMusicVolume>
<SelectSlideGameMusicVolume>
and some texts for description (Text5, Text6)
"TR_SCRsEENOSOUND_PREVIEWMUSICVOLUME"
"TR_SCREENOSOUND_GAMEMUSICVOLUEM"
++++++++++
Version 2:
+23 -1
View File
@@ -235,9 +235,11 @@ namespace Vocaluxe.Base
public static ERecordLib RecordLib = ERecordLib.PortAudio;
public static EBufferSize AudioBufferSize = EBufferSize.b2048;
public static int AudioLatency = 0;
public static int BackgroundMusicVolume = 50;
public static int BackgroundMusicVolume = 30;
public static EOffOn BackgroundMusic = EOffOn.TR_CONFIG_ON;
public static EBackgroundMusicSource BackgroundMusicSource = EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC;
public static int PreviewMusicVolume = 50;
public static int GameMusicVolume = 80;
// Game
public static List<string> SongFolder = new List<string>();
@@ -367,7 +369,21 @@ namespace Vocaluxe.Base
CHelper.TryGetEnumValueFromXML("//root/Sound/BackgroundMusic", navigator, ref BackgroundMusic);
CHelper.TryGetIntValueFromXML("//root/Sound/BackgroundMusicVolume", navigator, ref BackgroundMusicVolume);
if (BackgroundMusicVolume < 0)
BackgroundMusicVolume = 0;
if (BackgroundMusicVolume > 100)
BackgroundMusicVolume = 100;
CHelper.TryGetEnumValueFromXML("//root/Sound/BackgroundMusicSource", navigator, ref BackgroundMusicSource);
CHelper.TryGetIntValueFromXML("//root/Sound/PreviewMusicVolume", navigator, ref PreviewMusicVolume);
if (PreviewMusicVolume < 0)
PreviewMusicVolume = 0;
if (PreviewMusicVolume > 100)
PreviewMusicVolume = 100;
CHelper.TryGetIntValueFromXML("//root/Sound/GameMusicVolume", navigator, ref GameMusicVolume);
if (GameMusicVolume < 0)
GameMusicVolume = 0;
if (GameMusicVolume > 100)
GameMusicVolume = 100;
#endregion Sound
#region Game
@@ -600,6 +616,12 @@ namespace Vocaluxe.Base
writer.WriteComment("Background Music Source");
writer.WriteElementString("BackgroundMusicSource", Enum.GetName(typeof(EBackgroundMusicSource), BackgroundMusicSource));
writer.WriteComment("Preview Volume from 0 to 100");
writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
writer.WriteComment("Game Volume from 0 to 100");
writer.WriteElementString("GameMusicVolume", GameMusicVolume.ToString());
writer.WriteEndElement();
#endregion Sound
+66
View File
@@ -40,6 +40,7 @@ namespace Vocaluxe.Menu
enum EPopupScreens
{
PopupPlayerControl = 0,
PopupVolumeControl = 1,
NoPopup = -1
}
@@ -200,6 +201,11 @@ namespace Vocaluxe.Menu
private static List<CMenu> _Screens = new List<CMenu>();
private static List<CMenu> _PopupScreens = new List<CMenu>();
private static float _SavedBackgroundMusicVolume;
private static float _SavedPreviewMusicVolume;
private static float _SavedGameMusicVolume;
private static Stopwatch _VolumePopupTimer;
public static float GlobalAlpha
{
get { return _GlobalAlpha; }
@@ -210,6 +216,11 @@ namespace Vocaluxe.Menu
get { return _ZOffset; }
}
public static EScreens CurrentScreen
{
get { return _CurrentScreen; }
}
#region public methods
public static void InitGraphics()
{
@@ -235,6 +246,7 @@ namespace Vocaluxe.Menu
_Screens.Add(new CScreenCredits());
_PopupScreens.Add(new CPopupScreenPlayerControl());
_PopupScreens.Add(new CPopupScreenVolumeControl());
CLog.StopBenchmark(1, "Build Screen List");
@@ -242,6 +254,7 @@ namespace Vocaluxe.Menu
_NextScreen = EScreens.ScreenNull;
_CurrentPopupScreen = EPopupScreens.NoPopup;
_FadingTimer = new Stopwatch();
_VolumePopupTimer = new Stopwatch();
_GlobalAlpha = 1f;
_ZOffset = 0f;
@@ -317,6 +330,10 @@ namespace Vocaluxe.Menu
public static void InitFirstScreen()
{
_SavedBackgroundMusicVolume = CConfig.BackgroundMusicVolume;
_SavedGameMusicVolume = CConfig.GameMusicVolume;
_SavedPreviewMusicVolume = CConfig.PreviewMusicVolume;
_Screens[(int)_CurrentScreen].OnShow();
_Screens[(int)_CurrentScreen].OnShowFinish();
}
@@ -454,6 +471,8 @@ namespace Vocaluxe.Menu
bool PopupPlayerControlAllowed = _CurrentScreen != EScreens.ScreenOptionsRecord && _CurrentScreen != EScreens.ScreenSing &&
_CurrentScreen != EScreens.ScreenSong && _CurrentScreen != EScreens.ScreenCredits;
bool PopupVolumeControlAllowed = _CurrentScreen != EScreens.ScreenCredits;
bool Resume = true;
while (keys.PollEvent(ref KeyEvent))
{
@@ -517,9 +536,28 @@ namespace Vocaluxe.Menu
if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl)
HidePopup(EPopupScreens.PopupPlayerControl);
bool isOverPopupVolumeControl = CHelper.IsInBounds(_PopupScreens[(int)EPopupScreens.PopupVolumeControl].ScreenArea, MouseEvent);
if (PopupVolumeControlAllowed && isOverPopupVolumeControl)
{
if (_CurrentPopupScreen == EPopupScreens.NoPopup)
{
ShowPopup(EPopupScreens.PopupVolumeControl);
_VolumePopupTimer.Reset();
}
}
if (!isOverPopupVolumeControl && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
{
HidePopup(EPopupScreens.PopupVolumeControl);
_VolumePopupTimer.Reset();
}
bool handled = false;
if (_CurrentPopupScreen != EPopupScreens.NoPopup)
handled = _PopupScreens[(int)_CurrentPopupScreen].HandleMouse(MouseEvent);
if (handled && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
_Screens[(int)_CurrentScreen].ApplyVolume();
if (!handled && !_Fading && (_Cursor.IsActive || MouseEvent.LB || MouseEvent.RB || MouseEvent.MB))
Resume &= _Screens[(int)_CurrentScreen].HandleMouse(MouseEvent);
@@ -571,6 +609,34 @@ namespace Vocaluxe.Menu
private static bool Update()
{
//User changed volume with keyboard, pop-up isn't visible yet
if ((_SavedPreviewMusicVolume != CConfig.PreviewMusicVolume || _SavedGameMusicVolume != CConfig.GameMusicVolume || _SavedBackgroundMusicVolume != CConfig.BackgroundMusicVolume)
&& (_CurrentPopupScreen != EPopupScreens.PopupVolumeControl && !_VolumePopupTimer.IsRunning))
{
_VolumePopupTimer.Start();
_SavedBackgroundMusicVolume = CConfig.BackgroundMusicVolume;
_SavedGameMusicVolume = CConfig.GameMusicVolume;
_SavedPreviewMusicVolume = CConfig.PreviewMusicVolume;
}
//User changed volume with keyboard, pop-up is already visible
else if ((_SavedPreviewMusicVolume != CConfig.PreviewMusicVolume || _SavedGameMusicVolume != CConfig.GameMusicVolume || _SavedBackgroundMusicVolume != CConfig.BackgroundMusicVolume)
&& (_CurrentPopupScreen == EPopupScreens.PopupVolumeControl && _VolumePopupTimer.IsRunning))
{
_VolumePopupTimer.Reset();
_VolumePopupTimer.Start();
_SavedBackgroundMusicVolume = CConfig.BackgroundMusicVolume;
_SavedGameMusicVolume = CConfig.GameMusicVolume;
_SavedPreviewMusicVolume = CConfig.PreviewMusicVolume;
}
if (_VolumePopupTimer.IsRunning && _VolumePopupTimer.ElapsedMilliseconds < 1500 && _CurrentPopupScreen != EPopupScreens.PopupVolumeControl)
ShowPopup(EPopupScreens.PopupVolumeControl);
if(_VolumePopupTimer.IsRunning && _VolumePopupTimer.ElapsedMilliseconds >= 1500 && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
{
_VolumePopupTimer.Reset();
HidePopup(EPopupScreens.PopupVolumeControl);
}
if (!_Cursor.IsActive && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
HidePopup(EPopupScreens.PopupVolumeControl);
if (_CurrentPopupScreen != EPopupScreens.NoPopup)
_PopupScreens[(int)_CurrentPopupScreen].UpdateGame();
return _Screens[(int)_CurrentScreen].UpdateGame();
+22
View File
@@ -912,6 +912,24 @@ namespace Vocaluxe.Menu
if (KeyEvent.Key == Keys.Right)
NextElement();
}
if (!CBackgroundMusic.Disabled)
{
if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp))
{
CConfig.BackgroundMusicVolume = CConfig.BackgroundMusicVolume + 5;
if (CConfig.BackgroundMusicVolume > 100)
CConfig.BackgroundMusicVolume = 100;
CConfig.SaveConfig();
}
else if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown))
{
CConfig.BackgroundMusicVolume = CConfig.BackgroundMusicVolume - 5;
if (CConfig.BackgroundMusicVolume < 0)
CConfig.BackgroundMusicVolume = 0;
CConfig.SaveConfig();
}
CBackgroundMusic.ApplyVolume();
}
return true;
}
@@ -1060,6 +1078,10 @@ namespace Vocaluxe.Menu
public abstract bool UpdateGame();
public virtual void ApplyVolume()
{
}
public virtual void OnShow()
{
ResumeBG();
@@ -610,6 +610,11 @@ namespace Vocaluxe.Menu.SongMenu
CSongs.Category = -1;
}
public void ApplyVolume()
{
CSound.SetStreamVolume(_actsongstream, CConfig.PreviewMusicVolume);
}
protected void SelectSong(int nr)
{
if (CSongs.Category >= 0 && (CSongs.NumVisibleSongs > 0) && (nr >= 0) && ((_actsong != nr) || (_streams.Count == 0)))
@@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.GameModes;
using Vocaluxe.Lib.Draw;
using Vocaluxe.Menu;
using Vocaluxe.Lib.Song;
namespace Vocaluxe.Screens
{
class CPopupScreenVolumeControl : CMenu
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 1;
private const string StaticBG = "StaticBG";
private const string SelectSlideVolume = "SelectSlideVolume";
public CPopupScreenVolumeControl()
{
Init();
}
protected override void Init()
{
base.Init();
_ThemeName = "PopupScreenVolumeControl";
_ScreenVersion = ScreenVersion;
_ThemeStatics = new string[] { StaticBG };
_ThemeSelectSlides = new string[] { SelectSlideVolume };
}
public override void LoadTheme()
{
base.LoadTheme();
_ScreenArea = Statics[htStatics(StaticBG)].Rect;
SelectSlides[htSelectSlides(SelectSlideVolume)].AddValues(new string[] { "0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100" });
}
public override bool HandleInput(KeyEvent KeyEvent)
{
base.HandleInput(KeyEvent);
if (KeyEvent.KeyPressed && !Char.IsControl(KeyEvent.Unicode))
{
}
else
{
switch (KeyEvent.Key)
{
case Keys.Escape:
case Keys.Back:
CGraphics.HidePopup(EPopupScreens.PopupVolumeControl);
return false;
}
}
return true;
}
public override bool HandleMouse(MouseEvent MouseEvent)
{
base.HandleMouse(MouseEvent);
if (MouseEvent.LB)
{
SaveConfig();
return true;
}
else if (MouseEvent.Wheel > 0 && CHelper.IsInBounds(_ScreenArea, MouseEvent))
{
if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel >= 0)
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel);
else if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel < 0)
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(0);
SaveConfig();
return true;
}
else if (MouseEvent.Wheel < 0 && CHelper.IsInBounds(_ScreenArea, MouseEvent))
{
if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel < SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues)
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel);
else if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel >= SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues)
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues - 1);
SaveConfig();
return true;
}
else if (MouseEvent.RB)
{
//CGraphics.HidePopup(EPopupScreens.PopupPlayerControl);
return false;
}
return true;
}
public override void OnShow()
{
base.OnShow();
switch (CGraphics.CurrentScreen)
{
case EScreens.ScreenSong:
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.PreviewMusicVolume / 5);
break;
case EScreens.ScreenSing:
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.GameMusicVolume / 5);
break;
default:
SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.BackgroundMusicVolume / 5);
break;
}
}
public override bool UpdateGame()
{
return true;
}
public override bool Draw()
{
if (!_Active)
return false;
return base.Draw();
}
private void SaveConfig()
{
switch (CGraphics.CurrentScreen)
{
case EScreens.ScreenSong:
CConfig.PreviewMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
break;
case EScreens.ScreenSing:
CConfig.GameMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
break;
default:
CConfig.BackgroundMusicVolume = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection * 5;
CBackgroundMusic.ApplyVolume();
break;
}
CConfig.SaveConfig();
}
}
}
+20 -2
View File
@@ -12,11 +12,13 @@ namespace Vocaluxe.Screens
class CScreenOptionsSound : CMenu
{
// Version number for theme files. Increment it, if you've changed something on the theme files!
const int ScreenVersion = 2;
const int ScreenVersion = 3;
private const string SelectSlideBackgroundMusic = "SelectSlideBackgroundMusic";
private const string SelectSlideBackgroundMusicVolume = "SelectSlideBackgroundMusicVolume";
private const string SelectSlideBackgroundMusicSource = "SelectSlideBackgroundMusicSource";
private const string SelectSlidePreviewMusicVolume = "SelectSlidePreviewMusicVolume";
private const string SelectSlideGameMusicVolume = "SelectSlideGameMusicVolume";
private const string ButtonExit = "ButtonExit";
@@ -36,7 +38,7 @@ namespace Vocaluxe.Screens
_ScreenVersion = ScreenVersion;
_ThemeButtons = new string[] { ButtonExit };
_ThemeSelectSlides = new string[] { SelectSlideBackgroundMusic, SelectSlideBackgroundMusicVolume, SelectSlideBackgroundMusicSource };
_ThemeSelectSlides = new string[] { SelectSlideBackgroundMusic, SelectSlideBackgroundMusicVolume, SelectSlideBackgroundMusicSource, SelectSlidePreviewMusicVolume, SelectSlideGameMusicVolume };
}
public override void LoadTheme()
@@ -47,6 +49,11 @@ namespace Vocaluxe.Screens
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection = CConfig.BackgroundMusicVolume / 5;
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].SetValues<EBackgroundMusicSource>((int)CConfig.BackgroundMusicSource);
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].Selection = (int)CConfig.BackgroundMusicSource;
SelectSlides[htSelectSlides(SelectSlidePreviewMusicVolume)].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[htSelectSlides(SelectSlidePreviewMusicVolume)].Selection = CConfig.PreviewMusicVolume / 5;
SelectSlides[htSelectSlides(SelectSlideGameMusicVolume)].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[htSelectSlides(SelectSlideGameMusicVolume)].Selection = CConfig.GameMusicVolume / 5;
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -113,6 +120,10 @@ namespace Vocaluxe.Screens
public override bool UpdateGame()
{
if (_BackgroundMusicVolume != CConfig.BackgroundMusicVolume)
{
SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection = CConfig.BackgroundMusicVolume / 5;
}
return true;
}
@@ -127,9 +138,16 @@ namespace Vocaluxe.Screens
base.OnShow();
_BackgroundMusic = CConfig.BackgroundMusic;
_BackgroundMusicVolume = CConfig.BackgroundMusicVolume;
SelectSlides[htSelectSlides(SelectSlideGameMusicVolume)].Selection = CConfig.GameMusicVolume / 5;
SelectSlides[htSelectSlides(SelectSlidePreviewMusicVolume)].Selection = CConfig.PreviewMusicVolume / 5;
}
private void SaveConfig()
{
CConfig.GameMusicVolume = SelectSlides[htSelectSlides(SelectSlideGameMusicVolume)].Selection * 5;
CConfig.PreviewMusicVolume = SelectSlides[htSelectSlides(SelectSlidePreviewMusicVolume)].Selection * 5;
CConfig.SaveConfig();
EOffOn NewOffOn = (EOffOn)SelectSlides[htSelectSlides(SelectSlideBackgroundMusic)].Selection;
EBackgroundMusicSource NewSource = (EBackgroundMusicSource)SelectSlides[htSelectSlides(SelectSlideBackgroundMusicSource)].Selection;
float NewVolume = SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection * 5;
+31 -2
View File
@@ -238,6 +238,30 @@ namespace Vocaluxe.Screens
TogglePause();
}
break;
case Keys.Add:
case Keys.PageUp:
if (KeyEvent.ModSHIFT)
{
CConfig.GameMusicVolume = CConfig.GameMusicVolume + 5;
if (CConfig.GameMusicVolume > 100)
CConfig.GameMusicVolume = 100;
CConfig.SaveConfig();
ApplyVolume();
}
break;
case Keys.Subtract:
case Keys.PageDown:
if (KeyEvent.ModSHIFT)
{
CConfig.GameMusicVolume = CConfig.GameMusicVolume - 5;
if (CConfig.GameMusicVolume < 0)
CConfig.GameMusicVolume = 0;
CConfig.SaveConfig();
ApplyVolume();
}
break;
}
}
@@ -514,6 +538,11 @@ namespace Vocaluxe.Screens
CloseSong();
}
public override void ApplyVolume()
{
CSound.SetStreamVolumeMax(_CurrentStream, CConfig.GameMusicVolume);
}
private void CloseSong()
{
CSound.FadeAndStop(_CurrentStream, 0f, 0.5f);
@@ -568,7 +597,7 @@ namespace Vocaluxe.Screens
Texts[htTexts(TextSongName)].Text = songname;
_CurrentStream = CSound.Load(song.GetMP3(), true);
CSound.SetStreamVolumeMax(_CurrentStream, 100f); //TODO: Add volume control var
CSound.SetStreamVolumeMax(_CurrentStream, CConfig.GameMusicVolume);
CSound.SetStreamVolume(_CurrentStream, _Volume);
CSound.SetPosition(_CurrentStream, song.Start);
_CurrentTime = song.Start;
@@ -1367,4 +1396,4 @@ namespace Vocaluxe.Screens
}
}
}
}
}
+24
View File
@@ -106,6 +106,8 @@ namespace Vocaluxe.Screens
DragAndDropCover = new CStatic();
Playlists[htPlaylists(Playlist)].Init();
ApplyVolume();
}
public override bool HandleInput(KeyEvent KeyEvent)
@@ -311,6 +313,23 @@ namespace Vocaluxe.Screens
}
}
if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp))
{
CConfig.PreviewMusicVolume = CConfig.PreviewMusicVolume + 5;
if (CConfig.PreviewMusicVolume > 100)
CConfig.PreviewMusicVolume = 100;
CConfig.SaveConfig();
ApplyVolume();
}
else if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown))
{
CConfig.PreviewMusicVolume = CConfig.PreviewMusicVolume - 5;
if (CConfig.PreviewMusicVolume < 0)
CConfig.PreviewMusicVolume = 0;
CConfig.SaveConfig();
ApplyVolume();
}
return true;
}
@@ -575,6 +594,11 @@ namespace Vocaluxe.Screens
SongMenus[htSongMenus(SongMenu)].OnHide();
}
public override void ApplyVolume()
{
SongMenus[htSongMenus(SongMenu)].ApplyVolume(CConfig.PreviewMusicVolume);
}
private void StartSong(int SongNr)
{
if ((CSongs.Category >= 0) && (SongNr >= 0))
+1
View File
@@ -249,6 +249,7 @@
<SubType>Form</SubType>
</Compile>
<Compile Include="Screens\CPopupScreenPlayerControl.cs" />
<Compile Include="Screens\CPopupScreenVolumeControl.cs" />
<Compile Include="Screens\CScreenCredits.cs" />
<Compile Include="Screens\CScreenHighscore.cs" />
<Compile Include="Screens\CScreenLoad.cs" />
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<PopupScreenVolumeControl>
<ScreenVersion>1</ScreenVersion>
<StaticBG>
<!--<Skin>: Texture name-->
<Skin>Menu</Skin>
<!--<X>, <Y>, <Z>, <W>, <H>: Static position, width and height-->
<X>1065</X>
<Y>672</Y>
<Z>-2,00</Z>
<W>225</W>
<H>48</H>
<!--<Color>: Static color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>StaticColor</Color>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</StaticBG>
<Text1>
<!--<X>, <Y>: Text position-->
<X>1067</X>
<Y>680</Y>
<!--<Z>: Text position-->
<Z>-2,00</Z>
<!--<H>: Text height-->
<H>32</H>
<!--<MaxW>: Maximum text width (if exists)-->
<MaxW>80</MaxW>
<!--<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 horizontal: Left, Center, Right-->
<Align>Left</Align>
<!--<HAlign>: Text align vertical (on downsizing): Top, Center, Bottom-->
<HAlign>Center</HAlign>
<!--<Style>: Text style: Normal, Italic, Bold, BoldItalic-->
<Style>Bold</Style>
<!--<Font>: Text font name-->
<Font>Outline</Font>
<!--<Text>: Nothing or translation tag-->
<Text>TR_SCREENPVOLUMECONTROL_VOLUME</Text>
<!--<Reflection> If exists:-->
<!-- <Space>: Reflection Space-->
<!-- <Height>: Reflection Height-->
</Text1>
<SelectSlideVolume>
<!--<Skin>: Texture name-->
<Skin>Invisible</Skin>
<!--<SkinArrowLeft>: Texture name of left arrow-->
<SkinArrowLeft>Minus</SkinArrowLeft>
<!--<SkinArrowRight>: Texture name of right arrow-->
<SkinArrowRight>Plus</SkinArrowRight>
<!--<SkinSelected>: Texture name for selected SelectSlide-->
<SkinSelected>Invisible</SkinSelected>
<!--<SkinArrowLeftSelected>: Texture name of selected left arrow-->
<SkinArrowLeftSelected>Minus</SkinArrowLeftSelected>
<!--<SkinArrowRightSelected>: Texture name of selected right arrow-->
<SkinArrowRightSelected>Plus</SkinArrowRightSelected>
<!--<SkinHighlighted>: Texture name for highlighted SelectSlide-->
<SkinHighlighted>Invisible</SkinHighlighted>
<!--<X>, <Y>, <Z>, <W>, <H>: SelectSlide position, width and height-->
<X>1090</X>
<Y>680</Y>
<Z>-2,00</Z>
<W>200</W>
<H>50</H>
<!--<ArrowLeftX>, <ArrowLeftY>, <ArrowLeftZ>, <ArrowLeftW>, <ArrowLeftH>: Left arrow position, width and height-->
<ArrowLeftX>1195</ArrowLeftX>
<ArrowLeftY>682</ArrowLeftY>
<ArrowLeftZ>-2,00</ArrowLeftZ>
<ArrowLeftW>30</ArrowLeftW>
<ArrowLeftH>30</ArrowLeftH>
<!--<ArrowRightX>, <ArrowRightY>, <ArrowRightZ>, <ArrowRightW>, <ArrowRightH>: Right arrow position, width and height-->
<ArrowRightX>1240</ArrowRightX>
<ArrowRightY>682</ArrowRightY>
<ArrowRightZ>-2,00</ArrowRightZ>
<ArrowRightW>30</ArrowRightW>
<ArrowRightH>30</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>500,00</TextMaxW>
<!--<TextFont>: Text font name-->
<TextFont>Outline</TextFont>
<!--<TextStyle>: Text style: Normal, Italic, Bold, BoldItalic-->
<TextStyle>Bold</TextStyle>
<TextRelativeX>-15,0</TextRelativeX>
<TextRelativeY>-8,0</TextRelativeY>
<!--<NumVisible>: Number of visible elements in the slide-->
<NumVisible>1</NumVisible>
</SelectSlideVolume>
</PopupScreenVolumeControl>
</root>