void ResetUIMenusIfRequired(IGBPI_UI_Panel _info) { if (_info == this) { ResetUIMenus(); } }
public void CallEventMovePanelUI(IGBPI_UI_Panel _info, int _order) { if (EventMovePanelUI != null) { EventMovePanelUI(_info, _order); } }
public void CallEventResetPanelUIMenu(IGBPI_UI_Panel _info) { if (EventResetPanelUIMenu != null) { EventResetPanelUIMenu(_info); } }
public void CallEventUIPanelSelectionChanged(IGBPI_UI_Panel _info) { if (EventUIPanelSelectionChanged != null) { EventUIPanelSelectionChanged(_info); } }
public void CallEventRemoveDropdownInstance(IGBPI_UI_Panel _info) { if (EventRemoveDropdownInstance != null) { EventRemoveDropdownInstance(_info); } }
void MoveIGBPIPanel(IGBPI_UI_Panel _panel, int _order) { if (_panel != null && _panel.AllTextAreValid) { _panel.transform.SetSiblingIndex(_order); } uiMaster.CallEventReorderIGBPIPanels(); }
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); }
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(); }
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(); }
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); }
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; } } }
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); } }
void RegisterDropdownMenu(IGBPI_UI_Panel _info) { UI_Panel_Members.Add(_info); }
void DeregisterDropdownMenu(IGBPI_UI_Panel _info) { StartCoroutine(DeleteIGBPIPanelAfterWait(_info, 0.05f)); }