com.alicizax.unity.ui.exten.../Runtime/UXComponent/Hotkey/UXHotkeyButton.cs
2025-12-16 15:36:13 +08:00

29 lines
608 B
C#

#if INPUTSYSTEM_SUPPORT
using UnityEngine;
using UnityEngine.InputSystem;
namespace AlicizaX.UI
{
[DisallowMultipleComponent]
public class UXHotkeyButton : UXButton
{
[SerializeField] internal InputActionReference _hotKeyRefrence;
[SerializeField] internal EHotkeyPressType _hotkeyPressType;
public InputActionReference HotKeyRefrence
{
get { return _hotKeyRefrence; }
}
internal void HotkeyActionTrigger()
{
if (Interactable)
{
OnSubmit(null);
}
}
}
}
#endif