12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- 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<string> options;
- public DropdownData(int currentValue, List<string> 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;
- }
- }
- }
|