mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
i hate all
holy shit this fucking bug took me two hours to fix why was the solution so simple... fuck
This commit is contained in:
parent
845baee849
commit
4a5527d7de
4 changed files with 38 additions and 126 deletions
|
@ -78,13 +78,16 @@ internal class HarmonyPatches
|
|||
}
|
||||
|
||||
//hook quickmenu open/close
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(CVR_MenuManager), "ToggleQuickMenu", new Type[] { typeof(bool) })]
|
||||
private static void Postfix_CVR_MenuManager_ToggleQuickMenu(bool show)
|
||||
private static void Postfix_CVR_MenuManager_ToggleQuickMenu(bool show, ref bool ____quickMenuOpen)
|
||||
{
|
||||
if (QuickMenuHelper.Instance == null) return;
|
||||
QuickMenuHelper.Instance.UpdateWorldAnchors();
|
||||
MSP_MenuInfo.ToggleDesktopInputMethod(show);
|
||||
if (show != ____quickMenuOpen)
|
||||
{
|
||||
QuickMenuHelper.Instance.UpdateWorldAnchors();
|
||||
MSP_MenuInfo.ToggleDesktopInputMethod(show);
|
||||
}
|
||||
QuickMenuHelper.Instance.enabled = show;
|
||||
}
|
||||
|
||||
|
@ -97,13 +100,16 @@ internal class HarmonyPatches
|
|||
}
|
||||
|
||||
//hook menu open/close
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(ViewManager), "UiStateToggle", new Type[] { typeof(bool) })]
|
||||
private static void Postfix_ViewManager_UiStateToggle(bool show)
|
||||
private static void Postfix_ViewManager_UiStateToggle(bool show, ref bool ____gameMenuOpen)
|
||||
{
|
||||
if (MainMenuHelper.Instance == null) return;
|
||||
MainMenuHelper.Instance.UpdateWorldAnchors();
|
||||
MSP_MenuInfo.ToggleDesktopInputMethod(show);
|
||||
if (show != ____gameMenuOpen)
|
||||
{
|
||||
MainMenuHelper.Instance.UpdateWorldAnchors();
|
||||
MSP_MenuInfo.ToggleDesktopInputMethod(show);
|
||||
}
|
||||
MainMenuHelper.Instance.enabled = show;
|
||||
}
|
||||
|
||||
|
@ -114,13 +120,4 @@ internal class HarmonyPatches
|
|||
{
|
||||
MSP_MenuInfo.CameraTransform = PlayerSetup.Instance.GetActiveCamera().transform;
|
||||
}
|
||||
|
||||
//only fixes Desktop QM interaction while using independent head input...
|
||||
//[HarmonyPrefix]
|
||||
//[HarmonyPatch(typeof(ControllerRay), "LateUpdate")]
|
||||
//private static void UpdateMenuPositionForInput()
|
||||
//{
|
||||
// MainMenuHelper.Instance.UpdateMenuPosition();
|
||||
// QuickMenuHelper.Instance.UpdateMenuPosition();
|
||||
//}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue