Browse Source

Shortened command class names.

master
chrisgregan 11 years ago
parent
commit
c13fc82fb0
  1. 12
      Assets/Fungus/Editor/AddOptionCommandEditor.cs
  2. 4
      Assets/Fungus/Editor/CompareCommandEditor.cs
  3. 9
      Assets/Fungus/Editor/FungusEditorWindow.cs
  4. 4
      Assets/Fungus/Editor/SayCommandEditor.cs
  5. 4
      Assets/Fungus/Editor/SetVariableCommandEditor.cs
  6. 2
      Assets/Fungus/VisualScripting/AddOption.cs
  7. 0
      Assets/Fungus/VisualScripting/AddOption.cs.meta
  8. 2
      Assets/Fungus/VisualScripting/Compare.cs
  9. 0
      Assets/Fungus/VisualScripting/Compare.cs.meta
  10. 2
      Assets/Fungus/VisualScripting/Execute.cs
  11. 0
      Assets/Fungus/VisualScripting/Execute.cs.meta
  12. 2
      Assets/Fungus/VisualScripting/Say.cs
  13. 0
      Assets/Fungus/VisualScripting/Say.cs.meta
  14. 2
      Assets/Fungus/VisualScripting/SetVariable.cs
  15. 0
      Assets/Fungus/VisualScripting/SetVariable.cs.meta
  16. 2
      Assets/Fungus/VisualScripting/Wait.cs
  17. 0
      Assets/Fungus/VisualScripting/Wait.cs.meta

12
Assets/Fungus/Editor/AddOptionCommandEditor.cs

@ -1,4 +1,4 @@
using UnityEditor;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using System.Collections;
@ -7,12 +7,12 @@ using System.Collections.Generic;
namespace Fungus.Script
{
[CustomEditor (typeof(AddOptionCommand))]
[CustomEditor (typeof(AddOption))]
public class AddOptionCommandEditor : FungusCommandEditor
{
public override void DrawCommandInspectorGUI()
{
AddOptionCommand t = target as AddOptionCommand;
AddOption t = target as AddOption;
EditorGUI.BeginChangeCheck();
@ -20,7 +20,7 @@ namespace Fungus.Script
Sequence newSequence = SequenceEditor.SequenceField(new GUIContent("Sequence", "Sequence to execute when this option is selected"),
t.GetFungusScript(),
t.sequence);
AddOptionCommand.Condition newCondition = (AddOptionCommand.Condition)EditorGUILayout.EnumPopup(new GUIContent("Condition", "Conditions for when this option is displayed"), t.condition);
AddOption.Condition newCondition = (AddOption.Condition)EditorGUILayout.EnumPopup(new GUIContent("Condition", "Conditions for when this option is displayed"), t.condition);
if (EditorGUI.EndChangeCheck())
{
@ -31,8 +31,8 @@ namespace Fungus.Script
t.condition = newCondition;
}
if (t.condition == AddOptionCommand.Condition.ShowOnBoolean ||
t.condition == AddOptionCommand.Condition.HideOnBoolean)
if (t.condition == AddOption.Condition.ShowOnBoolean ||
t.condition == AddOption.Condition.HideOnBoolean)
{
string newBooleanVariableKey = EditorGUILayout.TextField(new GUIContent("Boolean Variable Key", "Boolean variable to check for condition"), t.booleanVariableKey);
if (newBooleanVariableKey != t.booleanVariableKey)

4
Assets/Fungus/Editor/CompareCommandEditor.cs

@ -6,12 +6,12 @@ using System.Collections.Generic;
namespace Fungus.Script
{
[CustomEditor (typeof(CompareCommand))]
[CustomEditor (typeof(Compare))]
public class CompareCommandEditor : FungusCommandEditor
{
public override void DrawCommandInspectorGUI()
{
CompareCommand t = target as CompareCommand;
Compare t = target as Compare;
FungusScript sc = t.GetFungusScript();
if (sc == null)

9
Assets/Fungus/Editor/FungusEditorWindow.cs

@ -90,11 +90,17 @@ namespace Fungus.Script
// http://docs.unity3d.com/Documentation/ScriptReference/EditorWindow.BeginWindows.html
BeginWindows();
GUIStyle windowStyle = new GUIStyle(GUI.skin.window);
windowSequenceMap.Clear();
for (int i = 0; i < sequences.Length; ++i)
{
Sequence sequence = sequences[i];
sequence.nodeRect = GUILayout.Window(i, sequence.nodeRect, DrawWindow, sequence.name, GUILayout.Width(100), GUILayout.Height(100), GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
float titleWidth = windowStyle.CalcSize(new GUIContent(sequence.name)).x;
float windowWidth = Mathf.Max (titleWidth + 10, 100);
sequence.nodeRect = GUILayout.Window(i, sequence.nodeRect, DrawWindow, sequence.name, GUILayout.Width(windowWidth), GUILayout.Height(100), GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
windowSequenceMap.Add(sequence);
}
@ -187,7 +193,6 @@ namespace Fungus.Script
foreach (FungusCommand command in commands)
{
string commandName = command.GetType().Name;
commandName = commandName.Replace("Command", "");
if (command.errorMessage.Length > 0)
{

4
Assets/Fungus/Editor/SayCommandEditor.cs

@ -7,12 +7,12 @@ using System.Collections.Generic;
namespace Fungus.Script
{
[CustomEditor (typeof(SayCommand))]
[CustomEditor (typeof(Say))]
public class SayCommandEditor : FungusCommandEditor
{
public override void DrawCommandInspectorGUI()
{
SayCommand t = target as SayCommand;
Say t = target as Say;
EditorGUILayout.PrefixLabel(new GUIContent("Say Text", "Text to display in dialog"));
EditorStyles.textField.wordWrap = true;

4
Assets/Fungus/Editor/SetVariableCommandEditor.cs

@ -6,12 +6,12 @@ using System.Collections.Generic;
namespace Fungus.Script
{
[CustomEditor (typeof(SetVariableCommand))]
[CustomEditor (typeof(SetVariable))]
public class SetVariableCommandEditor : FungusCommandEditor
{
public override void DrawCommandInspectorGUI()
{
SetVariableCommand t = target as SetVariableCommand;
SetVariable t = target as SetVariable;
FungusScript fungusScript = t.GetFungusScript();
if (fungusScript == null)

2
Assets/Fungus/VisualScripting/AddOptionCommand.cs → Assets/Fungus/VisualScripting/AddOption.cs

@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace Fungus.Script
{
public class AddOptionCommand : FungusCommand
public class AddOption : FungusCommand
{
public enum Condition
{

0
Assets/Fungus/VisualScripting/AddOptionCommand.cs.meta → Assets/Fungus/VisualScripting/AddOption.cs.meta

2
Assets/Fungus/VisualScripting/CompareCommand.cs → Assets/Fungus/VisualScripting/Compare.cs

@ -15,7 +15,7 @@ namespace Fungus.Script
GreaterThanOrEquals // >=
}
public class CompareCommand : FungusCommand
public class Compare : FungusCommand
{
public string variableKey;

0
Assets/Fungus/VisualScripting/CompareCommand.cs.meta → Assets/Fungus/VisualScripting/Compare.cs.meta

2
Assets/Fungus/VisualScripting/ExecuteCommand.cs → Assets/Fungus/VisualScripting/Execute.cs

@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace Fungus.Script
{
public class ExecuteCommand : FungusCommand
public class Execute : FungusCommand
{
public Sequence targetSequence;

0
Assets/Fungus/VisualScripting/ExecuteCommand.cs.meta → Assets/Fungus/VisualScripting/Execute.cs.meta

2
Assets/Fungus/VisualScripting/SayCommand.cs → Assets/Fungus/VisualScripting/Say.cs

@ -5,7 +5,7 @@ using System.Collections.Generic;
namespace Fungus.Script
{
public class SayCommand : FungusCommand
public class Say : FungusCommand
{
public string text;

0
Assets/Fungus/VisualScripting/SayCommand.cs.meta → Assets/Fungus/VisualScripting/Say.cs.meta

2
Assets/Fungus/VisualScripting/SetVariableCommand.cs → Assets/Fungus/VisualScripting/SetVariable.cs

@ -4,7 +4,7 @@ using System.Collections;
namespace Fungus.Script
{
public class SetVariableCommand : FungusCommand
public class SetVariable : FungusCommand
{
public string variableKey;

0
Assets/Fungus/VisualScripting/SetVariableCommand.cs.meta → Assets/Fungus/VisualScripting/SetVariable.cs.meta

2
Assets/Fungus/VisualScripting/WaitCommand.cs → Assets/Fungus/VisualScripting/Wait.cs

@ -5,7 +5,7 @@ using System.Collections;
namespace Fungus.Script
{
public class WaitCommand : FungusCommand
public class Wait : FungusCommand
{
public float duration;

0
Assets/Fungus/VisualScripting/WaitCommand.cs.meta → Assets/Fungus/VisualScripting/Wait.cs.meta

Loading…
Cancel
Save