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); }
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); } }
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); }
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); }