增加UXButton Dsiable属性

This commit is contained in:
陈思海 2025-09-18 14:34:39 +08:00
parent 95fc6ee2a2
commit af4b77e2c3

View File

@ -258,6 +258,18 @@ public class UXButton : UIBehaviour, IButton,
_resetRoutine = StartCoroutine(OnFinishSubmit());
}
public bool Disable
{
get => m_Interactable;
set
{
if (m_Interactable == value) return;
m_Interactable = value;
m_SelectionState = !m_Interactable ? SelectionState.Disabled : SelectionState.Normal;
UpdateVisualState(m_SelectionState, false);
}
}
#endregion
#region Public Methods