com.alicizax.unity.ui.exten.../Runtime/UXComponent/Hotkey/UXHotkeyButton.cs

20 lines
463 B
C#
Raw Normal View History

2025-08-08 16:25:09 +08:00
using UnityEngine;
2025-10-13 20:20:01 +08:00
namespace AlicizaX.UI.Extension
2025-08-08 16:25:09 +08:00
{
2025-10-22 15:24:47 +08:00
[DisallowMultipleComponent]
public class UXHotkeyButton : UXButton
2025-08-08 16:25:09 +08:00
{
2025-10-13 20:20:01 +08:00
[SerializeField] internal UnityEngine.InputSystem.InputActionReference _hotKeyRefrence;
[SerializeField] internal EHotkeyPressType _hotkeyPressType;
2025-08-08 16:25:09 +08:00
2025-10-13 20:20:01 +08:00
internal void HotkeyActionTrigger()
2025-08-08 16:25:09 +08:00
{
if (Interactable)
2025-08-08 16:25:09 +08:00
{
OnSubmit(null);
2025-08-08 16:25:09 +08:00
}
}
}
}