所有Simple UI Element,以及Composite Parameter Window初步
This commit is contained in:
@@ -141,11 +141,16 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
public Inspector inspector => EditorManager.instance.uiManager.inspector;
|
||||
|
||||
public void SetUpInspector() //被点击时设置第一层Inspector
|
||||
public virtual void SetUpInspector() //被点击时设置第一层Inspector
|
||||
{
|
||||
var container = inspector.GenerateContainer("Element Info");
|
||||
var nameInputField = inspector.GenerateInputField(this, container, GetType().Name + "'s Name", nameof(elementName));
|
||||
var guidText = inspector.GenerateText(this, container, "Element GUID", nameof(elementGuid), true);
|
||||
var tagsListButton = inspector.GenerateButton(this, container, "Tags List", () =>
|
||||
{
|
||||
inspector.GenerateCompositeParameterWindow(this, "Tags List", nameof(tags), typeof(List<string>))
|
||||
.SetAsStringList();
|
||||
});
|
||||
foreach (var submodule in submoduleList)
|
||||
{
|
||||
submodule.SetUpInspector();
|
||||
|
||||
@@ -10,8 +10,7 @@ using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
public partial class PathNode : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule,
|
||||
IHaveColorSubmodule
|
||||
public partial class PathNode : GameElement, IHaveTransformSubmodule, IHaveTimeDurationSubmodule, IHaveColorSubmodule
|
||||
{
|
||||
public Track track;
|
||||
|
||||
|
||||
@@ -67,10 +67,19 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public partial class TrackPathSubmodule
|
||||
{
|
||||
override public void SaveBM()
|
||||
public override void SaveBM()
|
||||
{
|
||||
matchedBM = new TrackPathSubmodule_BM(attachedGameElement, this);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
var container = inspector.GenerateContainer("Track Path");
|
||||
var trackSpaceDropdown =
|
||||
inspector.GenerateDropdown(this, container, "Space Type", typeof(Track.TrackSpaceType), nameof(trackSpaceType));
|
||||
var trackSamplingDropdown =
|
||||
inspector.GenerateDropdown(this, container, "Sampling Type", typeof(Track.TrackSamplingType), nameof(trackSamplingType));
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
|
||||
@@ -53,6 +53,11 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
matchedBM = new Beatmap.TrackRendererSubmoduleAutoOrient_BM(attachedGameElement, this);
|
||||
}
|
||||
|
||||
public override void SetUpInspector()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
namespace Beatmap
|
||||
|
||||
Reference in New Issue
Block a user