Пример #1
0
        protected override void SetFlairs(UISelectable element, ManualMenuButton button, int panelIndex)
        {
            int slotSelect = (int)button.data[0];

            if (SaveLoad.SaveExists(slotSelect))
            {
                element.EnableFlair(0, true);
            }
        }
Пример #2
0
        protected override void SetFlairs(UISelectable element, ManualMenuButton button, int panelIndex)
        {
            int buttonSelect = (int)button.data[0];

            if (buttonSelect < 4)
            {
                element.EnableFlair(0, (bool)button.data[1]);
            }
        }
Пример #3
0
        void MakeButton(UISelectable element, string text, ManualMenuButton button, int panelIndex, object[] data, bool enableFlairs)
        {
            element.uiText.SetText(text);
            element.data = data;

            element.EnableFlair(0, false);
            element.EnableFlair(1, false);
            if (enableFlairs)
            {
                SetFlairs(element, button, panelIndex);
            }
        }
Пример #4
0
 public virtual void OnUISelect(UISelectable selectedObject, object[] data)
 {
     if (uiObject.textPanel != null)
     {
         if (data != null)
         {
             ManualMenuButton menuButton = data[0] as ManualMenuButton;
             if (menuButton != null)
             {
                 uiObject.SetPanelText(menuButton.displayDescription);
             }
             // uiObject.textPanel.SetTexts(string.Empty, menuButton.displayDescription, true);
             // uiObject.textPanel.mainText.SetText(menuButton.displayDescription);
         }
     }
 }
Пример #5
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);
                }
            }
        }
Пример #6
0
 protected override void SetFlairs(UISelectable element, ManualMenuButton button, int panelIndex)
 {
 }
Пример #7
0
 protected abstract void SetFlairs(UISelectable element, ManualMenuButton button, int panelIndex);