Files
ichni_Creator_Studio/Assets/Scripts/DynamicUI/Inspector/StandardInspectionElement.cs
2025-06-14 20:47:45 +08:00

42 lines
2.0 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame;
using UnityEngine;
namespace Ichni.Editor
{
public static class StandardInspectionElement
{
private static IHaveInspection inspector => EditorManager.instance.uiManager.inspector;
private static Inspector inspectorUI => EditorManager.instance.uiManager.inspector;
public static void GenerateForTransform(GameElement gameElement, DynamicUIContainer generateContainer = null)//关于有Transform
{
if (generateContainer is null)
{
generateContainer = inspector.GenerateContainer("Generate Elements");
}
var animationSubcontainer = generateContainer.GenerateSubcontainer(3);
var displacementButton = inspector.GenerateButton(gameElement, animationSubcontainer, "Displacement", () =>
{
Displacement.GenerateElement("New Displacement", Guid.NewGuid(), new List<string>(), true, gameElement,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //位移
var swirlButton = inspector.GenerateButton(gameElement, animationSubcontainer, "Swirl", () =>
{
Swirl.GenerateElement("New Swirl", Guid.NewGuid(), new List<string>(), true, gameElement,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //旋转
var scaleButton = inspector.GenerateButton(gameElement, animationSubcontainer, "Scale", () =>
{
Scale.GenerateElement("New Scale", Guid.NewGuid(), new List<string>(), true, gameElement,
new FlexibleFloat(), new FlexibleFloat(), new FlexibleFloat());
}); //缩放
}
public static void GenerateForLoading()
{
inspectorUI.ClearInspector();
var container = inspector.GenerateContainer("Loading");
}
}
}