@@ -20,11 +20,11 @@ namespace UnityExplorer.Hooks
2020{
2121 public class HookCreator : ICellPoolDataSource < AddHookCell >
2222 {
23- public int ItemCount => filteredEligableMethods . Count ;
23+ public int ItemCount => filteredEligibleMethods . Count ;
2424
25- static readonly List < MethodInfo > currentAddEligableMethods = new ( ) ;
26- static readonly List < MethodInfo > filteredEligableMethods = new ( ) ;
27- static readonly List < string > currentEligableNamesForFiltering = new ( ) ;
25+ static readonly List < MethodInfo > currentAddEligibleMethods = new ( ) ;
26+ static readonly List < MethodInfo > filteredEligibleMethods = new ( ) ;
27+ static readonly List < string > currentEligibleNamesForFiltering = new ( ) ;
2828
2929 // hook editor
3030 static readonly LexerBuilder Lexer = new ( ) ;
@@ -74,16 +74,16 @@ void ShowMethodsForType(Type type)
7474
7575 AddHooksMethodFilterInput . Text = string . Empty ;
7676
77- filteredEligableMethods . Clear ( ) ;
78- currentAddEligableMethods . Clear ( ) ;
79- currentEligableNamesForFiltering . Clear ( ) ;
77+ filteredEligibleMethods . Clear ( ) ;
78+ currentAddEligibleMethods . Clear ( ) ;
79+ currentEligibleNamesForFiltering . Clear ( ) ;
8080 foreach ( MethodInfo method in type . GetMethods ( ReflectionUtility . FLAGS ) )
8181 {
8282 if ( UERuntimeHelper . IsBlacklisted ( method ) )
8383 continue ;
84- currentAddEligableMethods . Add ( method ) ;
85- currentEligableNamesForFiltering . Add ( SignatureHighlighter . RemoveHighlighting ( SignatureHighlighter . ParseMethod ( method ) ) ) ;
86- filteredEligableMethods . Add ( method ) ;
84+ currentAddEligibleMethods . Add ( method ) ;
85+ currentEligibleNamesForFiltering . Add ( SignatureHighlighter . RemoveHighlighting ( SignatureHighlighter . ParseMethod ( method ) ) ) ;
86+ filteredEligibleMethods . Add ( method ) ;
8787 }
8888
8989 AddHooksScrollPool . Refresh ( true , true ) ;
@@ -112,10 +112,10 @@ public void SetAddHooksLabelType(string typeText)
112112
113113 public static void AddHookClicked ( int index )
114114 {
115- if ( index >= filteredEligableMethods . Count )
115+ if ( index >= filteredEligibleMethods . Count )
116116 return ;
117117
118- MethodInfo method = filteredEligableMethods [ index ] ;
118+ MethodInfo method = filteredEligibleMethods [ index ] ;
119119 if ( ! method . IsGenericMethod && HookList . hookedSignatures . Contains ( method . FullDescription ( ) ) )
120120 {
121121 ExplorerCore . Log ( $ "Non-generic methods can only be hooked once.") ;
@@ -129,7 +129,7 @@ public static void AddHookClicked(int index)
129129 return ;
130130 }
131131
132- AddHook ( filteredEligableMethods [ index ] ) ;
132+ AddHook ( filteredEligibleMethods [ index ] ) ;
133133 }
134134
135135 static void OnGenericMethodChosen ( Type [ ] arguments )
@@ -168,38 +168,38 @@ public static void AddHook(MethodInfo method)
168168
169169 public void OnAddHookFilterInputChanged ( string input )
170170 {
171- filteredEligableMethods . Clear ( ) ;
171+ filteredEligibleMethods . Clear ( ) ;
172172
173173 if ( string . IsNullOrEmpty ( input ) )
174- filteredEligableMethods . AddRange ( currentAddEligableMethods ) ;
174+ filteredEligibleMethods . AddRange ( currentAddEligibleMethods ) ;
175175 else
176176 {
177- for ( int i = 0 ; i < currentAddEligableMethods . Count ; i ++ )
177+ for ( int i = 0 ; i < currentAddEligibleMethods . Count ; i ++ )
178178 {
179- MethodInfo eligable = currentAddEligableMethods [ i ] ;
180- string sig = currentEligableNamesForFiltering [ i ] ;
179+ MethodInfo eligible = currentAddEligibleMethods [ i ] ;
180+ string sig = currentEligibleNamesForFiltering [ i ] ;
181181 if ( sig . ContainsIgnoreCase ( input ) )
182- filteredEligableMethods . Add ( eligable ) ;
182+ filteredEligibleMethods . Add ( eligible ) ;
183183 }
184184 }
185185
186186 AddHooksScrollPool . Refresh ( true , true ) ;
187187 }
188188
189- // Set eligable method cell
189+ // Set eligible method cell
190190
191191 public void OnCellBorrowed ( AddHookCell cell ) { }
192192
193193 public void SetCell ( AddHookCell cell , int index )
194194 {
195- if ( index >= filteredEligableMethods . Count )
195+ if ( index >= filteredEligibleMethods . Count )
196196 {
197197 cell . Disable ( ) ;
198198 return ;
199199 }
200200
201201 cell . CurrentDisplayedIndex = index ;
202- MethodInfo method = filteredEligableMethods [ index ] ;
202+ MethodInfo method = filteredEligibleMethods [ index ] ;
203203
204204 cell . MethodNameLabel . text = SignatureHighlighter . ParseMethod ( method ) ;
205205 }
0 commit comments