Exemple #1
0
        protected override void OnDestroy()
        {
            base.OnDestroy();

            WindowSystemInput.instance    = null;
            WindowSystemInput.scrollEvent = null;
        }
Exemple #2
0
        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);
                    }
                }
            }
        }
Exemple #3
0
        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);
                }
            }
        }
Exemple #4
0
 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();
             }
         }
     }
 }
Exemple #5
0
        protected override void Awake()
        {
            base.Awake();

            WindowSystemInput.instance = this;
        }
Exemple #6
0
 public void Awake()
 {
     WindowSystemInput.instance = this;
 }
		public void Awake() {

			WindowSystemInput.instance = this;

		}
Exemple #8
0
 public static void WaitForClickOnElement(IInteractableComponent button, System.Action onClick = null, object paramObject = null)
 {
     WindowSystemInput.WaitForClickOnElement(button, null, onClick, paramObject);
 }