This repository was archived by the owner on Jan 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using System ;
22using System . Linq ;
33using System . Reflection ;
4- using UnhollowerRuntimeLib . XrefScans ;
4+ using UnityEngine ;
55using VRC . UI ;
66using VRC . UI . Elements ;
77
@@ -113,14 +113,11 @@ public static void CloseQuickMenu(this UIManagerImpl uiManager)
113113 {
114114 if ( _closeQuickMenuMethod == null )
115115 {
116- var closeMenuMethod = typeof ( UIManagerImpl ) . GetMethods ( )
117- . First ( method => method . Name . StartsWith ( "Method_Public_Virtual_Final_New_Void_" ) && XrefScanner . XrefScan ( method ) . Count ( ) == 2 ) ;
116+ var goSetActive = typeof ( GameObject ) . GetMethod ( nameof ( GameObject . SetActive ) ) ;
118117 _closeQuickMenuMethod = typeof ( UIManagerImpl ) . GetMethods ( )
119- . First ( method => method . Name . StartsWith ( "Method_Public_Void_Boolean_" ) && XrefUtils . CheckUsedBy ( method , closeMenuMethod . Name ) ) ;
118+ . First ( method => method . Name . StartsWith ( "Method_Public_Void_Boolean_" ) && XrefUtils . CheckUsing ( method , goSetActive ? . Name ) ) ;
120119 }
121- _closeQuickMenuMethod . Invoke ( uiManager , new object [ 1 ] { false } ) ;
122- VRCUiCursorManager . field_Private_Static_VRCUiCursorManager_0 . field_Private_Boolean_6 = false ;
123- VRCUiCursorManager . field_Private_Static_VRCUiCursorManager_0 . field_Private_Boolean_0 = true ;
120+ _closeQuickMenuMethod . Invoke ( uiManager , new object [ 1 ] { true } ) ;
124121 }
125122 }
126123}
You can’t perform that action at this time.
0 commit comments