From fca537eafa805d630dea76ae42d6be8ba7971941 Mon Sep 17 00:00:00 2001 From: Florian Kuepper Date: Fri, 7 Dec 2012 23:43:32 +0100 Subject: [PATCH] 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);