修复 CommonButton 导航功能失效的问题并重新绑定 UI 事件引用
This commit is contained in:
@@ -13,8 +13,6 @@ namespace SepCore.UI
|
||||
|
||||
[SerializeField] private UnityEvent _onPointerEnterAction = new();
|
||||
|
||||
[SerializeField] private UnityEvent _onClickAction = new();
|
||||
|
||||
[SerializeField] private UnityEvent _onPointerExitAction = new();
|
||||
|
||||
protected override void Awake()
|
||||
@@ -25,11 +23,13 @@ namespace SepCore.UI
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
_background.color = _originalBackgroundColor;
|
||||
}
|
||||
|
||||
protected override void OnDisable()
|
||||
{
|
||||
base.OnDisable();
|
||||
_background.color = new Color(0.3f, 0.3f, 0.3f, 0.3f);
|
||||
}
|
||||
|
||||
@@ -43,13 +43,6 @@ namespace SepCore.UI
|
||||
EnterHoverState();
|
||||
}
|
||||
|
||||
public override void OnPointerDown(PointerEventData eventData)
|
||||
{
|
||||
base.OnPointerDown(eventData);
|
||||
|
||||
_onClickAction?.Invoke();
|
||||
}
|
||||
|
||||
public override void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (eventData.button != PointerEventData.InputButton.Left)
|
||||
|
||||
Reference in New Issue
Block a user