/// <summary> /// Use this to enable and disable the button. /// </summary> /// <param name="act"></param> public virtual void SetInteractable(bool act, bool fromSelection) { mInteractable = act; /* Make sure no error! */ if (mButton == null) { Init(); } mButton.enabled = mInteractable; if (mInteractable) { mImage.color = mInteractColor; } else { mImage.color = mNotInteractColor; } if (!fromSelection && mButtonSelection != null) { mButtonSelection.SetSkip(!mInteractable, true); } // interactable callback. if (interactableCallback != null) { interactableCallback.Invoke(); } }
/// <summary> /// Use this to enable and disable the button. /// </summary> /// <param name="act"></param> public virtual void SetInteractable(bool act, bool fromSelection) { mInteractable = act; /* Make sure no error! */ { if (mButton == null) { InitJCSButton(); } } mButton.enabled = mInteractable; if (mInteractable) { mImage.color = mInteractColor; } else { mImage.color = mNotInteractColor; } if (!fromSelection && mButtonSelection != null) { mButtonSelection.SetSkip(!mInteractable, true); } }