From 18e2b11716dd015a2cff45cc0cdb54f8bc7651e2 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Wed, 13 Aug 2014 10:38:18 +0100 Subject: [PATCH] Command buttons remember if they've been expanded --- .../Editor/FungusScript/SequenceEditor.cs | 11 ++--------- .../Fungus/VisualScripting/FungusCommand.cs | 3 +++ Assets/Shuttle/ShuttleGame.unity | Bin 81276 -> 81492 bytes 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Assets/Fungus/Editor/FungusScript/SequenceEditor.cs b/Assets/Fungus/Editor/FungusScript/SequenceEditor.cs index d6038d15..8e34d051 100644 --- a/Assets/Fungus/Editor/FungusScript/SequenceEditor.cs +++ b/Assets/Fungus/Editor/FungusScript/SequenceEditor.cs @@ -97,17 +97,10 @@ namespace Fungus.Script if (GUILayout.Button(command.GetCommandTitle())) { - if (activeCommand == command) - { - activeCommand = null; - } - else - { - activeCommand = command; - } + command.expanded = !command.expanded; } - if (showCommandInspector) + if (command.expanded) { Editor commandEditor = Editor.CreateEditor(command); commandEditor.OnInspectorGUI(); diff --git a/Assets/Fungus/VisualScripting/FungusCommand.cs b/Assets/Fungus/VisualScripting/FungusCommand.cs index 347687f5..145082c5 100644 --- a/Assets/Fungus/VisualScripting/FungusCommand.cs +++ b/Assets/Fungus/VisualScripting/FungusCommand.cs @@ -19,6 +19,9 @@ namespace Fungus.Script [HideInInspector] public Sequence parentSequence; + [HideInInspector] + public bool expanded; + public virtual void Start() { parentSequence = GetComponent(); diff --git a/Assets/Shuttle/ShuttleGame.unity b/Assets/Shuttle/ShuttleGame.unity index dafaed1e2525884bd1fd1686050a34dbb59c7a42..72fdd2b50168bc3c21731ca729ac5f23db833999 100644 GIT binary patch delta 3251 zcmai#ZA@EL7{|{ex3t57MLK9pH``L6P#B%S22MveH)Uoj+c0isE+sMty0I6DsnMjw zY>H-6=3yMn=3tTd{(+?$_Cd`)VxkF)FHxf#zR$%Mrc985_&?{~i!FW_$?3iKcmB`I zd7kH9rl+(|rZq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