diff --git a/Blish HUD/Controls/Tooltip.cs b/Blish HUD/Controls/Tooltip.cs index 7b7a51bcb..8ef3b9a62 100644 --- a/Blish HUD/Controls/Tooltip.cs +++ b/Blish HUD/Controls/Tooltip.cs @@ -35,7 +35,7 @@ internal static void EnableTooltips() { } private static void HandleMouseMoved(object sender, MouseEventArgs e) { - if (ActiveControl?.Tooltip != null) { + if (ActiveControl?.Tooltip != null && GameService.Input.Mouse.CursorIsVisible) { ActiveControl.Tooltip.CurrentControl = ActiveControl; UpdateTooltipPosition(ActiveControl.Tooltip); diff --git a/Blish HUD/GameServices/Input/Mouse/MouseHandler.cs b/Blish HUD/GameServices/Input/Mouse/MouseHandler.cs index aa880f127..f6b7026e4 100644 --- a/Blish HUD/GameServices/Input/Mouse/MouseHandler.cs +++ b/Blish HUD/GameServices/Input/Mouse/MouseHandler.cs @@ -43,12 +43,25 @@ private set { } } + private bool _cursorIsVisible = true; + /// /// Indicates if the hardware mouse is currently visible. When false, /// this typically indicates that the user is rotating their camera or in action /// camera mode. /// - public bool CursorIsVisible { get; private set; } + public bool CursorIsVisible { + get => _cursorIsVisible; + set { + if (_cursorIsVisible == value) return; + + if (!value) { + this.ActiveControl = null; + } + + _cursorIsVisible = value; + } + } private bool _hudFocused; private MouseEventArgs _mouseEvent;