using UnityEngine; public class Widget : MonoBehaviour { public virtual void SetListener(WidgetListener listener) { } public void SendInput(InputEvent input) { if ((bool)base.transform.parent && (bool)base.transform.parent.GetComponent()) { base.transform.parent.GetComponent().SendInput(input); } OnInput(input); } public void Activate() { if ((bool)base.transform.parent && (bool)base.transform.parent.GetComponent()) { base.transform.parent.GetComponent().Activate(); } OnActivate(); } public virtual void Select() { } public virtual void Deselect() { } protected virtual void OnInput(InputEvent input) { } protected virtual void OnActivate() { } }