|
|
@ -262,15 +262,22 @@ namespace Fungus.EditorUtils |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EditorApplication.update += OnEditorUpdate; |
|
|
|
EditorApplication.update += OnEditorUpdate; |
|
|
|
|
|
|
|
Undo.undoRedoPerformed += ForceRepaint; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual void OnDisable() |
|
|
|
protected virtual void OnDisable() |
|
|
|
{ |
|
|
|
{ |
|
|
|
EditorApplication.update -= OnEditorUpdate; |
|
|
|
EditorApplication.update -= OnEditorUpdate; |
|
|
|
|
|
|
|
Undo.undoRedoPerformed -= ForceRepaint; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void OnEditorUpdate() |
|
|
|
protected void ForceRepaint() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Repaint(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void OnEditorUpdate() |
|
|
|
{ |
|
|
|
{ |
|
|
|
HandleFlowchartSelectionChange(); |
|
|
|
HandleFlowchartSelectionChange(); |
|
|
|
|
|
|
|
|
|
|
@ -288,6 +295,12 @@ namespace Fungus.EditorUtils |
|
|
|
flowchart.SelectedCommandsStale = false; |
|
|
|
flowchart.SelectedCommandsStale = false; |
|
|
|
Repaint(); |
|
|
|
Repaint(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(CommandEditor.SelectedCommandDataStale) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CommandEditor.SelectedCommandDataStale = false; |
|
|
|
|
|
|
|
Repaint(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1199,7 +1212,7 @@ namespace Fungus.EditorUtils |
|
|
|
|
|
|
|
|
|
|
|
//cache these once as they can end up being called thousands of times per frame otherwise |
|
|
|
//cache these once as they can end up being called thousands of times per frame otherwise |
|
|
|
var curRealTime = Time.realtimeSinceStartup; |
|
|
|
var curRealTime = Time.realtimeSinceStartup; |
|
|
|
var fadeTimer = curRealTime + FungusConstants.ExecutingIconFadeTime; |
|
|
|
|
|
|
|
for (int i = 0; i < blocks.Length; ++i) |
|
|
|
for (int i = 0; i < blocks.Length; ++i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var b = blocks[i]; |
|
|
|
var b = blocks[i]; |
|
|
|