bool GetControllerEnabled(FaderOptions _faderOptions) { ControllerUIGroup group = GetButtonGroupByFaderOptions(_faderOptions); if (group.activationToggle.isOn) { return(true); } else { return(false); } }
void RemoveFromLayout(ControllerUIGroup _buttonGroup) { LayoutGroupButtonCount layout = GetLayoutGroupFromObject(_buttonGroup.faderMenuButton.gameObject); if (layout != null) { layout.count--; } else { Debug.LogError("Null layout! button didn't find its parent."); } }
void DestroyControllerGroup(ControllerUIGroup _buttonGroup) { //destroy all params _buttonGroup.SelfDestruct(); //remove from list controllerUIs.Remove(_buttonGroup); //check for empty layouts, and destroy it DestroyEmptyLayouts(); SortOptionsButtons(); }
public void SpawnFaderOptions(ControllerSettings _config, GameObject _control) { //check if any other controller buttons exist for this, then destroy all its contents //make sure to destroy faderOptions as well ControllerUIGroup dupe = GetButtonGroupByConfig(_config); if (dupe != null) { DestroyControllerGroup(dupe); } ControllerUIGroup buttonGroup = new ControllerUIGroup(_config, faderOptionsPrefab, faderOptionsActivationPrefab, _control); buttonGroup.faderOptions.transform.SetParent(optionsPanel.transform, false); controllerUIs.Add(buttonGroup); SetFaderWidth(buttonGroup); SortOptionsButtons(); RefreshFaderLayoutGroup(); }
void SetFaderWidth(ControllerUIGroup _group) { _group.SetFaderWidth(faderWidth); }
public void DestroyControllerObjects(ControllerSettings _config) { ControllerUIGroup buttonGroup = GetButtonGroupByConfig(_config); DestroyControllerGroup(buttonGroup); }