/// <summary>
        /// Sets up the visibility and values for the current slot
        /// </summary>
        internal static void InitCurrentSlot(HairAccessoryController controller, bool hairAccessory)
        {
            if (!MakerAPI.InsideAndLoaded)
            {
                return;
            }

            if (hairAccessory)
            {
                ColorMatchToggle.SetSelectedValue(controller.GetColorMatch(), false);
                HairGlossToggle.SetSelectedValue(controller.GetHairGloss(), false);
                OutlineColorPicker.SetSelectedValue(controller.GetOutlineColor(), false);
                AccessoryColorPicker.SetSelectedValue(controller.GetAccessoryColor(), false);
                HairLengthSlider.SetSelectedValue(controller.GetHairLength(), false);
#if KKS
                GlossColorPicker.SetSelectedValue(controller.GetGlossColor(), false);
#endif

                ColorMatchToggle.Control.Visible.OnNext(true);
                HairGlossToggle.Control.Visible.OnNext(true);
                OutlineColorPicker.Control.Visible.OnNext(!controller.GetColorMatch());
                AccessoryColorPicker.Control.Visible.OnNext(controller.HasAccessoryPart());
                HairLengthSlider.Control.Visible.OnNext(controller.HasLengthTransforms());
#if KKS
                GlossColorPicker.Control.Visible.OnNext(!controller.GetColorMatch());
#endif

                if (controller.GetColorMatch(AccessoriesApi.SelectedMakerAccSlot))
                {
                    HideAccColors();
                }
                else
                {
                    ShowAccColors(true);
                }
            }
            else
            {
                ColorMatchToggle.SetSelectedValue(ColorMatchDefault, false);
                HairGlossToggle.SetSelectedValue(HairGlossDefault, false);
                OutlineColorPicker.SetSelectedValue(OutlineColorDefault, false);
                AccessoryColorPicker.SetSelectedValue(AccessoryColorDefault, false);
#if KKS
                GlossColorPicker.SetSelectedValue(OutlineColorDefault, false);
#endif

                HairGlossToggle.Control.Visible.OnNext(false);
                ColorMatchToggle.Control.Visible.OnNext(false);
                OutlineColorPicker.Control.Visible.OnNext(false);
                AccessoryColorPicker.Control.Visible.OnNext(false);
                HairLengthSlider.Control.Visible.OnNext(false);
#if KKS
                GlossColorPicker.Control.Visible.OnNext(false);
#endif

                ShowAccColors(controller.ChaControl.GetAccessoryObject(AccessoriesApi.SelectedMakerAccSlot) != null);
            }
        }
Beispiel #2
0
 internal static void InitCurrentSlot(HairAccessoryController controller) => InitCurrentSlot(controller, controller.IsHairAccessory(AccessoriesApi.SelectedMakerAccSlot));