diff --git a/Source/Editor/Surface/Archetypes/Boolean.cs b/Source/Editor/Surface/Archetypes/Boolean.cs index 0c5d41a60..268d7a360 100644 --- a/Source/Editor/Surface/Archetypes/Boolean.cs +++ b/Source/Editor/Surface/Archetypes/Boolean.cs @@ -60,7 +60,7 @@ namespace FlaxEditor.Surface.Archetypes 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(4, "Boolean XOR", "", new[] { "^" }), Op2(5, "Boolean NOR", ""), Op2(6, "Boolean NAND", ""), }; diff --git a/Source/Editor/Surface/Archetypes/Math.cs b/Source/Editor/Surface/Archetypes/Math.cs index d0284d6fa..cdbcaac03 100644 --- a/Source/Editor/Surface/Archetypes/Math.cs +++ b/Source/Editor/Surface/Archetypes/Math.cs @@ -114,10 +114,10 @@ namespace FlaxEditor.Surface.Archetypes Op1(13, "Round", "Rounds A to the nearest integer"), Op1(14, "Saturate", "Clamps A to the range [0, 1]"), Op1(15, "Sine", "Returns sine of A"), - Op1(16, "Sqrt", "Returns square root of A", new [] { "Square Root", "Square", "Root" }), + Op1(16, "Sqrt", "Returns square root of A", new[] { "Square Root", "Square", "Root" }), Op1(17, "Tangent", "Returns tangent of A"), Op2(18, "Cross", "Returns the cross product of A and B", ConnectionsHint.None, typeof(Float3)), - Op2(19, "Distance", "Returns a distance scalar between A and B", new [] { "Magnitude", "Mag", "Length" }, ConnectionsHint.Vector, null, typeof(float), false), + Op2(19, "Distance", "Returns a distance scalar between A and B", new[] { "Magnitude", "Mag", "Length" }, ConnectionsHint.Vector, null, typeof(float), false), Op2(20, "Dot", "Returns the dot product of A and B", ConnectionsHint.Vector, null, typeof(float), false), Op2(21, "Max", "Selects the greater of A and B"), Op2(22, "Min", "Selects the lesser of A and B"), @@ -192,7 +192,7 @@ namespace FlaxEditor.Surface.Archetypes } }, // - Op1(27, "Negate", "Returns opposite value", new [] { "Invert" }), + Op1(27, "Negate", "Returns opposite value", new[] { "Invert" }), Op1(28, "One Minus", "Returns 1 - value"), // new NodeArchetype @@ -232,7 +232,7 @@ namespace FlaxEditor.Surface.Archetypes { TypeID = 31, Title = "Mad", - AlternativeTitles = new [] { "Multiply", "Add", "*+" }, + AlternativeTitles = new[] { "Multiply", "Add", "*+" }, Description = "Performs value multiplication and addition at once", Flags = NodeFlags.AllGraphs, Size = new Float2(160, 60), diff --git a/Source/Editor/Surface/Archetypes/Tools.cs b/Source/Editor/Surface/Archetypes/Tools.cs index 7e5fc36db..ee2bf4718 100644 --- a/Source/Editor/Surface/Archetypes/Tools.cs +++ b/Source/Editor/Surface/Archetypes/Tools.cs @@ -1193,7 +1193,7 @@ namespace FlaxEditor.Surface.Archetypes _isMouseInConnectingBounds = false; Cursor = CursorType.Default; - + base.OnMouseLeave(); } @@ -1494,7 +1494,7 @@ namespace FlaxEditor.Surface.Archetypes { TypeID = 11, Title = "Comment", - AlternativeTitles = new[] { "//" , "Group" }, + AlternativeTitles = new[] { "//", "Group" }, TryParseText = (string filterText, out object[] data) => { data = null; @@ -1650,7 +1650,7 @@ namespace FlaxEditor.Surface.Archetypes { TypeID = 22, Title = "As", - AlternativeTitles = new [] { "Cast" }, + AlternativeTitles = new[] { "Cast" }, Create = (id, context, arch, groupArch) => new AsNode(id, context, arch, groupArch), Description = "Casts the object to a different type. Returns null if cast fails.", Flags = NodeFlags.VisualScriptGraph | NodeFlags.AnimGraph, diff --git a/Source/Editor/Surface/ContextMenu/VisjectCM.cs b/Source/Editor/Surface/ContextMenu/VisjectCM.cs index c7c33094f..ae4cef3dc 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCM.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCM.cs @@ -307,7 +307,7 @@ namespace FlaxEditor.Surface.ContextMenu if (!IsLayoutLocked) { group.UnlockChildrenRecursive(); - if(_contextSensitiveSearchEnabled && _selectedBox != null) + if (_contextSensitiveSearchEnabled && _selectedBox != null) UpdateFilters(); else SortGroups(); @@ -370,7 +370,7 @@ namespace FlaxEditor.Surface.ContextMenu if (!isLayoutLocked) { - if(_contextSensitiveSearchEnabled && _selectedBox != null) + if (_contextSensitiveSearchEnabled && _selectedBox != null) UpdateFilters(); else SortGroups(); @@ -567,7 +567,7 @@ namespace FlaxEditor.Surface.ContextMenu } UnlockChildrenRecursive(); - if(_contextSensitiveSearchEnabled && _selectedBox != null) + if (_contextSensitiveSearchEnabled && _selectedBox != null) UpdateFilters(); else SortGroups(); diff --git a/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs b/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs index bffb0e7e3..9d582c491 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs @@ -219,7 +219,7 @@ namespace FlaxEditor.Surface.ContextMenu } // Check archetype synonyms - if (_archetype.AlternativeTitles!= null && _archetype.AlternativeTitles.Any(altTitle => QueryFilterHelper.Match(filterText, altTitle, out ranges))) + if (_archetype.AlternativeTitles != null && _archetype.AlternativeTitles.Any(altTitle => QueryFilterHelper.Match(filterText, altTitle, out ranges))) { // Update highlights if (_highlights == null) diff --git a/Source/Editor/Surface/SurfaceComment.cs b/Source/Editor/Surface/SurfaceComment.cs index e98a94a67..86b68da4e 100644 --- a/Source/Editor/Surface/SurfaceComment.cs +++ b/Source/Editor/Surface/SurfaceComment.cs @@ -69,7 +69,7 @@ namespace FlaxEditor.Surface public SurfaceComment(uint id, VisjectSurfaceContext context, NodeArchetype nodeArch, GroupArchetype groupArch) : base(id, context, nodeArch, groupArch) { - _renameTextBox = new TextBox(false, 0,0, Width) + _renameTextBox = new TextBox(false, 0, 0, Width) { Height = Constants.NodeHeaderSize, Visible = false, @@ -96,7 +96,7 @@ namespace FlaxEditor.Surface IndexInParent = 0; OrderValue = IndexInParent; } - else if(OrderValue != -1) + else if (OrderValue != -1) { IndexInParent = OrderValue; } @@ -110,7 +110,7 @@ namespace FlaxEditor.Surface // Randomize color Color = ColorValue = Color.FromHSV(new Random().NextFloat(0, 360), 0.7f, 0.25f, 0.8f); - if(OrderValue == -1) + if (OrderValue == -1) OrderValue = Context.CommentCount - 1; IndexInParent = OrderValue; } @@ -196,7 +196,7 @@ namespace FlaxEditor.Surface // Header Render2D.FillRectangle(_headerRect, headerColor); - if(!_isRenaming) + if (!_isRenaming) Render2D.DrawText(style.FontLarge, Title, _headerRect, style.Foreground, TextAlignment.Center, TextAlignment.Center); // Close button @@ -344,7 +344,7 @@ namespace FlaxEditor.Surface private void Rename(string newTitle) { - if(string.Equals(Title, newTitle, StringComparison.Ordinal)) + if (string.Equals(Title, newTitle, StringComparison.Ordinal)) return; Title = TitleValue = newTitle; @@ -361,7 +361,7 @@ namespace FlaxEditor.Surface return true; } - if(key == KeyboardKeys.Escape) + if (key == KeyboardKeys.Escape) { StopRenaming(); return true; @@ -415,18 +415,18 @@ namespace FlaxEditor.Surface { cmOrder.ContextMenu.AddButton("Bring Forward", () => { - if(IndexInParent < Context.CommentCount-1) + if (IndexInParent < Context.CommentCount - 1) IndexInParent++; OrderValue = IndexInParent; }); cmOrder.ContextMenu.AddButton("Bring to Front", () => { - IndexInParent = Context.CommentCount-1; + IndexInParent = Context.CommentCount - 1; OrderValue = IndexInParent; }); cmOrder.ContextMenu.AddButton("Send Backward", () => { - if(IndexInParent > 0) + if (IndexInParent > 0) IndexInParent--; OrderValue = IndexInParent; });