display action real name in aproppriate places

- make text on entities larger
- fix bug with enum properties
- show beat of editing entity when viewing properties
This commit is contained in:
minenice55 2022-08-20 23:54:09 -04:00
parent 647a2a0d19
commit cf2850ccb1
5 changed files with 16 additions and 13 deletions

View File

@ -6340,8 +6340,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -0.047210693, y: 0.000017166138}
m_SizeDelta: {x: 36.806, y: 44.84}
m_AnchoredPosition: {x: -0.039999, y: 0.000017166138}
m_SizeDelta: {x: 36.813, y: 44.84}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &258006093
MonoBehaviour:
@ -6402,7 +6402,7 @@ MonoBehaviour:
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacing: -100
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
@ -19238,7 +19238,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 1589389272}
m_HandleRect: {fileID: 1589389271}
m_Direction: 2
m_Value: 0
m_Value: 1
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
@ -24820,7 +24820,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 129.9111}
m_AnchoredPosition: {x: 0, y: 129.91107}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &1154875944

View File

@ -78,7 +78,7 @@ namespace HeavenStudio.Editor
eventSelector.SetActive(false);
this.entity = entity;
Editor.instance.SetGameEventTitle($"Properties for {entity.datamodel}");
Editor.instance.SetGameEventTitle($"Properties for {entity.datamodel} at beat {entity.beat}");
DestroyParams();

View File

@ -172,7 +172,9 @@ namespace HeavenStudio.Editor
dropdown.value = selected;
dropdown.onValueChanged.AddListener(_ =>
parameterManager.entity[propertyName] = Enum.ToObject(enumType, dropdown.value)
{
parameterManager.entity[propertyName] = (int) enumVals.GetValue(dropdown.value);
}
);
break;

View File

@ -140,7 +140,7 @@ namespace HeavenStudio.Editor
if (!EventCaller.FXOnlyGames().Contains(EventCaller.instance.GetMinigame(mg.name)))
{
GameObject sg = Instantiate(EventRef, eventsParent);
sg.GetComponent<TMP_Text>().text = "switchGame";
sg.GetComponent<TMP_Text>().text = "Switch Game";
sg.SetActive(true);
sg.GetComponent<TMP_Text>().color = EditorTheme.theme.properties.EventSelectedCol.Hex2RGB();
}
@ -149,7 +149,7 @@ namespace HeavenStudio.Editor
{
if (mg.actions[i].actionName == "switchGame" || mg.actions[i].hidden) continue;
GameObject g = Instantiate(EventRef, eventsParent);
g.GetComponent<TMP_Text>().text = mg.actions[i].actionName;
g.GetComponent<TMP_Text>().text = mg.actions[i].displayName;
g.SetActive(true);
}
}

View File

@ -505,9 +505,11 @@ namespace HeavenStudio.Editor.Track
public TimelineEventObj AddEventObject(string eventName, bool dragNDrop = false, Vector3 pos = new Vector3(), Beatmap.Entity entity = null, bool addEvent = false, string eventId = "")
{
var game = EventCaller.instance.GetMinigame(eventName.Split(0));
var action = EventCaller.instance.GetGameAction(game, eventName.Split(1));
GameObject g = Instantiate(TimelineEventObjRef.gameObject, TimelineEventObjRef.parent);
g.transform.localPosition = pos;
g.transform.GetChild(3).GetComponent<TMP_Text>().text = eventName.Split('/')[1];
g.transform.GetChild(3).GetComponent<TMP_Text>().text = action.displayName;
TimelineEventObj eventObj = g.GetComponent<TimelineEventObj>();
@ -572,9 +574,8 @@ namespace HeavenStudio.Editor.Track
tempEntity = en;
// default param value
var game = EventCaller.instance.GetMinigame(eventName.Split(0));
var ep = EventCaller.instance.GetGameAction(game, eventName.Split(1)).parameters;
// default param values
var ep = action.parameters;
if (ep != null)
{