close volume control if the mouse leaves it
This commit is contained in:
1 parent
39898a369f
commit
30c7af290a
1 file changed
+14
-2
@@ -33,7 +33,7 @@ namespace Vocaluxe.Base
|
|||||||
public bool ShowCursor;
|
public bool ShowCursor;
|
||||||
public bool Visible = true;
|
public bool Visible = true;
|
||||||
public bool CursorVisible = true;
|
public bool CursorVisible = true;
|
||||||
|
|
||||||
public int X
|
public int X
|
||||||
{
|
{
|
||||||
get { return (int)_Cursor.rect.X; }
|
get { return (int)_Cursor.rect.X; }
|
||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -630,7 +631,7 @@ namespace Vocaluxe.Base
|
|||||||
if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
|
if (_CurrentPopupScreen == EPopupScreens.NoPopup && CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
|
||||||
ShowPopup(EPopupScreens.PopupPlayerControl);
|
ShowPopup(EPopupScreens.PopupPlayerControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl)
|
if (!isOverPopupPlayerControl && _CurrentPopupScreen == EPopupScreens.PopupPlayerControl)
|
||||||
HidePopup(EPopupScreens.PopupPlayerControl);
|
HidePopup(EPopupScreens.PopupPlayerControl);
|
||||||
|
|
||||||
@@ -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);
|
||||||
|
|||||||
Reference in new issue
Block a user