示例#1
0
        public override void OnInspectorGUI()
        {
            //base.OnInspectorGUI();
            GUIUtils.StartCustomEditor();
            EditorGUI.indentLevel++;
            GUIUtils.StartBox();
            GUIUtils.DrawProp(so["gizmoColor"], new GUIContent("Gizmo Color"));
            GUIUtils.Space();
            GUIUtils.DrawProp(so["behavior"], new GUIContent("Cue Behavior"));

            EditorProp repeats = so["repeats"];

            GUIUtils.DrawProp(repeats, new GUIContent("Repeats", "How Many times this cue repeats"));
            if (repeats.intValue < 1)
            {
                repeats.SetValue(1);
            }
            if (HasSubCues())
            {
                GUIUtils.DrawToggleProp(so["useRandomPlaylist"], new GUIContent("Use Random Sub-Cue", "Plays one sub-cue at random, not all sequentially"));
            }
            GUIUtils.EndBox();
            EditorGUI.indentLevel--;
            GUIUtils.EndCustomEditor(so);
        }
示例#2
0
        public static void DrawMultiLineStringProp(EditorProp prop, bool overrideHotKeys, string controlName, params GUILayoutOption[] options)
        {
            bool   changed;
            string new_val = DrawTextField(prop.stringValue, TextFieldType.Area, overrideHotKeys, controlName, out changed, options);

            if (changed)
            {
                prop.SetValue(new_val);
            }
        }
示例#3
0
        public static bool DrawTextProp(EditorProp prop, TextFieldType type, bool overrideHotKeys, string controlName, params GUILayoutOption[] options)
        {
            bool   changed;
            string new_val = DrawTextField(prop.stringValue, type, overrideHotKeys, controlName, out changed, options);

            if (changed)
            {
                prop.SetValue(new_val);
            }
            return(changed);
        }
示例#4
0
        public static bool DrawDirectoryField(EditorProp prop, GUIContent content, bool forceProject = true, params GUILayoutOption[] options)
        {
            string old    = prop.stringValue;
            string newVal = DrawDirectoryField(old, content, forceProject, options);

            if (old != newVal)
            {
                prop.SetValue(newVal);
                return(true);
            }
            return(false);
        }