Browse Source

Command selection is disabled when playing game

master
chrisgregan 11 years ago
parent
commit
d2f3b6501e
  1. 4
      Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs

4
Assets/Fungus/FungusScript/Editor/FungusCommandListAdaptor.cs

@ -134,7 +134,7 @@ namespace Fungus.Script
summaryRect.x += buttonWidth + 5; summaryRect.x += buttonWidth + 5;
summaryRect.width -= (buttonWidth + 5); summaryRect.width -= (buttonWidth + 5);
if (GUI.Button(buttonRect, commandName, commandStyle)) if (GUI.Button(buttonRect, commandName, commandStyle) && !Application.isPlaying)
{ {
fungusScript.selectedCommand = command; fungusScript.selectedCommand = command;
GUIUtility.keyboardControl = 0; // Fix for textarea not refeshing (change focus) GUIUtility.keyboardControl = 0; // Fix for textarea not refeshing (change focus)
@ -157,7 +157,7 @@ namespace Fungus.Script
if (Event.current.type == EventType.Repaint) if (Event.current.type == EventType.Repaint)
{ {
if ((Application.isPlaying && command.IsExecuting()) || if ((Application.isPlaying && command.IsExecuting()) ||
(Application.isEditor && fungusScript.selectedCommand == command)) (!Application.isPlaying && fungusScript.selectedCommand == command))
{ {
Rect boxRect = position; Rect boxRect = position;
boxRect.y += 1; boxRect.y += 1;

Loading…
Cancel
Save