static void StartChara(CustomCharaWindow __instance) { Helpers.UI.ModifyGameMenu(__instance, "chara/female", () => { Logger.Log("Chara Action running!!"); __instance.UpdateWindow(true, 1, true); }); }
public static bool Prefix_CvsO_CharaSave_UpdateCharasList(ref CustomCharaWindow ___charaLoadWin) { CustomBase customBase = CustomBase.Instance; ___charaLoadWin.UpdateWindow(customBase.modeNew, customBase.modeSex, false); return(false); }
public static void CustomCharaWindow_Sort_ApplyScroll(CustomCharaWindow __instance, float __state) { if (__state == 1f || !KKAPI.Maker.MakerAPI.InsideAndLoaded) { return; } var scrollObj = __instance.transform.Find("Scroll View/Scrollbar Vertical"); var scrollbar = scrollObj.GetComponent <Scrollbar>(); AI_MakerAdditions.instance.StartCoroutine(Tools.ApplyScroller(scrollbar, __state)); }
public static void CustomCharaWindow_Sort_ApplyScroll(CustomCharaWindow __instance, float __state) { if (__state == 1f) { return; } Transform scrollObj = __instance.transform.Find("Scroll View/Scrollbar Vertical"); Scrollbar scrollbar = scrollObj.GetComponent <Scrollbar>(); MakerAdditions.instance.StartCoroutine(Tools.ApplyScroller(scrollbar, __state)); }
private static void InitFusion(CvsO_Fusion __instance, Button ___btnFusion, CustomCharaWindow ___charaLoadWinA, CustomCharaWindow ___charaLoadWinB) { _charaFusion = __instance; _charaFusionVisible = __instance.GetComponentsInParent <CanvasGroup>(true); // Fix fusion button not working when cards from different folers are used ___btnFusion.onClick.RemoveAllListeners(); ___btnFusion.onClick.AddListener(() => { var info = ___charaLoadWinA.GetSelectInfo(); var info2 = ___charaLoadWinB.GetSelectInfo(); __instance.FusionProc(info.info.FullPath, info2.info.FullPath); Traverse.Create(__instance).Field("isFusion").SetValue(true); }); }
public static void Postfix_CvsO_CharaLoad_Start(CvsO_CharaLoad __instance, ref CustomCharaWindow ___charaLoadWin) { Action <CustomCharaFileInfo, int> act = ___charaLoadWin.onClick03; ___charaLoadWin.onClick03 = (info, flags) => { act(info, flags); CustomBase customBase = CustomBase.Instance; ChaControl chaCtrl = customBase.chaCtrl; if (0 != (flags & 16) && customBase.modeNew) { ChaFileControl dummy = new ChaFileControl(); if (dummy.LoadCharaFile(info.FullPath, chaCtrl.sex, true, true)) { chaCtrl.fileGameInfo.Copy(dummy.gameinfo); } } }; }
static bool PrefixChara(CustomCharaWindow __instance, bool modeNew, int sex, bool save) { Type t = __instance.GetType(); FieldInfo info = t.GetField("lstChara", BindingFlags.Instance | BindingFlags.NonPublic); List <CustomCharaFileInfo> list = new List <CustomCharaFileInfo>(); CharaFolderUI plugin = __instance.gameObject.GetComponent <CharaFolderUI>(); string path = plugin.currentDir; int num = 0; Type atype = typeof(CustomCharaFileInfoAssist); MethodInfo minfo = atype.GetMethod("AddList", BindingFlags.Static | BindingFlags.NonPublic); Logger.Log("CharaSelect :: TRYING TO INVOKE STATIC METHOD! CHARA"); byte sexb = (byte)sex; minfo.Invoke(null, new object[] { list, path, sexb, !save, true, true, false, num }); Logger.Log("CharaSelect :: Length of list is " + list.Count); info.SetValue(__instance, list); __instance.Sort(); return(false); }
public static void CustomCharaWindow_Sort_SaveScroll(CustomCharaWindow __instance, out float __state) { var scrollObj = __instance.transform.Find("Scroll View/Scrollbar Vertical"); __state = scrollObj.GetComponent <Scrollbar>().value; }
internal static void InitHookFuse(CvsO_Fusion __instance, Button ___btnFusion, CustomCharaWindow ___charaLoadWinA, CustomCharaWindow ___charaLoadWinB, ref IEnumerator __result) { __result = __result.AppendCo(() => InitFusion(__instance, ___btnFusion, ___charaLoadWinA, ___charaLoadWinB)); }
internal static void InitHookFuse(CvsO_Fusion __instance, Button ___btnFusion, CustomCharaWindow ___charaLoadWinA, CustomCharaWindow ___charaLoadWinB) { InitFusion(__instance, ___btnFusion, ___charaLoadWinA, ___charaLoadWinB); }