From 7143dc1074bcac342af951b3de4bc21d4ed994f4 Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 30 May 2016 18:41:47 +0100 Subject: [PATCH] Fixed command summary incorrect for Fade UI command #486 --- Assets/Fungus/UI/Scripts/Commands/FadeUI.cs | 13 +++++++++++-- Assets/Fungus/UI/Scripts/Commands/TweenUI.cs | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs b/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs index a4323f17..3b80e3b0 100644 --- a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs +++ b/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs @@ -119,8 +119,17 @@ namespace Fungus protected override string GetSummaryValue() { - return targetAlpha.Value.ToString(); - } + if (fadeMode == FadeMode.Alpha) + { + return targetAlpha.Value.ToString() + " alpha"; + } + else if (fadeMode == FadeMode.Color) + { + return targetColor.Value.ToString() + " color"; + } + + return ""; + } public override bool IsPropertyVisible(string propertyName) { diff --git a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs b/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs index 5b8d93de..aa8c04c0 100644 --- a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs +++ b/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs @@ -88,7 +88,7 @@ namespace Fungus { return "Error: No targetObjects selected"; } - return targetObjects[0].name + " = " + GetSummaryValue() + " alpha"; + return targetObjects[0].name + " = " + GetSummaryValue(); } string objectList = ""; @@ -109,7 +109,7 @@ namespace Fungus } } - return objectList + " = " + GetSummaryValue() + " alpha"; + return objectList + " = " + GetSummaryValue(); } public override Color GetButtonColor()