Example #1
0
 void ResetUIMenusIfRequired(IGBPI_UI_Panel _info)
 {
     if (_info == this)
     {
         ResetUIMenus();
     }
 }
Example #2
0
 public void CallEventMovePanelUI(IGBPI_UI_Panel _info, int _order)
 {
     if (EventMovePanelUI != null)
     {
         EventMovePanelUI(_info, _order);
     }
 }
Example #3
0
 public void CallEventResetPanelUIMenu(IGBPI_UI_Panel _info)
 {
     if (EventResetPanelUIMenu != null)
     {
         EventResetPanelUIMenu(_info);
     }
 }
Example #4
0
 public void CallEventUIPanelSelectionChanged(IGBPI_UI_Panel _info)
 {
     if (EventUIPanelSelectionChanged != null)
     {
         EventUIPanelSelectionChanged(_info);
     }
 }
Example #5
0
 public void CallEventRemoveDropdownInstance(IGBPI_UI_Panel _info)
 {
     if (EventRemoveDropdownInstance != null)
     {
         EventRemoveDropdownInstance(_info);
     }
 }
Example #6
0
 void MoveIGBPIPanel(IGBPI_UI_Panel _panel, int _order)
 {
     if (_panel != null && _panel.AllTextAreValid)
     {
         _panel.transform.SetSiblingIndex(_order);
     }
     uiMaster.CallEventReorderIGBPIPanels();
 }
Example #7
0
        bool IGBPIPanelIsValidForSave(IGBPI_UI_Panel _panel)
        {
            bool _textValid = _panel.AllTextAreValid;
            bool _condValid = dataHandler.IGBPI_Conditions.ContainsKey
                                  (_panel.conditionText.text);
            bool _actionValid = dataHandler.IGBPI_Actions.ContainsKey
                                    (_panel.actionText.text);

            return(_panel != null && _textValid &&
                   _condValid && _actionValid);
        }
Example #8
0
 void MoveIGBPIPanelBelowSelection(IGBPI_UI_Panel _panel)
 {
     if (_panel != null && _panel.AllTextAreValid)
     {
         if (UIPanelSelection && UIPanelSelection.AllTextAreValid)
         {
             int _selIndex = UIPanelSelection.transform.GetSiblingIndex();
             _panel.transform.SetSiblingIndex(_selIndex + 1);
         }
     }
     uiMaster.CallEventReorderIGBPIPanels();
 }
Example #9
0
        IEnumerator DeleteIGBPIPanelAfterWait(IGBPI_UI_Panel _info, float _seconds)
        {
            if (_info.gameObject != null)
            {
                if (UIPanelSelection == _info)
                {
                    UIPanelSelection = null;
                    DisableIGBPIEditButtons();
                }
                UI_Panel_Members.Remove(_info);
                Destroy(_info.gameObject);
            }
            yield return(new WaitForSecondsRealtime(_seconds));

            uiMaster.CallEventReorderIGBPIPanels();
        }
Example #10
0
        public IGBPI_UI_Panel GetPanelFromOrder(int _order)
        {
            IGBPI_UI_Panel _panel = null;

            foreach (Transform _transform in behaviorContentTransform)
            {
                if (_transform.GetComponent <IGBPI_UI_Panel>())
                {
                    if (_transform.GetSiblingIndex() == _order)
                    {
                        _panel = _transform.GetComponent <IGBPI_UI_Panel>();
                    }
                }
            }
            return(_panel);
        }
Example #11
0
 void ChangeUIPanelVisuals(IGBPI_UI_Panel _info)
 {
     if (_info == this)
     {
         if (GetComponent <Image>())
         {
             GetComponent <Image>().color = selectedColor;
         }
     }
     else if (uiManager.PreviousPanelSelection == this || _info == null)
     {
         if (GetComponent <Image>())
         {
             GetComponent <Image>().color = normalColor;
         }
     }
 }
Example #12
0
 void SelectUIPanel(IGBPI_UI_Panel _info)
 {
     if (_info && _info.gameObject && _info.AllTextAreValid)
     {
         PreviousPanelSelection = UIPanelSelection;
         UIPanelSelection       = _info;
         DisableIGBPIEditButtons(true);
     }
     else if (_info != null && _info.gameObject && !_info.AllTextAreValid)
     {
         Debug.LogError("UI Info doesn't have all text objects assigned, cannot select panel");
         UIPanelSelection = null;
         DisableIGBPIEditButtons(false);
     }
     else
     {
         PreviousPanelSelection = UIPanelSelection;
         UIPanelSelection       = null;
         DisableIGBPIEditButtons(false);
     }
 }
Example #13
0
 void RegisterDropdownMenu(IGBPI_UI_Panel _info)
 {
     UI_Panel_Members.Add(_info);
 }
Example #14
0
 void DeregisterDropdownMenu(IGBPI_UI_Panel _info)
 {
     StartCoroutine(DeleteIGBPIPanelAfterWait(_info, 0.05f));
 }