using System.Collections; using System.Collections.Generic; using UnityEngine; namespace KairoEngine.Core.ConfigOptions { [System.Serializable] public class ConfigOptionUiData { public string name; public string description; public ConfigOptionUIType uiElementType; public SliderData sliderData; public CheckboxData checkboxData; public DropdownData dropdownData; [System.Serializable] public class SliderData { public float minValue, maxValue, currentValue; public SliderData(float minValue, float maxValue, float currentValue) { this.minValue = minValue; this.maxValue = maxValue; this.currentValue = currentValue; } } [System.Serializable] public class CheckboxData { public bool currentValue; public CheckboxData(bool value) { this.currentValue = value; } } [System.Serializable] public class DropdownData { public int currentValue; public List options; public DropdownData(int currentValue, List options) { this.currentValue = currentValue; this.options = options; } } public ConfigOptionUiData(string name, string description, SliderData sliderData) { this.name = name; this.description = description; this.uiElementType = ConfigOptionUIType.Slider; this.sliderData = sliderData; } public ConfigOptionUiData(string name, string description, CheckboxData checkboxData) { this.name = name; this.description = description; this.uiElementType = ConfigOptionUIType.Checkbox; this.checkboxData = checkboxData; } public ConfigOptionUiData(string name, string description, DropdownData dropdownData) { this.name = name; this.description = description; this.uiElementType = ConfigOptionUIType.Dropdown; this.dropdownData = dropdownData; } } }