示例#1
0
        public virtual void OnUIInput(UISelectable selectedObject, object[] data, Vector2Int input)
        {
            if (allowCancel)
            {
                if (input.x == settings.cancelAction)
                {
                    // Debug.Log("GOINGBAKC");
                    manualMenu.GoToPage(backPage);
                    return;
                }
            }

            if (data != null)
            {
                ManualMenuButton menuButton = data[0] as ManualMenuButton;
                if (menuButton != null)
                {
                    if (input.x == settings.submitAction)
                    {
                        if (menuButton.goToPage != null)
                        {
                            // Debug.Log("GOING TO PAGE");
                            menuButton.goToPage.backPage = this;
                            manualMenu.GoToPage(menuButton.goToPage);
                        }
                        else
                        {
                            if (!string.IsNullOrEmpty(menuButton.callStaticMethod))
                            {
                                SystemTools.CallStaticMethodSimple(menuButton.callStaticMethod);
                            }
                        }
                    }

                    int panelIndex = (int)data[1];

                    OnUIInput(selectedObject, menuButton.data, input, panelIndex);
                }
            }
        }