diff --git a/Vocaluxe/Base/CGraphics.cs b/Vocaluxe/Base/CGraphics.cs index b1edd7f5..b85b2a9b 100644 --- a/Vocaluxe/Base/CGraphics.cs +++ b/Vocaluxe/Base/CGraphics.cs @@ -533,9 +533,9 @@ namespace Vocaluxe.Base if (PopupVolumeControlAllowed && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON) { int Diff = 0; - if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp) || KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Add) + if ((KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Add || KeyEvent.Key == Keys.PageUp)) || (KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Add)) Diff = 5; - else if (KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown) || KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Subtract) + else if ((KeyEvent.ModSHIFT && (KeyEvent.Key == Keys.Subtract || KeyEvent.Key == Keys.PageDown)) || (KeyEvent.Sender == ESender.WiiMote && KeyEvent.Key == Keys.Subtract)) Diff = -5; else if (KeyEvent.Key == Keys.MediaNextTrack) CMain.BackgroundMusic.Next(); @@ -555,13 +555,17 @@ namespace Vocaluxe.Base { case EScreens.ScreenSong: if (CSongs.Category != -1) + { CConfig.PreviewMusicVolume += Diff; + _Screens[(int)_CurrentScreen].ApplyVolume(); + } else CConfig.BackgroundMusicVolume += Diff; break; case EScreens.ScreenSing: CConfig.GameMusicVolume += Diff; + _Screens[(int)_CurrentScreen].ApplyVolume(); break; default: diff --git a/Vocaluxe/Screens/CPopupScreenVolumeControl.cs b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs index 939555b3..25a2c4b4 100644 --- a/Vocaluxe/Screens/CPopupScreenVolumeControl.cs +++ b/Vocaluxe/Screens/CPopupScreenVolumeControl.cs @@ -63,18 +63,18 @@ namespace Vocaluxe.Screens 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); + SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel; else if (SelectSlides[htSelectSlides(SelectSlideVolume)].Selection - MouseEvent.Wheel < 0) - SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex(0); + SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = 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); + SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = 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); + SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = SelectSlides[htSelectSlides(SelectSlideVolume)].NumValues - 1; SaveConfig(); return true; } @@ -93,6 +93,7 @@ namespace Vocaluxe.Screens public override bool UpdateGame() { + UpdateSlides(); return true; } @@ -132,15 +133,15 @@ namespace Vocaluxe.Screens switch (CGraphics.CurrentScreen) { case EScreens.ScreenSong: - SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.PreviewMusicVolume / 5); + SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = (int)(CConfig.PreviewMusicVolume / 5); break; case EScreens.ScreenSing: - SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.GameMusicVolume / 5); + SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = ((int)CConfig.GameMusicVolume / 5); break; default: - SelectSlides[htSelectSlides(SelectSlideVolume)].SetSelectionByValueIndex((int)CConfig.BackgroundMusicVolume / 5); + SelectSlides[htSelectSlides(SelectSlideVolume)].Selection = ((int)CConfig.BackgroundMusicVolume / 5); break; } }