alright, looks like that's all the bugs gone
This commit is contained in:
parent
86b3d57f33
commit
4d354c6319
|
|
@ -97,7 +97,14 @@ namespace HeavenStudio.Editor
|
||||||
eventSelector.SetActive(false);
|
eventSelector.SetActive(false);
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
|
|
||||||
string col = EditorTheme.theme.properties.LayerColors[(int)entity["track"]];
|
string col = (int)entity["track"] switch
|
||||||
|
{
|
||||||
|
1 => EditorTheme.theme.properties.Layer2Col,
|
||||||
|
2 => EditorTheme.theme.properties.Layer3Col,
|
||||||
|
3 => EditorTheme.theme.properties.Layer4Col,
|
||||||
|
4 => EditorTheme.theme.properties.Layer5Col,
|
||||||
|
_ => EditorTheme.theme.properties.Layer1Col
|
||||||
|
};
|
||||||
Editor.instance.SetGameEventTitle($"Properties for <color=#{col}>{action.displayName}</color> on Beat {entity.beat.ToString("F2")} on <color=#{col}>Track {(int)entity["track"] + 1}</color>");
|
Editor.instance.SetGameEventTitle($"Properties for <color=#{col}>{action.displayName}</color> on Beat {entity.beat.ToString("F2")} on <color=#{col}>Track {(int)entity["track"] + 1}</color>");
|
||||||
|
|
||||||
DestroyParams();
|
DestroyParams();
|
||||||
|
|
@ -138,7 +145,6 @@ namespace HeavenStudio.Editor
|
||||||
Debug.LogError("Can't make property interface of type: " + typeType);
|
Debug.LogError("Can't make property interface of type: " + typeType);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
print(propertyPrefab.name);
|
|
||||||
|
|
||||||
GameObject input = Instantiate(propertyPrefab, transform);
|
GameObject input = Instantiate(propertyPrefab, transform);
|
||||||
input.SetActive(true);
|
input.SetActive(true);
|
||||||
|
|
|
||||||
|
|
@ -892,7 +892,7 @@ namespace HeavenStudio.Editor.Track
|
||||||
EntityTypes.Integer intVal => intVal.val,
|
EntityTypes.Integer intVal => intVal.val,
|
||||||
EntityTypes.Float floatVal => floatVal.val,
|
EntityTypes.Float floatVal => floatVal.val,
|
||||||
EntityTypes.Button buttonVal => buttonVal.defaultLabel,
|
EntityTypes.Button buttonVal => buttonVal.defaultLabel,
|
||||||
EntityTypes.Dropdown ddVal => new EntityTypes.DropdownObj(ddVal.defaultValue, ddVal.values),
|
EntityTypes.Dropdown ddVal => new EntityTypes.DropdownObj(ddVal),
|
||||||
_ => ep[i].parameter,
|
_ => ep[i].parameter,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine.Assertions.Must;
|
using UnityEngine.Assertions.Must;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace HeavenStudio
|
namespace HeavenStudio
|
||||||
{
|
{
|
||||||
|
|
@ -266,6 +267,13 @@ namespace HeavenStudio
|
||||||
e.dynamicData[param.propertyName] = (int)e[param.propertyName];
|
e.dynamicData[param.propertyName] = (int)e[param.propertyName];
|
||||||
else if (type == typeof(EntityTypes.Float))
|
else if (type == typeof(EntityTypes.Float))
|
||||||
e.dynamicData[param.propertyName] = (float)e[param.propertyName];
|
e.dynamicData[param.propertyName] = (float)e[param.propertyName];
|
||||||
|
else if (type == typeof(EntityTypes.Button))
|
||||||
|
e.dynamicData[param.propertyName] = (string)e[param.propertyName];
|
||||||
|
else if (type == typeof(EntityTypes.Dropdown)) {
|
||||||
|
JValue value = e[param.propertyName]["value"];
|
||||||
|
JArray values = e[param.propertyName]["Values"];
|
||||||
|
e.dynamicData[param.propertyName] = new EntityTypes.DropdownObj((int)value, values.Select(x => (string)x).ToList());
|
||||||
|
}
|
||||||
else if (type == typeof(EntityTypes.Resource))
|
else if (type == typeof(EntityTypes.Resource))
|
||||||
e.dynamicData[param.propertyName] = (EntityTypes.Resource)e[param.propertyName];
|
e.dynamicData[param.propertyName] = (EntityTypes.Resource)e[param.propertyName];
|
||||||
else if (type.IsEnum)
|
else if (type.IsEnum)
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,14 @@ namespace HeavenStudio
|
||||||
|
|
||||||
onValueChanged = null;
|
onValueChanged = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DropdownObj(Dropdown dd)
|
||||||
|
{
|
||||||
|
value = dd.defaultValue;
|
||||||
|
Values = dd.values ?? new();
|
||||||
|
|
||||||
|
onValueChanged = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct Resource
|
public struct Resource
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue