protected override void OnDestroy() { base.OnDestroy(); WindowSystemInput.instance = null; WindowSystemInput.scrollEvent = null; }
public static void Select(IInteractableComponent button) { if (button != null) { var sel = button.GetSelectable(); if (sel != null) { if (button.IsVisible() == false) { var buttonBase = (button as WindowComponentBase); System.Action callback = null; callback = () => { WindowSystem.GetEvents().Unregister(buttonBase, WindowEventType.OnShowEnd, callback); WindowSystemInput.Select_INTERNAL(button); }; WindowSystem.GetEvents().Register(buttonBase, WindowEventType.OnShowEnd, callback); } else { WindowSystemInput.Select_INTERNAL(button); } } } }
private static void Select_INTERNAL(IInteractableComponent button) { var sel = button.GetSelectable(); if (sel != null) { WindowSystemInput.Deselect(button); sel.Select(); if (sel is ButtonExtended) { (sel as ButtonExtended).Select(forced: true); } } }
public static void RaiseWaitForClickOnElement(IInteractableComponent button) { if (WindowSystemInput.CanClickOnElement(button) == true) { if (WindowSystemInput.waitForClickOnElement == null || WindowSystemInput.waitForClickOnElement == button) { var callback = WindowSystemInput.waitForClickOnElementCallback; WindowSystemInput.ResetWaitForClickOnElement(); if (callback != null) { callback.Invoke(); } } } }
protected override void Awake() { base.Awake(); WindowSystemInput.instance = this; }
public void Awake() { WindowSystemInput.instance = this; }
public void Awake() { WindowSystemInput.instance = this; }
public static void WaitForClickOnElement(IInteractableComponent button, System.Action onClick = null, object paramObject = null) { WindowSystemInput.WaitForClickOnElement(button, null, onClick, paramObject); }