mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
26 lines
681 B
C#
26 lines
681 B
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
namespace RimWorldAnimationStudio
|
|
{
|
|
[CustomEditor(typeof(ButtonWithKeyCode))]
|
|
[CanEditMultipleObjects]
|
|
public class ButtonWithKeyCodeEditor : UnityEditor.UI.ButtonEditor
|
|
{
|
|
SerializedProperty keyCodeProp;
|
|
|
|
protected override void OnEnable()
|
|
{
|
|
base.OnEnable();
|
|
keyCodeProp = serializedObject.FindProperty("keyCode");
|
|
}
|
|
|
|
public override void OnInspectorGUI()
|
|
{
|
|
EditorGUILayout.PropertyField(keyCodeProp, new GUIContent("KeyCode"));
|
|
|
|
serializedObject.ApplyModifiedProperties();
|
|
base.OnInspectorGUI();
|
|
}
|
|
}
|
|
}
|