From 4905d6bfd847b215456570d8475849cb0df0bc5d Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 19:56:53 +0100 Subject: [PATCH 01/10] First step for individual volumes. --- Vocaluxe/Base/CConfig.cs | 22 ++++++++++++++++++ Vocaluxe/Menu/CMenu.cs | 18 +++++++++++++++ Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs | 7 +++++- Vocaluxe/Screens/CScreenSing.cs | 24 ++++++++++++++++++++ Vocaluxe/Screens/CScreenSong.cs | 15 ++++++++++++ 5 files changed, 85 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 60a30d7d..7b51dfed 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -231,6 +231,8 @@ namespace Vocaluxe.Base public static int BackgroundMusicVolume = 50; public static EOffOn BackgroundMusic = EOffOn.TR_CONFIG_ON; public static EBackgroundMusicSource BackgroundMusicSource = EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC; + public static int PreviewMusicVolume = 20; + public static int GameMusicVolume = 100; // Game public static List SongFolder = new List(); @@ -358,7 +360,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 @@ -585,6 +601,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 diff --git a/Vocaluxe/Menu/CMenu.cs b/Vocaluxe/Menu/CMenu.cs index fd4aed88..4d96610d 100644 --- a/Vocaluxe/Menu/CMenu.cs +++ b/Vocaluxe/Menu/CMenu.cs @@ -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; } diff --git a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs index 045ec139..1c87fe4f 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs @@ -598,6 +598,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))) @@ -628,7 +633,7 @@ namespace Vocaluxe.Menu.SongMenu CSound.SetPosition(_stream, startposition); CSound.Play(_stream); - CSound.Fade(_stream, 100f, 3f); + CSound.Fade(_stream, CConfig.PreviewMusicVolume, 3f); _streams.Add(_stream); _actsongstream = _stream; diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index c75081c3..cca73a51 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -227,6 +227,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(); + CSound.SetStreamVolume(_CurrentStream, CConfig.GameMusicVolume); + } + break; + + case Keys.Subtract: + case Keys.PageDown: + if (KeyEvent.ModSHIFT) + { + CConfig.GameMusicVolume = CConfig.GameMusicVolume - 5; + if (CConfig.GameMusicVolume < 0) + CConfig.GameMusicVolume = 0; + CConfig.SaveConfig(); + CSound.SetStreamVolume(_CurrentStream, CConfig.GameMusicVolume); + } + break; } } diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 9a0b0e71..a4008cea 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -311,6 +311,21 @@ 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(); + } + 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(); + } + return true; } From 256762305ac90db02364a4bbe387c93fff519b13 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 21:44:47 +0100 Subject: [PATCH 02/10] Finished volume-control. --- Output/Languages/Deutsch.xml | 4 + Output/Languages/English.xml | 4 + .../Ambient/Screens/ScreenOptionsSound.xml | 192 +++++++++++++++++- Output/Themes/Ambient/Skin Blue.xml | 5 +- Output/Themes/Ambient/Skin Green.xml | 5 +- Output/Themes/Ambient/Skin Red.xml | 5 +- Output/Themes/Ambient/Skin Yellow.xml | 5 +- .../Changelog_ScreenOptionsSound.txt | 12 ++ Vocaluxe/Menu/CGraphics.cs | 22 ++ Vocaluxe/Menu/CMenu.cs | 4 + Vocaluxe/Screens/CPopupScreenVolumeControl.cs | 140 +++++++++++++ Vocaluxe/Screens/CScreenOptionsSound.cs | 15 +- Vocaluxe/Screens/CScreenSing.cs | 11 +- Vocaluxe/Screens/CScreenSong.cs | 11 + Vocaluxe/Vocaluxe.csproj | 1 + .../Screens/PopupScreenVolumeControl.xml | 119 +++++++++++ 16 files changed, 544 insertions(+), 11 deletions(-) create mode 100644 Vocaluxe/Screens/CPopupScreenVolumeControl.cs create mode 100644 output/themes/Ambient/Screens/PopupScreenVolumeControl.xml diff --git a/Output/Languages/Deutsch.xml b/Output/Languages/Deutsch.xml index 19f1decd..610e191e 100644 --- a/Output/Languages/Deutsch.xml +++ b/Output/Languages/Deutsch.xml @@ -190,6 +190,8 @@ Hintergrundmusik Hintergrundmusiklautstärke Hintergrundmusikquelle + Vorschaulautstärke + Spiellautstärke Designeinstellungen Design @@ -210,5 +212,7 @@ Video-Vorschau Videos während des Singens Videos der Hintergrundmusik + + Lautstärke diff --git a/Output/Languages/English.xml b/Output/Languages/English.xml index b3e2194f..02105784 100644 --- a/Output/Languages/English.xml +++ b/Output/Languages/English.xml @@ -190,6 +190,8 @@ Background Music Background Music Volume Background Music Source + Preview Music Volume + Game Music Volume Theme Options Theme @@ -210,5 +212,7 @@ Video Preview Videos while singing Display current backgroundmusic video + + Volume diff --git a/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml b/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml index 3f23d55c..1433aa5a 100644 --- a/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml +++ b/Output/Themes/Ambient/Screens/ScreenOptionsSound.xml @@ -1,7 +1,7 @@  - 2 + 3 Video @@ -145,6 +145,64 @@ + + + 75 + 285 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Left + + Center + + + + Outline + + TR_SCREENOSOUND_PREVIEWMUSICVOLUME + + + + + + + 75 + 345 + + 0,00 + + 32 + + + + StaticColor + + + TextSColor + + Left + + Center + + + + Outline + + TR_SCREENOSOUND_GAMEMUSICVOLUME + + + + Button @@ -397,5 +455,135 @@ 1 + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 500 + 280 + 0,00 + 700 + 50 + + 505 + 285 + 0,00 + 40 + 40 + + 1170 + 285 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 500,00 + + Outline + + Bold + + 3 + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 500 + 340 + 0,00 + 700 + 50 + + 505 + 345 + 0,00 + 40 + 40 + + 1170 + 345 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 500,00 + + Outline + + Bold + + 3 + - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index 7587328b..34b3ffb5 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -333,6 +333,9 @@ Delete.png Save.png Sing.png + Minus.png + Plus.png + VolumeBG.png [Blue]BG_Video.mp4 @@ -340,4 +343,4 @@ [Blue]IntroMid.mp4 [Blue]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index a5928d20..c3e20565 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -327,6 +327,9 @@ Delete.png Save.png Sing.png + Minus.png + Plus.png + VolumeBG.png [Green]BG_Video.mp4 @@ -334,4 +337,4 @@ [Green]IntroMid.mp4 [Green]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index fd09e46c..04aaa93a 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -327,6 +327,9 @@ Delete.png Save.png Sing.png + Minus.png + Plus.png + VolumeBG.png [Red]BG_Video.mp4 @@ -334,4 +337,4 @@ [Red]IntroMid.mp4 [Red]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index 83fab332..fdc4b49e 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -327,6 +327,9 @@ Delete.png Save.png Sing.png + Minus.png + Plus.png + VolumeBG.png [Yellow]BG_Video.mp4 @@ -334,4 +337,4 @@ [Yellow]IntroMid.mp4 [Yellow]IntroOut.mp4 - \ No newline at end of file + diff --git a/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt b/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt index 5bdf4bfd..d83bd921 100644 --- a/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt +++ b/Output/Themes/Changelog/Changelog_ScreenOptionsSound.txt @@ -1,5 +1,17 @@ ScreenOptionsSound +++++++++++ +Version 3: + +Add: + + + + +and some texts for description (Text5, Text6) +"TR_SCRsEENOSOUND_PREVIEWMUSICVOLUME" +"TR_SCREENOSOUND_GAMEMUSICVOLUEM" + ++++++++++ Version 2: diff --git a/Vocaluxe/Menu/CGraphics.cs b/Vocaluxe/Menu/CGraphics.cs index b309938a..d921cace 100644 --- a/Vocaluxe/Menu/CGraphics.cs +++ b/Vocaluxe/Menu/CGraphics.cs @@ -40,6 +40,7 @@ namespace Vocaluxe.Menu enum EPopupScreens { PopupPlayerControl = 0, + PopupVolumeControl = 1, NoPopup = -1 } @@ -210,6 +211,11 @@ namespace Vocaluxe.Menu get { return _ZOffset; } } + public static EScreens CurrentScreen + { + get { return _CurrentScreen; } + } + #region public methods public static void InitGraphics() { @@ -235,6 +241,7 @@ namespace Vocaluxe.Menu _Screens.Add(new CScreenCredits()); _PopupScreens.Add(new CPopupScreenPlayerControl()); + _PopupScreens.Add(new CPopupScreenVolumeControl()); CLog.StopBenchmark(1, "Build Screen List"); @@ -454,6 +461,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 +526,22 @@ 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); + } + + if (!isOverPopupVolumeControl && _CurrentPopupScreen == EPopupScreens.PopupVolumeControl) + HidePopup(EPopupScreens.PopupVolumeControl); + 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); diff --git a/Vocaluxe/Menu/CMenu.cs b/Vocaluxe/Menu/CMenu.cs index 4d96610d..267e69ea 100644 --- a/Vocaluxe/Menu/CMenu.cs +++ b/Vocaluxe/Menu/CMenu.cs @@ -1078,6 +1078,10 @@ namespace Vocaluxe.Menu public abstract bool UpdateGame(); + public virtual void ApplyVolume() + { + } + public virtual void OnShow() { ResumeBG(); diff --git a/Vocaluxe/Screens/CPopupScreenVolumeControl.cs b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs new file mode 100644 index 00000000..95885e83 --- /dev/null +++ b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs @@ -0,0 +1,140 @@ +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.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(); + } + } +} diff --git a/Vocaluxe/Screens/CScreenOptionsSound.cs b/Vocaluxe/Screens/CScreenOptionsSound.cs index 2e8207f7..929c371b 100644 --- a/Vocaluxe/Screens/CScreenOptionsSound.cs +++ b/Vocaluxe/Screens/CScreenOptionsSound.cs @@ -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((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) @@ -130,6 +137,10 @@ namespace Vocaluxe.Screens } 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; diff --git a/Vocaluxe/Screens/CScreenSing.cs b/Vocaluxe/Screens/CScreenSing.cs index 231ef2e8..5b3b96c7 100644 --- a/Vocaluxe/Screens/CScreenSing.cs +++ b/Vocaluxe/Screens/CScreenSing.cs @@ -236,7 +236,7 @@ namespace Vocaluxe.Screens if (CConfig.GameMusicVolume > 100) CConfig.GameMusicVolume = 100; CConfig.SaveConfig(); - CSound.SetStreamVolume(_CurrentStream, CConfig.GameMusicVolume); + ApplyVolume(); } break; @@ -248,7 +248,7 @@ namespace Vocaluxe.Screens if (CConfig.GameMusicVolume < 0) CConfig.GameMusicVolume = 0; CConfig.SaveConfig(); - CSound.SetStreamVolume(_CurrentStream, CConfig.GameMusicVolume); + ApplyVolume(); } break; } @@ -515,6 +515,11 @@ namespace Vocaluxe.Screens CloseSong(); } + public override void ApplyVolume() + { + CSound.SetStreamVolumeMax(_CurrentStream, CConfig.GameMusicVolume); + } + private void CloseSong() { CSound.FadeAndStop(_CurrentStream, 0f, 0.5f); @@ -569,7 +574,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; diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index a4008cea..3dc74033 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -317,6 +317,7 @@ namespace Vocaluxe.Screens if (CConfig.PreviewMusicVolume > 100) CConfig.PreviewMusicVolume = 100; CConfig.SaveConfig(); + ApplyVolume(); } else if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown)) { @@ -324,11 +325,16 @@ namespace Vocaluxe.Screens if (CConfig.PreviewMusicVolume < 0) CConfig.PreviewMusicVolume = 0; CConfig.SaveConfig(); + ApplyVolume(); } return true; } + public void Apply() + { + } + public override bool HandleMouse(MouseEvent MouseEvent) { base.HandleMouse(MouseEvent); @@ -590,6 +596,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)) diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index 156dd856..fde218c1 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -235,6 +235,7 @@ Form + diff --git a/output/themes/Ambient/Screens/PopupScreenVolumeControl.xml b/output/themes/Ambient/Screens/PopupScreenVolumeControl.xml new file mode 100644 index 00000000..4fd2de9f --- /dev/null +++ b/output/themes/Ambient/Screens/PopupScreenVolumeControl.xml @@ -0,0 +1,119 @@ + + + + 1 + + + Menu + + 1065 + 672 + -2,00 + 225 + 48 + + + StaticColor + + + + + + + 1067 + 680 + + -2,00 + + 32 + + 80 + + + StaticColor + + + TextSColor + + Left + + Center + + + + Outline + + TR_SCREENPVOLUMECONTROL_VOLUME + + + + + + + Invisible + + Minus + + Plus + + Invisible + + Minus + + Plus + + Invisible + + 1090 + 680 + -2,00 + 200 + 50 + + 1195 + 682 + -2,00 + 30 + 30 + + 1240 + 682 + -2,00 + 30 + 30 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 32,00 + + 500,00 + + Outline + + Bold + -15,0 + -8,0 + + 1 + + + From 556e8d541b0b068c752cf38d0e3845759c7edacc Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 21:49:31 +0100 Subject: [PATCH 03/10] Remove unneeded skin. --- Output/Themes/Ambient/Skin Blue.xml | 1 - Output/Themes/Ambient/Skin Green.xml | 3 +-- Output/Themes/Ambient/Skin Red.xml | 3 +-- Output/Themes/Ambient/Skin Yellow.xml | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index 34b3ffb5..f4549af2 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -335,7 +335,6 @@ Sing.png Minus.png Plus.png - VolumeBG.png [Blue]BG_Video.mp4 diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index c3e20565..994705cd 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -328,8 +328,7 @@ Save.png Sing.png Minus.png - Plus.png - VolumeBG.png + Plus.png [Green]BG_Video.mp4 diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index 04aaa93a..b669bfd0 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -328,8 +328,7 @@ Save.png Sing.png Minus.png - Plus.png - VolumeBG.png + Plus.png [Red]BG_Video.mp4 diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index fdc4b49e..6e3d562e 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -329,7 +329,6 @@ Sing.png Minus.png Plus.png - VolumeBG.png [Yellow]BG_Video.mp4 From a7f4c1ab1036d9a57327a9e1de4d8df1d209ac7b Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 22:33:50 +0100 Subject: [PATCH 04/10] Remove unneeded function. --- Vocaluxe/Screens/CScreenSong.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index 3dc74033..ae441db9 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -331,10 +331,6 @@ namespace Vocaluxe.Screens return true; } - public void Apply() - { - } - public override bool HandleMouse(MouseEvent MouseEvent) { base.HandleMouse(MouseEvent); From 3b759b608e5f6f8616ea639fe1a4d5f2e1940b1f Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 22:42:37 +0100 Subject: [PATCH 05/10] Fix for sound-options. --- Vocaluxe/Screens/CScreenOptionsSound.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Vocaluxe/Screens/CScreenOptionsSound.cs b/Vocaluxe/Screens/CScreenOptionsSound.cs index 929c371b..519fddfc 100644 --- a/Vocaluxe/Screens/CScreenOptionsSound.cs +++ b/Vocaluxe/Screens/CScreenOptionsSound.cs @@ -120,6 +120,10 @@ namespace Vocaluxe.Screens public override bool UpdateGame() { + if (_BackgroundMusicVolume != CConfig.BackgroundMusicVolume) + { + SelectSlides[htSelectSlides(SelectSlideBackgroundMusicVolume)].Selection = CConfig.BackgroundMusicVolume / 5; + } return true; } @@ -134,6 +138,9 @@ 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() { From 4eb22ddfbe794e75b6ae9fa4a0634d22b590dddd Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 22:49:19 +0100 Subject: [PATCH 06/10] Some fixes for volume-settings. --- Vocaluxe/Base/CConfig.cs | 6 +++--- Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 7b51dfed..0ea13e8c 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -228,11 +228,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 = 20; - public static int GameMusicVolume = 100; + public static int PreviewMusicVolume = 50; + public static int GameMusicVolume = 80; // Game public static List SongFolder = new List(); diff --git a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs index 3cc61d70..7f29d380 100644 --- a/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs +++ b/Vocaluxe/Menu/SongMenu/CSongMenuFramework.cs @@ -646,7 +646,7 @@ namespace Vocaluxe.Menu.SongMenu CSound.SetPosition(_stream, startposition); CSound.Play(_stream); - CSound.Fade(_stream, CConfig.PreviewMusicVolume, 3f); + CSound.Fade(_stream, 100f, 3f); _streams.Add(_stream); _actsongstream = _stream; From ace002a7b1527dfeac34631a17096459880fb9aa Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 23:09:22 +0100 Subject: [PATCH 07/10] Show popup for 1.5 sec if volume changed by keyboard. --- Vocaluxe/Menu/CGraphics.cs | 42 +++++++++++++++++++++++++++++++++ Vocaluxe/Screens/CScreenSong.cs | 2 ++ 2 files changed, 44 insertions(+) diff --git a/Vocaluxe/Menu/CGraphics.cs b/Vocaluxe/Menu/CGraphics.cs index d921cace..76ef133d 100644 --- a/Vocaluxe/Menu/CGraphics.cs +++ b/Vocaluxe/Menu/CGraphics.cs @@ -201,6 +201,11 @@ namespace Vocaluxe.Menu private static List _Screens = new List(); private static List _PopupScreens = new List(); + private static float _SavedBackgroundMusicVolume; + private static float _SavedPreviewMusicVolume; + private static float _SavedGameMusicVolume; + private static Stopwatch _VolumePopupTimer; + public static float GlobalAlpha { get { return _GlobalAlpha; } @@ -249,6 +254,7 @@ namespace Vocaluxe.Menu _NextScreen = EScreens.ScreenNull; _CurrentPopupScreen = EPopupScreens.NoPopup; _FadingTimer = new Stopwatch(); + _VolumePopupTimer = new Stopwatch(); _GlobalAlpha = 1f; _ZOffset = 0f; @@ -324,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(); } @@ -530,11 +540,17 @@ namespace Vocaluxe.Menu 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) @@ -593,6 +609,32 @@ 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 (_CurrentPopupScreen != EPopupScreens.NoPopup) _PopupScreens[(int)_CurrentPopupScreen].UpdateGame(); return _Screens[(int)_CurrentScreen].UpdateGame(); diff --git a/Vocaluxe/Screens/CScreenSong.cs b/Vocaluxe/Screens/CScreenSong.cs index ae441db9..ed1c775b 100644 --- a/Vocaluxe/Screens/CScreenSong.cs +++ b/Vocaluxe/Screens/CScreenSong.cs @@ -106,6 +106,8 @@ namespace Vocaluxe.Screens DragAndDropCover = new CStatic(); Playlists[htPlaylists(Playlist)].Init(); + + ApplyVolume(); } public override bool HandleInput(KeyEvent KeyEvent) From 5b4133d5f3df2959447628409a4500bb14d649a4 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 23:21:17 +0100 Subject: [PATCH 08/10] Don't show volume-popup if cursor is hidden. --- Vocaluxe/Menu/CGraphics.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Vocaluxe/Menu/CGraphics.cs b/Vocaluxe/Menu/CGraphics.cs index 76ef133d..4aa62249 100644 --- a/Vocaluxe/Menu/CGraphics.cs +++ b/Vocaluxe/Menu/CGraphics.cs @@ -635,6 +635,8 @@ namespace Vocaluxe.Menu _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(); From 457b21c7dfc9f5f8d602be59285f9b0f125451ac Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 23:32:15 +0100 Subject: [PATCH 09/10] Added missing files. --- Output/Themes/Ambient/Minus.png | Bin 0 -> 3116 bytes Output/Themes/Ambient/Plus.png | Bin 0 -> 6333 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Output/Themes/Ambient/Minus.png create mode 100644 Output/Themes/Ambient/Plus.png diff --git a/Output/Themes/Ambient/Minus.png b/Output/Themes/Ambient/Minus.png new file mode 100644 index 0000000000000000000000000000000000000000..9bdede57bfffd4f9a472430bd7976dd102b6f5cb GIT binary patch literal 3116 zcmeHJ={pn(A01?w8lgc(Xv}1qMAzPsjAbw*#x_*8?wBF6WEpEz$}+NN7nixrr0mPQ zRQ4r8Wtog*&vG%!z9f0w_b<2~-w*fqJm+_w^ZW37&T~GUSPQ(d;Bm?0002M`hs9VO zarfU4;5phk(N3iR0QZ4~DZ%haMm~zfU@#pW9p~iE6%`hdUC6Vuv!bG+Y3XSM0)fS1 zsi~>e*49!el+Dde5C{|>A8%@A+Sk{oprBA%TI%WH$>DIMq@;55avdBT#>U39wY3`> z8^XfEejfZh`v33zo525P0#5*P%@_lq@=9Zm1keY2(;om3 zBK{4oV)S$Oqa!~BXJ*Jh2I2>6Tww>lRRaJ7ig6e{Lh$H{yaM8&Qg z9%f!q#XnAwqDa57nTH6Jw8uV$@k1I}UO0DPj<)o$=$VijE5 z_FqXzeHB4^;*qp%fHac(7$H4Z9(YI;d%qrobuTx7rG`kZ`ar{5T;1U&X^D_CB$N9w zwcaKlg=MR=mI8E3blIA`CX{=igdcvp-tO5wDne8T*MTUe`LoL4j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LB5o$3Q!fuWR-K{to?U4 z#Xp#3(0P<*xMSHlSx$u0x^C>7E(zi6zP*NVqfX3z?_&L^46J3C5uoauJ|*}d2++ME2trW;+`lXVat7``5n zcJ4MJJEzKOz({6;b;W8Kxjd!x#Fm>lFPcDi8fgyB_Dy<@-NRDT>i3ljNeR382#$GY-Bb>akukWP?8$>hXD-r$Y^1rvNQ(!BqXkGlD(>^>zSea8@l;nbkY zi^qJ^bDoTQRG)2gF&%^x(KVb}y=B@0ju48uCmo=bcgP0ZDrtl-c~Tw~LZ?d{GVr7Q;!*DgSpka-FYTFt=tQm|$3FFm zCN&^@3%9jNaltrvb)xHSZjGF_UifuXV*ofqJf>X#_ecK)h(CK% literal 0 HcmV?d00001 diff --git a/Output/Themes/Ambient/Plus.png b/Output/Themes/Ambient/Plus.png new file mode 100644 index 0000000000000000000000000000000000000000..5b813c530797fc8bb14b5224a76721f1d97e19b2 GIT binary patch literal 6333 zcmeHL=Q|q!_qF#HLD5Fh*sFHXSd|#DSFGAKYOkV7)g~misupQg5w&VJYSgTkP>L8e ztF@`7g#P;e7rzhheV%jgbMA-x+;cvjbaR9uE7LV53JMBVI85L2-yHrg7^wgC(iE3E z3JR)Aa}#TWfAr~-r~3N(0|Nu1Vxrh8tf!af#>NH!0LU-Mx3;#PnVC^iQfg^w2@elH zJw0V%VadwMGBGt7A0L;NmaeO-3-Axv-Q5)w6fApQ=H%o=BoZ|>HM@JdfNp*D{x5MiHq@s`qZNYvBaFc?hcF5XcDMh6^39!U z-+xQ`aJZ=fJ&}c;TUmmAcLPsB!J`h>*RhUX*mGviE7btlLiM3Ko>ezH|NeDdJ{iqh zU6=?D)R+bcn6&-ynNU|hSPHnxe!RXyx^Z`7iu3NTPWMVHjbTP03%4H4{UsI)@`vZhMzl72fz)DjGys8JX|+D^(o zpX7e-m-mVL+@HmZ^GWa-aE9|Rt|jE8-H3V9+j{)$QHDP6Qi_r?R(iG8Zt1?SVXP2mZ}i#6p5qYIp9Q6syADp`*t zs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w3tTQuF_a0xN7(vLO zuK3_$J?74}C7nytBc9SSGnTf}x?yCBTxcjLC%qc~ZD()9y)j)ln&zr4p9jEm5{}Vt zpyc=e!W7&h2SLM1d6FM&5TWBEORdp`EqLQvI~e#HJaVz62-;@zPY9KyC7?kz^veDt z_wlm6^)`^=(S+MyyhLG09^RLrT%WqvaMjMyj)UvRuqURYuPA6u=BIc1F|752)pwCj z)3zR_lP6ja6pG_A@gSLwm8*fv*_}2;e7ra#hN+sUG;6}bz~AijrEuk2^YTt#Q{}MNIdHn)4Q(!zt)x_bD@yVC(mU$@uefk?1TEtk`|z8;w|V~F zyQBKHzi92o58X*i|6}Wr?}b-H-zOUSo-;Es6WH5SD?6|6+cc^1rPniJnm}!8Y1d-R zQ?ngyevPcj3!QeDY6EFP@}d^^A4!`WO_c wDjJVgs@eMzo6jKHD$nqYpYTUP0aw((cl!oM`O8`Va#aer0YV?Ad+*8r0WNL0r~m)} literal 0 HcmV?d00001 From fca537eafa805d630dea76ae42d6be8ba7971941 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 23:43:32 +0100 Subject: [PATCH 10/10] Scroll music-volume with mouse-wheel when popup is active. --- Vocaluxe/Screens/CPopupScreenVolumeControl.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Vocaluxe/Screens/CPopupScreenVolumeControl.cs b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs index 95885e83..a3c0f4aa 100644 --- a/Vocaluxe/Screens/CPopupScreenVolumeControl.cs +++ b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs @@ -76,6 +76,24 @@ namespace Vocaluxe.Screens 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);