From d2f3b6501ecd9cd8ce8c4364685a2e54d1034d6d Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Wed, 3 Sep 2014 12:36:20 +0100 Subject: [PATCH] Command selection is disabled when playing game --- Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs b/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs index a036977e..b1643b9f 100644 --- a/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs +++ b/Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs @@ -134,7 +134,7 @@ namespace Fungus.Script summaryRect.x += buttonWidth + 5; summaryRect.width -= (buttonWidth + 5); - if (GUI.Button(buttonRect, commandName, commandStyle)) + if (GUI.Button(buttonRect, commandName, commandStyle) && !Application.isPlaying) { fungusScript.selectedCommand = command; GUIUtility.keyboardControl = 0; // Fix for textarea not refeshing (change focus) @@ -157,7 +157,7 @@ namespace Fungus.Script if (Event.current.type == EventType.Repaint) { if ((Application.isPlaying && command.IsExecuting()) || - (Application.isEditor && fungusScript.selectedCommand == command)) + (!Application.isPlaying && fungusScript.selectedCommand == command)) { Rect boxRect = position; boxRect.y += 1;