mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:17:38 +02:00
Karate Man Events have been merged also I forgot the toggle in the last update lol
This commit is contained in:
@ -102,18 +102,23 @@ namespace RhythmHeavenMania.Editor
|
||||
else if (objType.IsEnum)
|
||||
{
|
||||
List<TMP_Dropdown.OptionData> dropDownData = new List<TMP_Dropdown.OptionData>();
|
||||
for (int i = 0; i < System.Enum.GetValues(objType).Length; i++)
|
||||
var vals = Enum.GetValues(objType);
|
||||
var selected = 0;
|
||||
for (int i = 0; i < vals.Length; i++)
|
||||
{
|
||||
string name = System.Enum.GetNames(objType)[i];
|
||||
string name = Enum.GetNames(objType)[i];
|
||||
TMP_Dropdown.OptionData optionData = new TMP_Dropdown.OptionData();
|
||||
|
||||
optionData.text = name;
|
||||
|
||||
dropDownData.Add(optionData);
|
||||
|
||||
if ((int)vals.GetValue(i) == (int)parameterManager.entity[propertyName])
|
||||
selected = i;
|
||||
}
|
||||
dropdown.AddOptions(dropDownData);
|
||||
dropdown.value = Array.IndexOf(Enum.GetValues(objType), Enum.GetValues(objType).GetValue((int)parameterManager.entity[propertyName]));
|
||||
|
||||
dropdown.value = selected;
|
||||
|
||||
dropdown.onValueChanged.AddListener(delegate
|
||||
{
|
||||
parameterManager.entity[propertyName] = (int)Enum.GetValues(objType).GetValue(dropdown.value);
|
||||
|
Reference in New Issue
Block a user