29 lines
647 B
C#
29 lines
647 B
C#
#if INPUTSYSTEM_SUPPORT
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
namespace AlicizaX.UI.Extension
|
|
{
|
|
public class UXHotkey : MonoBehaviour
|
|
{
|
|
[SerializeField] private UXButton _button;
|
|
|
|
[SerializeField] internal UnityEngine.InputSystem.InputActionReference _hotKeyRefrence;
|
|
[SerializeField] internal EHotkeyPressType _hotkeyPressType;
|
|
|
|
private void OnValidate()
|
|
{
|
|
_button = GetComponent<UXButton>();
|
|
}
|
|
|
|
internal void HotkeyActionTrigger()
|
|
{
|
|
if (_button.Interactable)
|
|
{
|
|
_button.OnSubmit(null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif
|