From 832f39268246c7d93e30a597f2e3445baf36f491 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidoS@users.noreply.github.com> Date: Mon, 2 Sep 2024 00:45:07 -0500 Subject: [PATCH] WhereAmIPointing: fixed dimming of ray when no menu is open --- WhereAmIPointing/Main.cs | 5 +++-- WhereAmIPointing/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WhereAmIPointing/Main.cs b/WhereAmIPointing/Main.cs index 4771375..24529b4 100644 --- a/WhereAmIPointing/Main.cs +++ b/WhereAmIPointing/Main.cs @@ -40,7 +40,7 @@ public class WhereAmIPointingMod : MelonMod #region Patches - private static class ControllerRay_Patches + private static class ControllerRay_Patches { private const float ORIGINAL_ALPHA = 0.502f; private const float INTERACTION_ALPHA = 0.1f; @@ -70,7 +70,8 @@ public class WhereAmIPointingMod : MelonMod Material material = instance.lineRenderer.material; Color color = material.color; - float targetAlpha = instance.uiActive ? ORIGINAL_ALPHA : INTERACTION_ALPHA; + bool anyMenuOpen = ViewManager.Instance.IsAnyMenuOpen; + float targetAlpha = (!anyMenuOpen || instance.uiActive) ? ORIGINAL_ALPHA : INTERACTION_ALPHA; if (!(Math.Abs(color.a - targetAlpha) > float.Epsilon)) return; diff --git a/WhereAmIPointing/Properties/AssemblyInfo.cs b/WhereAmIPointing/Properties/AssemblyInfo.cs index 97e5356..48c359f 100644 --- a/WhereAmIPointing/Properties/AssemblyInfo.cs +++ b/WhereAmIPointing/Properties/AssemblyInfo.cs @@ -27,6 +27,6 @@ using System.Reflection; namespace NAK.WhereAmIPointing.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.0"; + public const string Version = "1.0.1"; public const string Author = "NotAKidoS"; } \ No newline at end of file