Skip to content

Commit

Permalink
Cursor flicker hotfix
Browse files Browse the repository at this point in the history
The cursor's TexturedBox occasionally flickers when Visible == false. Once every 10-30s it'll send a random billboard to be drawn, only to stop on the next frame. I've not properly root-caused or fixed the issue, but using the parent node's visibility property seems to fix it.
  • Loading branch information
ZachHembree committed Jul 17, 2024
1 parent 24453bc commit 0c03a09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public sealed partial class RichHudMaster : ModBase
{
public const long modID = 1965654081, queueID = 1314086443;
public const int apiVID = 11, minApiVID = 7;
public static readonly Vector4I versionID = new Vector4I(1, 3, 0, 0); // Major, Minor, Rev, Hotfix
public static readonly Vector4I versionID = new Vector4I(1, 3, 0, 1); // Major, Minor, Rev, Hotfix

/// <summary>
/// Read-only list of currently registered clients
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Sandbox.ModAPI;
using Sandbox.ModAPI;
using System;
using System.Collections.Generic;
using VRage;
Expand Down Expand Up @@ -330,7 +330,6 @@ protected override void Layout()
Z = (float)Math.Round(Vector3D.DistanceSquared(worldPos, cursorLine.From), 6)
};

cursorBox.Visible = DrawCursor && !MyAPIGateway.Gui.IsCursorVisible;
cursorBox.Offset = new Vector2(CursorPos.X, CursorPos.Y);
UpdateToolTip(boundTooltips, tooltipScale);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ private void UpdateCache()
}

_cursor.UpdateCursorPos(screenPos, ref PixelToWorldRef[0]);
_cursor.Visible = _cursor.DrawCursor && !MyAPIGateway.Gui.IsCursorVisible;
}

/// <summary>
Expand Down

0 comments on commit 0c03a09

Please sign in to comment.