From a808ac5dc8b6aea975121c37140c665ce3365e9f Mon Sep 17 00:00:00 2001 From: Nils Hausfeld Date: Tue, 18 Jun 2024 19:44:07 +0200 Subject: [PATCH] - Added descriptions to Bitwise OR, XOR - Added description to Boolean XOR, NOR, NAND and updated AND, OR - Minor tooltip text fix --- Source/Editor/Surface/Archetypes/Bitwise.cs | 4 ++-- Source/Editor/Surface/Archetypes/Boolean.cs | 10 +++++----- Source/Editor/Surface/Archetypes/Particles.cs | 2 +- Source/Editor/Surface/ContextMenu/VisjectCMItem.cs | 6 +++--- Source/Editor/Surface/SurfaceNode.cs | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Source/Editor/Surface/Archetypes/Bitwise.cs b/Source/Editor/Surface/Archetypes/Bitwise.cs index 5b96627f0..92616bcbc 100644 --- a/Source/Editor/Surface/Archetypes/Bitwise.cs +++ b/Source/Editor/Surface/Archetypes/Bitwise.cs @@ -59,8 +59,8 @@ namespace FlaxEditor.Surface.Archetypes { Op1(1, "Bitwise NOT", "Negates the value using bitwise operation", new[] { "!", "~" }), Op2(2, "Bitwise AND", "Performs a bitwise conjunction on two values", new[] { "&" }), - Op2(3, "Bitwise OR", "", new[] { "|" }), - Op2(4, "Bitwise XOR", "", new[] { "^" }), + Op2(3, "Bitwise OR", "Performs a bitwise disjunction on two values", new[] { "|" }), + Op2(4, "Bitwise XOR", "Performs a bitwise exclusive disjunction on two values", new[] { "^" }), }; } } diff --git a/Source/Editor/Surface/Archetypes/Boolean.cs b/Source/Editor/Surface/Archetypes/Boolean.cs index 268d7a360..73db196d6 100644 --- a/Source/Editor/Surface/Archetypes/Boolean.cs +++ b/Source/Editor/Surface/Archetypes/Boolean.cs @@ -58,11 +58,11 @@ namespace FlaxEditor.Surface.Archetypes public static NodeArchetype[] Nodes = { Op1(1, "Boolean NOT", "Negates the boolean value", new[] { "!", "~" }), - Op2(2, "Boolean AND", "Performs a logical conjunction on two values", new[] { "&&" }), - Op2(3, "Boolean OR", "Returns true if either (or both) of its operands is true", new[] { "||" }), - Op2(4, "Boolean XOR", "", new[] { "^" }), - Op2(5, "Boolean NOR", ""), - Op2(6, "Boolean NAND", ""), + Op2(2, "Boolean AND", "Performs a logical conjunction on two values. Returns true if both of its operands are true", new[] { "&&" }), + Op2(3, "Boolean OR", "Performs a logical disjunction on two values. Returns true if either (or both) of its operands is true", new[] { "||" }), + Op2(4, "Boolean XOR", "Performs a logical exclusive disjunction on two values. Returns true if both of its operands are different", new[] { "^" }), + Op2(5, "Boolean NOR", "Performs a logical disjunction on two values and negates it. Returns true if both of its operands are false"), + Op2(6, "Boolean NAND", "Performs a logical conjunction on two values and negates it. Returns true if either (or both) of its operands are false"), }; } } diff --git a/Source/Editor/Surface/Archetypes/Particles.cs b/Source/Editor/Surface/Archetypes/Particles.cs index 9166cb0d9..03df9a0a9 100644 --- a/Source/Editor/Surface/Archetypes/Particles.cs +++ b/Source/Editor/Surface/Archetypes/Particles.cs @@ -122,7 +122,7 @@ namespace FlaxEditor.Surface.Archetypes { Name = module.Title, Tag = module.TypeID, - TooltipText = $"{module.Signature}\n{module.Description}", + TooltipText = $"{(string.IsNullOrEmpty(module.Signature) ? module.Title : module.Signature)}\n{module.Description}", }); } cm.ItemClicked += item => AddModule((ushort)item.Tag); diff --git a/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs b/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs index 370025360..1d7b9fa8b 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs @@ -327,9 +327,9 @@ namespace FlaxEditor.Surface.ContextMenu private string GetTooltip() { StringBuilder sb = new StringBuilder(); - if (!string.IsNullOrEmpty(_archetype.Signature)) - sb.Append(_archetype.Signature + "\n"); - sb.Append(_archetype.Description); + sb.Append(string.IsNullOrEmpty(_archetype.Signature) ? _archetype.Title : _archetype.Signature); + if (!string.IsNullOrEmpty(_archetype.Description)) + sb.Append("\n" + _archetype.Description); return sb.ToString(); } diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs index 1dbb8424b..10f079579 100644 --- a/Source/Editor/Surface/SurfaceNode.cs +++ b/Source/Editor/Surface/SurfaceNode.cs @@ -855,9 +855,9 @@ namespace FlaxEditor.Surface private string GetTooltip() { StringBuilder sb = new StringBuilder(); - if (!string.IsNullOrEmpty(Archetype.Signature)) - sb.Append(Archetype.Signature + "\n"); - sb.Append(Archetype.Description); + sb.Append(string.IsNullOrEmpty(Archetype.Signature) ? Archetype.Title : Archetype.Signature); + if (!string.IsNullOrEmpty(Archetype.Description)) + sb.Append("\n" + Archetype.Description); return sb.ToString(); }