コード例 #1
0
    bool GetControllerEnabled(FaderOptions _faderOptions)
    {
        ControllerUIGroup group = GetButtonGroupByFaderOptions(_faderOptions);

        if (group.activationToggle.isOn)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
コード例 #2
0
    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.");
        }
    }
コード例 #3
0
    void DestroyControllerGroup(ControllerUIGroup _buttonGroup)
    {
        //destroy all params
        _buttonGroup.SelfDestruct();

        //remove from list
        controllerUIs.Remove(_buttonGroup);

        //check for empty layouts, and destroy it
        DestroyEmptyLayouts();

        SortOptionsButtons();
    }
コード例 #4
0
    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();
    }
コード例 #5
0
 void SetFaderWidth(ControllerUIGroup _group)
 {
     _group.SetFaderWidth(faderWidth);
 }
コード例 #6
0
    public void DestroyControllerObjects(ControllerSettings _config)
    {
        ControllerUIGroup buttonGroup = GetButtonGroupByConfig(_config);

        DestroyControllerGroup(buttonGroup);
    }