Beispiel #1
0
        GUIStyle GetContainerStyle(PureDataSubContainer.Types type)
        {
            GUIStyle style = new GUIStyle("foldout");

            style.fontStyle = FontStyle.Bold;
            Color textColor = style.normal.textColor;

            switch (type)
            {
            case PureDataSubContainer.Types.AudioSource:
                textColor = new Color(1, 0.5F, 0.3F, 10);
                break;

            case PureDataSubContainer.Types.MixContainer:
                textColor = new Color(0, 1, 1, 10);
                break;

            case PureDataSubContainer.Types.RandomContainer:
                textColor = new Color(1, 1, 0, 10);
                break;

            case PureDataSubContainer.Types.SwitchContainer:
                textColor = new Color(0.5F, 1, 0.3F, 10);
                break;
            }

            style.normal.textColor    = textColor * 0.7F;
            style.onNormal.textColor  = textColor * 0.7F;
            style.focused.textColor   = textColor * 0.85F;
            style.onFocused.textColor = textColor * 0.85F;
            style.active.textColor    = textColor * 0.85F;
            style.onActive.textColor  = textColor * 0.85F;

            return(style);
        }
Beispiel #2
0
        PureDataSubContainer.Types GetParentContainerType(PureDataSubContainer subContainer, PureDataContainer container)
        {
            PureDataSubContainer.Types type = PureDataSubContainer.Types.AudioSource;

            if (subContainer.parentId != 0)
            {
                type = container.GetSubContainerWithID(subContainer.parentId).type;
            }
            else
            {
                type = container.type.ConvertByName <PureDataSubContainer.Types>();
            }

            return(type);
        }