@@ -41,10 +41,10 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
4141 }
4242
4343 public static Rect AllocateAndDrawSearchboxRect ( Rect r ) {
44- const float offset = ModsConfig . Search . buttonSize + 2 * ModsConfig . Search . buttonsInset ;
44+ const float offset = ModsConfigUI . Search . buttonSize + 2 * ModsConfigUI . Search . buttonsInset ;
4545
46- ModsConfig . Search . DoSearchBlock (
47- new Rect ( r . x + ModsConfig . Search . buttonsInset , r . y + ModsConfig . Search . buttonsInset , r . width - 2 * ModsConfig . Search . buttonsInset , ModsConfig . Search . buttonSize ) ,
46+ ModsConfigUI . Search . DoSearchBlock (
47+ new Rect ( r . x + ModsConfigUI . Search . buttonsInset , r . y + ModsConfigUI . Search . buttonsInset , r . width - 2 * ModsConfigUI . Search . buttonsInset , ModsConfigUI . Search . buttonSize ) ,
4848 LanguageKeys . keyed . ModSwitch_Search_Watermark . Translate ( ) ) ;
4949
5050 return new Rect ( r . x , r . y + offset , r . width , r . height - offset ) ;
@@ -72,7 +72,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
7272 Util . Warning ( "Could not find Page_ModsConfig.PreOpen transpiler anchor - not injecting code." ) ;
7373 return instructions ;
7474 }
75- instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfig . Helpers ) , nameof ( ModsConfig . Helpers . ForceSteamWorkshopRequery ) ) ;
75+ instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfigUI . Helpers ) , nameof ( ModsConfigUI . Helpers . ForceSteamWorkshopRequery ) ) ;
7676 return instructions ;
7777 }
7878
@@ -84,8 +84,8 @@ public class Page_ModsConfig_DoModRow {
8484 [ HarmonyPatch ( typeof ( Page_ModsConfig ) , "DoModRow" , new Type [ ] { typeof ( Listing_Standard ) , typeof ( ModMetaData ) , typeof ( int ) , typeof ( int ) } ) ]
8585 public class SupressNonMatchingFilteredRows {
8686 public static bool Prefix ( ModMetaData mod ) {
87- if ( ModsConfig . Search . searchTerm != String . Empty )
88- return mod . Name . IndexOf ( ModsConfig . Search . searchTerm , StringComparison . CurrentCultureIgnoreCase ) != - 1 ;
87+ if ( ModsConfigUI . Search . searchTerm != String . Empty )
88+ return mod . Name . IndexOf ( ModsConfigUI . Search . searchTerm , StringComparison . CurrentCultureIgnoreCase ) != - 1 ;
8989 return true ;
9090 }
9191 }
@@ -97,7 +97,7 @@ public class InjectRightClickMenu {
9797 public static IEnumerable < CodeInstruction > Transpiler ( IEnumerable < CodeInstruction > instructions , ILGenerator ilGen ) {
9898 var instr = new List < CodeInstruction > ( instructions ) ;
9999
100- int idxCheckboxLabeledSelectable = instr . FirstIndexOf ( ci => ci . opcode == OpCodes . Call && ci . operand == ModsConfig . miCheckboxLabeledSelectable ) ;
100+ int idxCheckboxLabeledSelectable = instr . FirstIndexOf ( ci => ci . opcode == OpCodes . Call && ci . operand == ModsConfigUI . miCheckboxLabeledSelectable ) ;
101101 if ( idxCheckboxLabeledSelectable == - 1 ) {
102102 Util . Warning ( "Could not find anchor for ModRow transpiler - not modifying code" ) ;
103103 return instr ;
@@ -143,7 +143,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
143143 // insert <code>else { GUI.contentColor = color; }</code>
144144 instr . InsertRange ( idxBlockEnd , new [ ] {
145145 new CodeInstruction ( OpCodes . Ldloc , localColor ) { labels = new List < Label > { lblNoClick } } ,
146- new CodeInstruction ( OpCodes . Call , ModsConfig . miGuiSetContentColor ) ,
146+ new CodeInstruction ( OpCodes . Call , ModsConfigUI . miGuiSetContentColor ) ,
147147 } ) ;
148148
149149 // setup <code>else { ... }</code> branch label
@@ -152,12 +152,12 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
152152 // insert <code>GUI.contentColor = color; if (Input.GetMouseButtonUp(1)) { DoContextMenu(mod); }</code>
153153 instr . InsertRange ( idxCheckboxLabeledSelectable + 2 , new [ ] {
154154 new CodeInstruction ( OpCodes . Ldloc , localColor ) ,
155- new CodeInstruction ( OpCodes . Call , ModsConfig . miGuiSetContentColor ) ,
155+ new CodeInstruction ( OpCodes . Call , ModsConfigUI . miGuiSetContentColor ) ,
156156 new CodeInstruction ( OpCodes . Ldc_I4_1 ) ,
157157 new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( Input ) , nameof ( Input . GetMouseButtonUp ) ) ) ,
158158 new CodeInstruction ( OpCodes . Brfalse , lblExistingClickCode ) ,
159159 new CodeInstruction ( OpCodes . Ldarg_2 ) ,
160- new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfig ) , nameof ( ModsConfig . DoContextMenu ) ) ) ,
160+ new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfigUI ) , nameof ( ModsConfigUI . DoContextMenu ) ) ) ,
161161 new CodeInstruction ( OpCodes . Br , lblBlockEnd ) ,
162162 } ) ;
163163
@@ -167,7 +167,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
167167 // insert <code>Color color = Page_ModsConfig_DoModRow.SetGUIColorMod(mod);</code>
168168 instr . InsertRange ( idxCheckboxLabeledSelectable - 4 , new [ ] {
169169 new CodeInstruction ( OpCodes . Ldarg_2 ) ,
170- new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfig . Helpers ) , nameof ( ModsConfig . Helpers . SetGUIColorMod ) ) ) ,
170+ new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfigUI . Helpers ) , nameof ( ModsConfigUI . Helpers . SetGUIColorMod ) ) ) ,
171171 new CodeInstruction ( OpCodes . Stloc , localColor ) ,
172172 } ) ;
173173
@@ -194,10 +194,10 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
194194 *
195195 * with
196196 *
197- * ModsConfig .DrawContentSource(rect1, rowCAnonStorey428.mod.Source, clickAction, mod);
197+ * ModsConfigUI .DrawContentSource(rect1, rowCAnonStorey428.mod.Source, clickAction, mod);
198198 *
199199 */
200- instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfig ) , nameof ( ModsConfig . DrawContentSource ) ) ;
200+ instructions [ idxAnchor ] . operand = AccessTools . Method ( typeof ( ModsConfigUI ) , nameof ( ModsConfigUI . DrawContentSource ) ) ;
201201 instructions . Insert ( idxAnchor , new CodeInstruction ( OpCodes . Ldarg_2 ) ) ;
202202
203203 return instructions ;
@@ -233,7 +233,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
233233 *
234234 * if (workshopItem == null)
235235 * {
236- * ModsConfig .UpdateSteamTS(pfid, num2);
236+ * ModsConfigUI .UpdateSteamTS(pfid, num2);
237237 * workshopItem = new WorkshopItem_Mod();
238238 * }
239239 *
@@ -244,7 +244,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
244244 new [ ] {
245245 new CodeInstruction ( OpCodes . Ldarg_0 ) ,
246246 new CodeInstruction ( OpCodes . Ldloc_2 ) ,
247- new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfig . Helpers ) , nameof ( ModsConfig . Helpers . UpdateSteamTS ) ) ) ,
247+ new CodeInstruction ( OpCodes . Call , AccessTools . Method ( typeof ( ModsConfigUI . Helpers ) , nameof ( ModsConfigUI . Helpers . UpdateSteamTS ) ) ) ,
248248 }
249249 ) ;
250250
0 commit comments