close volume control if the mouse leaves it

This commit is contained in:
Alexander Eckart committed 2012-12-23 22:57:06 +01:00
1 parent 39898a369f
commit 30c7af290a
1 file changed
+12
+12
View File
@@ -177,6 +177,7 @@ namespace Vocaluxe.Base
private static List<IMenu> _PopupScreens = new List<IMenu>(); private static List<IMenu> _PopupScreens = new List<IMenu>();
private static Stopwatch _VolumePopupTimer; private static Stopwatch _VolumePopupTimer;
private static bool CursorOverVolumeControl = false;
public static float GlobalAlpha public static float GlobalAlpha
{ {
@@ -645,6 +646,17 @@ namespace Vocaluxe.Base
} }
} }
if (CursorOverVolumeControl && !isOverPopupVolumeControl)
{
if (_CurrentPopupScreen == EPopupScreens.PopupVolumeControl)
{
HidePopup(EPopupScreens.PopupVolumeControl);
_VolumePopupTimer.Reset();
}
}
CursorOverVolumeControl = isOverPopupVolumeControl;
bool handled = false; bool handled = false;
if (_CurrentPopupScreen != EPopupScreens.NoPopup) if (_CurrentPopupScreen != EPopupScreens.NoPopup)
handled = _PopupScreens[(int)_CurrentPopupScreen].HandleMouse(MouseEvent); handled = _PopupScreens[(int)_CurrentPopupScreen].HandleMouse(MouseEvent);