mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
losing it
This commit is contained in:
parent
d15b446960
commit
0b035646d1
4 changed files with 24 additions and 18 deletions
|
@ -91,7 +91,6 @@ internal class HarmonyPatches
|
||||||
{
|
{
|
||||||
QuickMenuHelper helper = __instance.quickMenu.gameObject.AddComponent<QuickMenuHelper>();
|
QuickMenuHelper helper = __instance.quickMenu.gameObject.AddComponent<QuickMenuHelper>();
|
||||||
helper.handAnchor = ____leftVrAnchor.transform;
|
helper.handAnchor = ____leftVrAnchor.transform;
|
||||||
helper.enabled = false;
|
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
|
@ -106,8 +105,7 @@ internal class HarmonyPatches
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MainMenuHelper helper = __instance.gameObject.AddComponent<MainMenuHelper>();
|
__instance.gameObject.AddComponent<MainMenuHelper>();
|
||||||
helper.enabled = false;
|
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +124,7 @@ internal class HarmonyPatches
|
||||||
____quickMenuOpen = show;
|
____quickMenuOpen = show;
|
||||||
__instance.quickMenu.enabled = true;
|
__instance.quickMenu.enabled = true;
|
||||||
__instance.quickMenuAnimator.SetBool("Open", show);
|
__instance.quickMenuAnimator.SetBool("Open", show);
|
||||||
QuickMenuHelper.Instance.enabled = show;
|
QuickMenuHelper.Instance.MenuIsOpen = show;
|
||||||
QuickMenuHelper.Instance.UpdateWorldAnchors(show);
|
QuickMenuHelper.Instance.UpdateWorldAnchors(show);
|
||||||
//shouldnt run if switching menus on desktop
|
//shouldnt run if switching menus on desktop
|
||||||
if (!MetaPort.Instance.isUsingVr)
|
if (!MetaPort.Instance.isUsingVr)
|
||||||
|
@ -154,7 +152,7 @@ internal class HarmonyPatches
|
||||||
____gameMenuOpen = show;
|
____gameMenuOpen = show;
|
||||||
__instance.gameMenuView.enabled = true;
|
__instance.gameMenuView.enabled = true;
|
||||||
__instance.uiMenuAnimator.SetBool("Open", show);
|
__instance.uiMenuAnimator.SetBool("Open", show);
|
||||||
MainMenuHelper.Instance.enabled = show;
|
MainMenuHelper.Instance.MenuIsOpen = show;
|
||||||
MainMenuHelper.Instance.UpdateWorldAnchors(show);
|
MainMenuHelper.Instance.UpdateWorldAnchors(show);
|
||||||
//shouldnt run if switching menus on desktop
|
//shouldnt run if switching menus on desktop
|
||||||
if (!MetaPort.Instance.isUsingVr)
|
if (!MetaPort.Instance.isUsingVr)
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class MainMenuHelper : MonoBehaviour
|
||||||
public static MainMenuHelper Instance;
|
public static MainMenuHelper Instance;
|
||||||
public Transform worldAnchor;
|
public Transform worldAnchor;
|
||||||
public bool NeedsPositionUpdate;
|
public bool NeedsPositionUpdate;
|
||||||
|
public bool MenuIsOpen;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
|
@ -29,12 +30,15 @@ public class MainMenuHelper : MonoBehaviour
|
||||||
|
|
||||||
void LateUpdate()
|
void LateUpdate()
|
||||||
{
|
{
|
||||||
if (MSP_MenuInfo.UseIndependentHeadTurn)
|
if (MenuIsOpen)
|
||||||
MSP_MenuInfo.HandleIndependentLookInput();
|
{
|
||||||
if (MSP_MenuInfo.PlayerAnchorMenus)
|
if (MSP_MenuInfo.UseIndependentHeadTurn)
|
||||||
UpdateMenuPosition();
|
MSP_MenuInfo.HandleIndependentLookInput();
|
||||||
if (NeedsPositionUpdate)
|
if (MSP_MenuInfo.PlayerAnchorMenus)
|
||||||
UpdateMenuPosition();
|
UpdateMenuPosition();
|
||||||
|
if (NeedsPositionUpdate)
|
||||||
|
UpdateMenuPosition();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateWorldAnchors()
|
public void CreateWorldAnchors()
|
||||||
|
|
|
@ -19,6 +19,7 @@ public class QuickMenuHelper : MonoBehaviour
|
||||||
public Transform worldAnchor;
|
public Transform worldAnchor;
|
||||||
public Transform handAnchor;
|
public Transform handAnchor;
|
||||||
public bool NeedsPositionUpdate;
|
public bool NeedsPositionUpdate;
|
||||||
|
public bool MenuIsOpen;
|
||||||
|
|
||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
|
@ -27,12 +28,15 @@ public class QuickMenuHelper : MonoBehaviour
|
||||||
|
|
||||||
void LateUpdate()
|
void LateUpdate()
|
||||||
{
|
{
|
||||||
if (MSP_MenuInfo.UseIndependentHeadTurn)
|
if (MenuIsOpen)
|
||||||
MSP_MenuInfo.HandleIndependentLookInput();
|
{
|
||||||
if (MSP_MenuInfo.PlayerAnchorMenus || MetaPort.Instance.isUsingVr)
|
if (MSP_MenuInfo.UseIndependentHeadTurn)
|
||||||
UpdateMenuPosition();
|
MSP_MenuInfo.HandleIndependentLookInput();
|
||||||
if (NeedsPositionUpdate)
|
if (MSP_MenuInfo.PlayerAnchorMenus || MetaPort.Instance.isUsingVr)
|
||||||
UpdateMenuPosition();
|
UpdateMenuPosition();
|
||||||
|
if (NeedsPositionUpdate)
|
||||||
|
UpdateMenuPosition();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateWorldAnchors()
|
public void CreateWorldAnchors()
|
||||||
|
|
|
@ -25,6 +25,6 @@ using System.Reflection;
|
||||||
namespace NAK.Melons.MenuScalePatch.Properties;
|
namespace NAK.Melons.MenuScalePatch.Properties;
|
||||||
internal static class AssemblyInfoParams
|
internal static class AssemblyInfoParams
|
||||||
{
|
{
|
||||||
public const string Version = "4.2.2";
|
public const string Version = "4.2.3";
|
||||||
public const string Author = "NotAKidoS";
|
public const string Author = "NotAKidoS";
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue