mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
namespace RimWorldAnimationStudio
|
|
{
|
|
[CustomEditor(typeof(KeyframeSlider))]
|
|
[CanEditMultipleObjects]
|
|
public class MenuButtonEditor : UnityEditor.UI.SliderEditor
|
|
{
|
|
SerializedProperty ghostSlidersProp;
|
|
SerializedProperty ghostSliderPrefabProp;
|
|
SerializedProperty maxGhostsProp;
|
|
|
|
protected override void OnEnable()
|
|
{
|
|
base.OnEnable();
|
|
ghostSlidersProp = serializedObject.FindProperty("ghostSliders");
|
|
ghostSliderPrefabProp = serializedObject.FindProperty("ghostSliderPrefab");
|
|
maxGhostsProp = serializedObject.FindProperty("maxGhosts");
|
|
}
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
EditorGUILayout.PropertyField(ghostSlidersProp, new GUIContent("Ghost Sliders"));
|
|
EditorGUILayout.PropertyField(ghostSliderPrefabProp, new GUIContent("Ghost Slider Prefab"));
|
|
EditorGUILayout.PropertyField(maxGhostsProp, new GUIContent("Max Ghosts"));
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
base.OnInspectorGUI();
|
|
}
|
|
}
|
|
}
|