public override void OnInspectorGUI() { base.OnInspectorGUI(); using (new UndoScope(target)) _instructions.DrawList(); }
public override void OnInspectorGUI() { var roster = target as Roster; _toRemove = null; _toEdit = null; using (new UndoScope(serializedObject)) { EditorGUILayout.PropertyField(_ecosystem); EditorGUILayout.Space(); if (_ecosystem.objectReferenceValue as Ecosystem != roster.Ecosystem) { EcosystemChanged(); } if (roster.Ecosystem) { _creatureList.DrawList(); } } if (_toRemove != null) { Remove(roster, _toRemove); } if (_toEdit != null) { EditorHelper.Edit(_toEdit); } }
public override void OnInspectorGUI() { InstructionBreadcrumbsDrawer.Draw(); using (new UndoScope(serializedObject)) _instructions.DrawList(); }
public override void OnInspectorGUI() { var creature = target as Creature; var regenerate = false; EditorGUILayout.PropertyField(_speciesProperty); EditorGUILayout.Space(); if (creature.Species.Ecosystem.CreatureGenerationInstructions != null) { regenerate = GUILayout.Button(_regenerate); EditorGUILayout.Space(); } using (new UndoScope(creature)) { _traits.Draw(); EditorGUILayout.Space(); _moves.DrawList(); EditorGUILayout.Space(); _skills.DrawList(); } if (regenerate) { EditorUpdater.StartCoroutine(creature.GenerateTraits(_context)); } }
public override void OnInspectorGUI() { InstructionBreadcrumbsDrawer.Draw(); var set = target as InstructionSet; var design = GUILayout.Button("Show Designer"); _toEdit = null; _toRemove = -1; EditorGUILayout.Space(); EditorHelper.Separator(Color.grey); EditorGUILayout.Space(); using (new UndoScope(serializedObject)) _instructions.DrawList(); if (_toEdit != null) { InstructionBreadcrumbs.Edit(_toEdit); } if (_toRemove >= 0) { Remove(set, _toRemove); } if (design) { Design(set); } }
public override void OnInspectorGUI() { var expressions = target as ExpressionInstruction; InstructionBreadcrumbsDrawer.Draw(); using (new UndoScope(expressions)) _expressions.DrawList(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); EditorGUILayout.Space(); using (new UndoScope(serializedObject)) _instructions.DrawList(); }
public override void OnInspectorGUI() { var ecosystem = target as Ecosystem; _instructionToRemove = null; _speciesToRemove = null; _speciesToEdit = null; _abilityToRemove = null; _abilityToEdit = null; using (new UndoScope(serializedObject)) { EditorGUILayout.PropertyField(_generationInstructions); EditorGUILayout.Space(); } using (new UndoScope(target)) { _updateInstructions.DrawList(); EditorGUILayout.Space(); } using (new UndoScope(serializedObject)) { _species.DrawList(); EditorGUILayout.Space(); } using (new UndoScope(serializedObject)) _abilities.DrawList(); if (!string.IsNullOrEmpty(_instructionToRemove)) { Remove(ecosystem, _instructionToRemove); } if (_speciesToRemove) { Remove(ecosystem, _speciesToRemove); } if (_speciesToEdit) { Edit(_speciesToEdit); } if (_abilityToRemove) { Remove(ecosystem, _abilityToRemove); } if (_abilityToEdit) { Edit(_abilityToEdit); } }
public override void OnInspectorGUI() { var world = target as World; _toAdd = null; _toRemove = null; _toEdit = null; _toShow = -1; _toHide = -1; using (new UndoScope(serializedObject)) EditorGUILayout.PropertyField(_backgroundMusic); EditorGUILayout.Space(); using (new UndoScope(serializedObject)) { _uiScenes.DrawList(); EditorGUILayout.Space(); _mapLayers.DrawList(); EditorGUILayout.Space(); _zones.DrawList(); } if (!string.IsNullOrEmpty(_toAdd)) { Add(world, _toAdd); } if (_toRemove) { Remove(world, _toRemove); } if (_toShow >= 0) { ShowLayer(_toShow); } if (_toHide >= 0) { HideLayer(_toHide); } if (_toEdit) { EditorHelper.Edit(_toEdit); } }
public override void OnInspectorGUI() { InstructionBreadcrumbsDrawer.Draw(); using (new UndoScope(serializedObject)) { EditorGUILayout.PropertyField(_category); EditorGUILayout.Space(); EditorGUILayout.PropertyField(_message); EditorGUILayout.Space(); EditorGUILayout.PropertyField(_variable); EditorGUILayout.Space(); EditorGUILayout.PropertyField(_cancel); EditorGUILayout.Space(); _instructions.DrawList(); } }
public override void OnInspectorGUI() { var encounter = target as Encounter; _toRemove = -1; using (new UndoScope(serializedObject)) { EditorGUILayout.Space(); EditorGUILayout.PropertyField(_instructions); EditorGUILayout.Space(); EditorGUILayout.PropertyField(_generationInstructions); EditorGUILayout.Space(); EditorGUILayout.PropertyField(_encounterChance); EditorGUILayout.Space(); EditorGUILayout.PropertyField(_ecosystem); EditorGUILayout.Space(); if (_ecosystem.objectReferenceValue as Ecosystem != encounter.Ecosystem) { EcosystemChanged(); } } if (encounter.Ecosystem) { using (new UndoScope(encounter)) _encounterList.DrawList(); } EditorGUILayout.Space(); if (_toRemove >= 0) { Remove(encounter, _toRemove); } }
public override void Draw(Rect position, SerializedProperty property, GUIContent label) { var instructionHeight = EditorGUI.GetPropertyHeight(InstructionProperty); var inputsHeight = InputsList.Height; var outputsHeight = OutputsList.Height; var instructionRect = new Rect(position.x, position.y, position.width, instructionHeight); var inputsRect = new Rect(position.x, position.y + instructionHeight + 10, position.width, inputsHeight); var outputsRect = new Rect(position.x, position.y + instructionHeight + 10 + inputsHeight + 10, position.width, outputsHeight); using (var changes = new EditorGUI.ChangeCheckScope()) { EditorGUI.PropertyField(instructionRect, InstructionProperty); if (changes.changed && Caller.Instruction != null) { using (new EditObjectScope(property.serializedObject)) RefreshInputs(); } } InputsList.DrawList(inputsRect); OutputsList.DrawList(outputsRect); }
public void Draw() { _list.DrawList(); }
public void Draw() { _skills.DrawList(); }
public override void Draw(Rect position, SerializedProperty property, GUIContent label) { Values.DrawList(position); }