using System; using System.Collections.Generic; using System.Linq; using UnityEngine; namespace KKAPI.Maker.UI { /// /// Adds a toggle to the bottom of the coordinate/clothes card load window in character maker. /// Use to allow user to not load data related to your mod. /// Use with /// [Obsolete("Not implemented")] public class MakerCoordinateLoadToggle : BaseEditableGuiEntry { private static readonly List Toggles = new List(); /// /// Create a new coordinate load toggle. Create and register it in /// with . /// /// Text displayed next to the checkbox /// Initial value of the toggle public MakerCoordinateLoadToggle(string text, bool initialValue = true) : base(null, initialValue, null) { Text = text; } /// /// Text displayed next to the toggle /// public string Text { get; } /// /// Check if any of the custom toggles are checked /// public static bool AnyEnabled => Toggles.Any(x => x.Value); internal static void CreateCustomToggles() { } /// protected override GameObject OnCreateControl(Transform loadBoxTransform) { KoikatuAPI.Logger.LogWarning("MakerCoordinateLoadToggles are not implemented yet"); Value = true; return null; } /// protected internal override void Initialize() { } internal static MakerCoordinateLoadToggle AddLoadToggle(MakerCoordinateLoadToggle toggle) { if (toggle == null) throw new ArgumentNullException(nameof(toggle)); toggle.ThrowIfDisposed(nameof(toggle)); Toggles.Add(toggle); return toggle; } internal static void Reset() { foreach (var toggle in Toggles) toggle.Dispose(); Toggles.Clear(); } internal static void Setup() { } } }