com.alicizax.unity.ui.exten.../Editor/UX/Hotkey/UXHotkeyButtonEditor.cs

35 lines
1017 B
C#
Raw Normal View History

2025-12-09 20:30:11 +08:00
#if INPUTSYSTEM_SUPPORT
using AlicizaX.UI;
using UnityEditor;
2025-12-09 20:30:11 +08:00
using UnityEngine;
2025-12-09 20:30:11 +08:00
namespace AlicizaX.UI
{
[CanEditMultipleObjects]
[CustomEditor(typeof(UXHotkeyButton), true)]
internal class UXHotkeyButtonEditor : UXButtonEditor
{
private SerializedProperty _hotKeyRefrence;
private SerializedProperty _hotkeyPressType;
protected override void OnEnable()
{
base.OnEnable();
_hotKeyRefrence = serializedObject.FindProperty("_hotKeyRefrence");
_hotkeyPressType = serializedObject.FindProperty("_hotkeyPressType");
}
protected override void DrawEventTab()
{
base.DrawEventTab();
using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox))
{
EditorGUILayout.PropertyField(_hotKeyRefrence, new GUIContent("InputAction"));
EditorGUILayout.PropertyField(_hotkeyPressType, new GUIContent("PressType"));
}
}
}
}
2025-12-09 20:30:11 +08:00
#endif