From 36aab4045ea0a385dbf4ba1f2a60d8b1cdb75366 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 4 Aug 2015 11:31:02 +0100 Subject: [PATCH 01/13] Removed unused SendEventEditor class --- .../Flowchart/Editor/SendEventEditor.cs | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 Assets/Fungus/Flowchart/Editor/SendEventEditor.cs diff --git a/Assets/Fungus/Flowchart/Editor/SendEventEditor.cs b/Assets/Fungus/Flowchart/Editor/SendEventEditor.cs deleted file mode 100644 index 13524614..00000000 --- a/Assets/Fungus/Flowchart/Editor/SendEventEditor.cs +++ /dev/null @@ -1,38 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - -namespace Fungus -{ - /* - [CustomEditor (typeof(SendEvent))] - public class SendEventEditor : CommandEditor - { - protected SerializedProperty targetEventProp; - protected SerializedProperty stopCurrentFlowchartProp; - - protected virtual void OnEnable() - { - targetEventProp = serializedObject.FindProperty("targetEvent"); - stopCurrentFlowchartProp = serializedObject.FindProperty("stopCurrentFlowchart"); - } - - public override void DrawCommandGUI() - { - // For some reason the serializedObject has already been disposed by the time this method is called - // The workaround is to acquire a new serializedObject and find the targetEvent property every time. - // This could be a bug in the Unity 4.6 beta so try to aquire the property in OnEnable() again some time. - - serializedObject.Update(); - - serializedObject.Update(); - - EditorGUILayout.PropertyField(targetEventProp); - EditorGUILayout.PropertyField(stopCurrentFlowchartProp); - - serializedObject.ApplyModifiedProperties(); - } - } - */ -} From a88537c0f3831ee52d169f13cbb28c1af7e51dbd Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 4 Aug 2015 11:38:34 +0100 Subject: [PATCH 02/13] Tolerate null commands in command list Should never happen, but if it does just ignore it and carry on. --- Assets/Fungus/Flowchart/Scripts/Block.cs | 5 +++++ Assets/Fungus/UI/Editor.meta | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 Assets/Fungus/UI/Editor.meta diff --git a/Assets/Fungus/Flowchart/Scripts/Block.cs b/Assets/Fungus/Flowchart/Scripts/Block.cs index 94bb56d9..b61f4f54 100644 --- a/Assets/Fungus/Flowchart/Scripts/Block.cs +++ b/Assets/Fungus/Flowchart/Scripts/Block.cs @@ -71,6 +71,11 @@ namespace Fungus int index = 0; foreach (Command command in commandList) { + if (command == null) + { + continue; + } + command.parentBlock = this; command.commandIndex = index++; } diff --git a/Assets/Fungus/UI/Editor.meta b/Assets/Fungus/UI/Editor.meta new file mode 100644 index 00000000..0f6bb93d --- /dev/null +++ b/Assets/Fungus/UI/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7ebd428fad0b74343aa1bf752f8f05a1 +folderAsset: yes +timeCreated: 1438002256 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: From 4f9ac78c6c2e4a9efe19c2b54af7d41c502142bc Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 4 Aug 2015 11:40:05 +0100 Subject: [PATCH 03/13] SetActive command shows state in summary --- Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs b/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs index bfe971ac..69ad01b7 100644 --- a/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs +++ b/Assets/Fungus/Flowchart/Scripts/Commands/SetActive.cs @@ -33,7 +33,7 @@ namespace Fungus return "Error: No game object selected"; } - return targetGameObject.name; + return targetGameObject.name + " = " + activeState.GetDescription(); } public override Color GetButtonColor() From 36cfc04dabc5bd4b8a77eafddac037e3d9e59cfd Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 4 Aug 2015 11:43:23 +0100 Subject: [PATCH 04/13] Added constructors and implicit operators for all variable types Assign default values to public variable properties and access variable values directly without using .Value accessor. --- Assets/Fungus/Flowchart/Scripts/Variable.cs | 8 ++++++++ .../Scripts/VariableTypes/BooleanVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/ColorVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/FloatVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/GameObjectVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/IntegerVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/MaterialVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/ObjectVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/SpriteVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/StringVariable.cs | 13 +++++++++++++ .../Scripts/VariableTypes/TextureVariable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/Vector2Variable.cs | 12 ++++++++++++ .../Scripts/VariableTypes/Vector3Variable.cs | 12 ++++++++++++ 13 files changed, 153 insertions(+) diff --git a/Assets/Fungus/Flowchart/Scripts/Variable.cs b/Assets/Fungus/Flowchart/Scripts/Variable.cs index c5f9ef1d..f2c151e6 100644 --- a/Assets/Fungus/Flowchart/Scripts/Variable.cs +++ b/Assets/Fungus/Flowchart/Scripts/Variable.cs @@ -32,6 +32,14 @@ namespace Fungus this.VariableTypes = variableTypes; } + public VariablePropertyAttribute (string defaultText, params System.Type[] variableTypes) + { + this.defaultText = defaultText; + this.VariableTypes = variableTypes; + } + + public String defaultText = ""; + public System.Type[] VariableTypes { get; set; } } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs index e8ff1ea7..fadfbe14 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/BooleanVariable.cs @@ -36,11 +36,23 @@ namespace Fungus public struct BooleanData { [SerializeField] + [VariableProperty("", typeof(BooleanVariable))] public BooleanVariable booleanRef; [SerializeField] public bool booleanVal; + public BooleanData(bool v) + { + booleanVal = v; + booleanRef = null; + } + + public static implicit operator bool(BooleanData booleanData) + { + return booleanData.Value; + } + public bool Value { get { return (booleanRef == null) ? booleanVal : booleanRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs index 9f859fea..0592cd4e 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ColorVariable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct ColorData { [SerializeField] + [VariableProperty("", typeof(ColorVariable))] public ColorVariable colorRef; [SerializeField] public Color colorVal; + + public ColorData(Color v) + { + colorVal = v; + colorRef = null; + } + public static implicit operator Color(ColorData colorData) + { + return colorData.Value; + } + public Color Value { get { return (colorRef == null) ? colorVal : colorRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs index c50df12e..f3eb7a4d 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/FloatVariable.cs @@ -44,11 +44,23 @@ namespace Fungus public struct FloatData { [SerializeField] + [VariableProperty("", typeof(FloatVariable))] public FloatVariable floatRef; [SerializeField] public float floatVal; + public FloatData(float v) + { + floatVal = v; + floatRef = null; + } + + public static implicit operator float(FloatData floatData) + { + return floatData.Value; + } + public float Value { get { return (floatRef == null) ? floatVal : floatRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs index 76f4859c..c0fd5db5 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/GameObjectVariable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct GameObjectData { [SerializeField] + [VariableProperty("", typeof(GameObjectVariable))] public GameObjectVariable gameObjectRef; [SerializeField] public GameObject gameObjectVal; + + public GameObjectData(GameObject v) + { + gameObjectVal = v; + gameObjectRef = null; + } + public static implicit operator GameObject(GameObjectData gameObjectData) + { + return gameObjectData.Value; + } + public GameObject Value { get { return (gameObjectRef == null) ? gameObjectVal : gameObjectRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs index a490214b..15698ad9 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/IntegerVariable.cs @@ -44,11 +44,23 @@ namespace Fungus public struct IntegerData { [SerializeField] + [VariableProperty("", typeof(IntegerVariable))] public IntegerVariable integerRef; [SerializeField] public int integerVal; + public IntegerData(int v) + { + integerVal = v; + integerRef = null; + } + + public static implicit operator int(IntegerData integerData) + { + return integerData.Value; + } + public int Value { get { return (integerRef == null) ? integerVal : integerRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs index 81d05a1e..fa965ce2 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/MaterialVariable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct MaterialData { [SerializeField] + [VariableProperty("", typeof(MaterialVariable))] public MaterialVariable materialRef; [SerializeField] public Material materialVal; + + public MaterialData(Material v) + { + materialVal = v; + materialRef = null; + } + public static implicit operator Material(MaterialData materialData) + { + return materialData.Value; + } + public Material Value { get { return (materialRef == null) ? materialVal : materialRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs index 04d28a95..f7531f3f 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/ObjectVariable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct ObjectData { [SerializeField] + [VariableProperty("", typeof(ObjectVariable))] public ObjectVariable objectRef; [SerializeField] public Object objectVal; + + public ObjectData(Object v) + { + objectVal = v; + objectRef = null; + } + public static implicit operator Object(ObjectData objectData) + { + return objectData.Value; + } + public Object Value { get { return (objectRef == null) ? objectVal : objectRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs index abe3203c..8e69a697 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/SpriteVariable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct SpriteData { [SerializeField] + [VariableProperty("", typeof(SpriteVariable))] public SpriteVariable spriteRef; [SerializeField] public Sprite spriteVal; + + public SpriteData(Sprite v) + { + spriteVal = v; + spriteRef = null; + } + public static implicit operator Sprite(SpriteData spriteData) + { + return spriteData.Value; + } + public Sprite Value { get { return (spriteRef == null) ? spriteVal : spriteRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs index 321adbe8..024e61cc 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/StringVariable.cs @@ -34,11 +34,24 @@ namespace Fungus public struct StringData { [SerializeField] + [VariableProperty("", typeof(StringVariable))] public StringVariable stringRef; + [TextArea(1,10)] [SerializeField] public string stringVal; + public StringData(string v) + { + stringVal = v; + stringRef = null; + } + + public static implicit operator string(StringData spriteData) + { + return spriteData.Value; + } + public string Value { get { return (stringRef == null) ? stringVal : stringRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs index a242491c..30081881 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/TextureVariable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct TextureData { [SerializeField] + [VariableProperty("", typeof(TextureVariable))] public TextureVariable textureRef; [SerializeField] public Texture textureVal; + + public TextureData(Texture v) + { + textureVal = v; + textureRef = null; + } + public static implicit operator Texture(TextureData textureData) + { + return textureData.Value; + } + public Texture Value { get { return (textureRef == null) ? textureVal : textureRef.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs index b67f092f..c4504569 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector2Variable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct Vector2Data { [SerializeField] + [VariableProperty("", typeof(Vector2Variable))] public Vector2Variable vector2Ref; [SerializeField] public Vector2 vector2Val; + + public Vector2Data(Vector2 v) + { + vector2Val = v; + vector2Ref = null; + } + public static implicit operator Vector2(Vector2Data vector2Data) + { + return vector2Data.Value; + } + public Vector2 Value { get { return (vector2Ref == null) ? vector2Val : vector2Ref.value; } diff --git a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs b/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs index baacea1c..f4131db9 100644 --- a/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs +++ b/Assets/Fungus/Flowchart/Scripts/VariableTypes/Vector3Variable.cs @@ -12,11 +12,23 @@ namespace Fungus public struct Vector3Data { [SerializeField] + [VariableProperty("", typeof(Vector3Variable))] public Vector3Variable vector3Ref; [SerializeField] public Vector3 vector3Val; + + public Vector3Data(Vector3 v) + { + vector3Val = v; + vector3Ref = null; + } + public static implicit operator Vector3(Vector3Data vector3Data) + { + return vector3Data.Value; + } + public Vector3 Value { get { return (vector3Ref == null) ? vector3Val : vector3Ref.value; } From c66d29b3be5ad11598b24885364304c9e5593e1e Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 4 Aug 2015 11:50:51 +0100 Subject: [PATCH 05/13] Added ComboBox to Thirdparty folder --- Assets/Fungus/Thirdparty/ComboBox.meta | 9 + .../Thirdparty/ComboBox/ComboBox.prefab | 433 ++++++++++ .../Thirdparty/ComboBox/ComboBox.prefab.meta | 8 + .../ComboBox/ComboBoxTestScene.unity | 798 ++++++++++++++++++ .../ComboBox/ComboBoxTestScene.unity.meta | 6 + .../Fungus/Thirdparty/ComboBox/Scripts.meta | 9 + .../Thirdparty/ComboBox/Scripts/ComboBox.cs | 681 +++++++++++++++ .../ComboBox/Scripts/ComboBoxItem.cs | 115 +++ .../ComboBox/Scripts/ComboBoxItem.cs.meta | 10 + .../Thirdparty/ComboBox/Scripts/Editor.meta | 9 + .../ComboBox/Scripts/Editor/ComboBoxEditor.cs | 107 +++ .../Scripts/Editor/ComboBoxEditor.cs.meta | 10 + .../ComboBox/Scripts/TestComboBox.cs | 56 ++ .../ComboBox/Scripts/TestComboBox.cs.meta | 10 + 14 files changed, 2261 insertions(+) create mode 100644 Assets/Fungus/Thirdparty/ComboBox.meta create mode 100644 Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab create mode 100644 Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab.meta create mode 100644 Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity create mode 100644 Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity.meta create mode 100644 Assets/Fungus/Thirdparty/ComboBox/Scripts.meta create mode 100755 Assets/Fungus/Thirdparty/ComboBox/Scripts/ComboBox.cs create mode 100755 Assets/Fungus/Thirdparty/ComboBox/Scripts/ComboBoxItem.cs create mode 100644 Assets/Fungus/Thirdparty/ComboBox/Scripts/ComboBoxItem.cs.meta create mode 100644 Assets/Fungus/Thirdparty/ComboBox/Scripts/Editor.meta create mode 100755 Assets/Fungus/Thirdparty/ComboBox/Scripts/Editor/ComboBoxEditor.cs create mode 100644 Assets/Fungus/Thirdparty/ComboBox/Scripts/Editor/ComboBoxEditor.cs.meta create mode 100755 Assets/Fungus/Thirdparty/ComboBox/Scripts/TestComboBox.cs create mode 100644 Assets/Fungus/Thirdparty/ComboBox/Scripts/TestComboBox.cs.meta diff --git a/Assets/Fungus/Thirdparty/ComboBox.meta b/Assets/Fungus/Thirdparty/ComboBox.meta new file mode 100644 index 00000000..23dbfdac --- /dev/null +++ b/Assets/Fungus/Thirdparty/ComboBox.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7bf9b0e9fb653414485c359a29badac7 +folderAsset: yes +timeCreated: 1435835857 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab b/Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab new file mode 100644 index 00000000..7e05c355 --- /dev/null +++ b/Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab @@ -0,0 +1,433 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &109132 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22455272} + m_Layer: 0 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &113240 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22408100} + - 222: {fileID: 22233812} + - 114: {fileID: 11484036} + - 225: {fileID: 22581862} + m_Layer: 0 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &124302 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22481784} + - 114: {fileID: 11481176} + m_Layer: 0 + m_Name: ComboBox + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &136152 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22497688} + - 222: {fileID: 22244812} + - 114: {fileID: 11435456} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &139690 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22450736} + - 222: {fileID: 22275660} + - 114: {fileID: 11443144} + - 114: {fileID: 11458428} + m_Layer: 0 + m_Name: ComboButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &197142 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22408564} + - 222: {fileID: 22249438} + - 114: {fileID: 11463460} + m_Layer: 0 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11435456 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 136152} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1.20000005 + m_Text: Select item +--- !u!114 &11443144 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 139690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11458428 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 139690} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11443144} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11463460 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11481176 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 124302} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 764efac649a181e4d8ab7e0941f263b4, type: 3} + m_Name: + m_EditorClassIdentifier: + Sprite_UISprite: {fileID: 0} + Sprite_Background: {fileID: 0} + _interactable: 1 + _itemsToDisplay: 4 + _hideFirstItem: 1 + _selectedIndex: 0 + _items: + - _caption: Select item + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 1 + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 2 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 0 + - _caption: Item 3 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 1 + - _caption: Item 4 + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 5 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 0 + - _caption: Item 6 + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 7 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 0 +--- !u!114 &11484036 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113240} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u25BC" +--- !u!222 &22233812 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113240} +--- !u!222 &22244812 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 136152} +--- !u!222 &22249438 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197142} +--- !u!222 &22275660 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 139690} +--- !u!224 &22408100 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113240} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: .5, z: 1} + m_Children: [] + m_Father: {fileID: 22455272} + m_RootOrder: 1 + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 30, y: 0} + m_Pivot: {x: 1, y: .5} +--- !u!224 &22408564 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 197142} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22450736} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 4, y: -4} + m_SizeDelta: {x: 22, y: -8} + m_Pivot: {x: 0, y: 1} +--- !u!224 &22450736 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 139690} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22408564} + - {fileID: 22497688} + m_Father: {fileID: 22455272} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22455272 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109132} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22450736} + - {fileID: 22408100} + m_Father: {fileID: 22481784} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22481784 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 124302} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22455272} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22497688 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 136152} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22450736} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: -6, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!225 &22581862 +CanvasGroup: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 113240} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 124302} + m_IsPrefabParent: 1 diff --git a/Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab.meta b/Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab.meta new file mode 100644 index 00000000..0419aa31 --- /dev/null +++ b/Assets/Fungus/Thirdparty/ComboBox/ComboBox.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 65e6951c5bb5a4425876dde3504230f9 +timeCreated: 1435836084 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity b/Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity new file mode 100644 index 00000000..c5ef54af --- /dev/null +++ b/Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity @@ -0,0 +1,798 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: .25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 6 + m_Fog: 0 + m_FogColor: {r: .5, g: .5, b: .5, a: 1} + m_FogMode: 3 + m_FogDensity: .00999999978 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: .200000003, g: .200000003, b: .200000003, a: 1} + m_AmbientEquatorColor: {r: .200000003, g: .200000003, b: .200000003, a: 1} + m_AmbientGroundColor: {r: .200000003, g: .200000003, b: .200000003, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: .5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} +--- !u!127 &3 +LevelGameManager: + m_ObjectHideFlags: 0 +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_GIWorkflowMode: 1 + m_LightmapsMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 3 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AOMaxDistance: 1 + m_Padding: 2 + m_CompAOExponent: 0 + m_LightmapParameters: {fileID: 0} + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 1024 + m_LightmapSnapshot: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &5 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: .5 + agentHeight: 2 + agentSlope: 45 + agentClimb: .400000006 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: .166666657 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &118098217 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 118098221} + - 223: {fileID: 118098220} + - 114: {fileID: 118098219} + - 114: {fileID: 118098218} + m_Layer: 0 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &118098218 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 118098217} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &118098219 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 118098217} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &118098220 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 118098217} + m_Enabled: 1 + serializedVersion: 2 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!224 &118098221 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 118098217} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 584710810} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &189900987 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 189900988} + - 222: {fileID: 189900991} + - 114: {fileID: 189900990} + - 225: {fileID: 189900989} + m_Layer: 0 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &189900988 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 189900987} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: .5, z: 1} + m_Children: [] + m_Father: {fileID: 1075148776} + m_RootOrder: 1 + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 30, y: 0} + m_Pivot: {x: 1, y: .5} +--- !u!225 &189900989 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 189900987} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 0 + m_BlocksRaycasts: 0 + m_IgnoreParentGroups: 0 +--- !u!114 &189900990 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 189900987} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u25BC" +--- !u!222 &189900991 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 189900987} +--- !u!1 &556050592 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 556050593} + - 222: {fileID: 556050596} + - 114: {fileID: 556050595} + - 114: {fileID: 556050594} + m_Layer: 0 + m_Name: ComboButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &556050593 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 556050592} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1334474371} + - {fileID: 608930524} + m_Father: {fileID: 1075148776} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!114 &556050594 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 556050592} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 556050595} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &556050595 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 556050592} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &556050596 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 556050592} +--- !u!1 &584710809 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 584710810} + - 114: {fileID: 584710811} + m_Layer: 0 + m_Name: ComboBox + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &584710810 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 584710809} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1075148776} + m_Father: {fileID: 118098221} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!114 &584710811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 584710809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 764efac649a181e4d8ab7e0941f263b4, type: 3} + m_Name: + m_EditorClassIdentifier: + Sprite_UISprite: {fileID: 0} + Sprite_Background: {fileID: 0} + _interactable: 1 + _itemsToDisplay: 4 + _hideFirstItem: 1 + _selectedIndex: 0 + _items: + - _caption: Select item + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 1 + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 2 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 0 + - _caption: Item 3 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 1 + - _caption: Item 4 + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 5 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 0 + - _caption: Item 6 + _image: {fileID: 0} + _isDisabled: 0 + - _caption: Item 7 + _image: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + _isDisabled: 0 +--- !u!1 &608930523 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 608930524} + - 222: {fileID: 608930526} + - 114: {fileID: 608930525} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &608930524 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 608930523} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 556050593} + m_RootOrder: 1 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: -6, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &608930525 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 608930523} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1.20000005 + m_Text: Select item +--- !u!222 &608930526 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 608930523} +--- !u!1 &846109954 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 846109958} + - 114: {fileID: 846109957} + - 114: {fileID: 846109956} + - 114: {fileID: 846109955} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &846109955 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 846109954} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AllowActivationOnStandalone: 0 +--- !u!114 &846109956 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 846109954} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: .5 + m_AllowActivationOnMobileDevice: 0 +--- !u!114 &846109957 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 846109954} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &846109958 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 846109954} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!1 &1075148775 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1075148776} + m_Layer: 0 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1075148776 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1075148775} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 556050593} + - {fileID: 189900988} + m_Father: {fileID: 584710810} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!1 &1334474370 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 224: {fileID: 1334474371} + - 222: {fileID: 1334474373} + - 114: {fileID: 1334474372} + m_Layer: 0 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1334474371 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1334474370} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 556050593} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 4, y: -4} + m_SizeDelta: {x: 22, y: -8} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1334474372 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1334474370} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1334474373 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1334474370} +--- !u!1 &1383163942 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1383163944} + - 114: {fileID: 1383163943} + m_Layer: 0 + m_Name: _FungusState + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1383163943 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1383163942} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} + m_Name: + m_EditorClassIdentifier: + selectedFlowchart: {fileID: 0} +--- !u!4 &1383163944 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1383163942} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1 &1771269060 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1771269065} + - 20: {fileID: 1771269064} + - 92: {fileID: 1771269063} + - 124: {fileID: 1771269062} + - 81: {fileID: 1771269061} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1771269061 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771269060} + m_Enabled: 1 +--- !u!124 &1771269062 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771269060} + m_Enabled: 1 +--- !u!92 &1771269063 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771269060} + m_Enabled: 1 +--- !u!20 &1771269064 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771269060} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: .300000012 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_HDR: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: .0219999999 + m_StereoMirrorMode: 0 +--- !u!4 &1771269065 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771269060} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 diff --git a/Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity.meta b/Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity.meta new file mode 100644 index 00000000..32e19188 --- /dev/null +++ b/Assets/Fungus/Thirdparty/ComboBox/ComboBoxTestScene.unity.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: ce27f67d97a4b6e4f95525d833130c6e +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/ComboBox/Scripts.meta b/Assets/Fungus/Thirdparty/ComboBox/Scripts.meta new file mode 100644 index 00000000..24453d8a --- /dev/null +++ b/Assets/Fungus/Thirdparty/ComboBox/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 57192e23792d2174ab616429b04425eb +folderAsset: yes +timeCreated: 1435835857 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Fungus/Thirdparty/ComboBox/Scripts/ComboBox.cs b/Assets/Fungus/Thirdparty/ComboBox/Scripts/ComboBox.cs new file mode 100755 index 00000000..ef9e5e30 --- /dev/null +++ b/Assets/Fungus/Thirdparty/ComboBox/Scripts/ComboBox.cs @@ -0,0 +1,681 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.UI; + +[RequireComponent(typeof(RectTransform))] +public class ComboBox : MonoBehaviour +{ + public Sprite Sprite_UISprite; + public Sprite Sprite_Background; + + public Action OnSelectionChanged; + + [SerializeField] + private bool _interactable = true; + public bool Interactable + { + get + { + return _interactable; + } + set + { + _interactable = value; + var button = comboButtonRectTransform.GetComponent