public static void ChangeSettingVisible(ChaCustom.CvsAccessory __instance)
 {
     if (HairAccessoryCustomizer.GetController(MakerAPI.GetCharacterControl()).IsHairAccessory((int)__instance.slotNo) && HairAccessoryCustomizer.ColorMatchToggle.GetSelectedValue())
     {
         Traverse.Create(AccessoriesApi.GetCvsAccessory((int)__instance.slotNo)).Field("btnInitColor").GetValue <Button>().transform.parent.gameObject.SetActive(false);
     }
 }
 public static void ChangeUseColorVisible(ChaCustom.CvsAccessory __instance)
 {
     if (AccessoriesApi.SelectedMakerAccSlot == (int)__instance.slotNo && HairAccessoryCustomizer.GetController(MakerAPI.GetCharacterControl()).IsHairAccessory((int)__instance.slotNo) && HairAccessoryCustomizer.ColorMatchToggle.GetSelectedValue())
     {
         HairAccessoryCustomizer.HideAccColors();
     }
 }
        private static IEnumerator ChangeCoordinateActions(ChaControl __instance)
        {
            var controller = HairAccessoryCustomizer.GetController(__instance);

            if (controller == null)
            {
                yield break;
            }
            if (HairAccessoryCustomizer.ReloadingChara)
            {
                yield break;
            }

            HairAccessoryCustomizer.ReloadingChara = true;
            yield return(null);

            if (MakerAPI.InsideAndLoaded)
            {
                if (controller.InitHairAccessoryInfo(AccessoriesApi.SelectedMakerAccSlot))
                {
                    //switching to a hair accessory that previously had no data. Meaning this card was made before this plugin. ColorMatch and HairGloss should be off.
                    controller.SetColorMatch(false);
                    controller.SetHairGloss(false);
                }

                HairAccessoryCustomizer.InitCurrentSlot(controller);
            }

            controller.UpdateAccessories(true);
            HairAccessoryCustomizer.ReloadingChara = false;
        }
 public static void ChangeSettingHairGlossMask(ChaControl __instance) => HairAccessoryCustomizer.GetController(__instance).UpdateAccessories(!HairAccessoryCustomizer.ReloadingChara);
 public static void ChangeAccessoryColor(ChaControl __instance, int slotNo) => HairAccessoryCustomizer.GetController(__instance).UpdateAccessory(slotNo, false);