From 364a52337522b7eaf1d2d05aa7dd73aff997df2f Mon Sep 17 00:00:00 2001 From: Saas Date: Tue, 16 Sep 2025 22:04:24 +0200 Subject: [PATCH 1/5] hide TrackLabel control in editor --- Source/Editor/Windows/Profiler/Timeline.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Editor/Windows/Profiler/Timeline.cs b/Source/Editor/Windows/Profiler/Timeline.cs index c7a3dc7e6..ea653a5aa 100644 --- a/Source/Editor/Windows/Profiler/Timeline.cs +++ b/Source/Editor/Windows/Profiler/Timeline.cs @@ -100,6 +100,7 @@ namespace FlaxEditor.Windows.Profiler /// Timeline track label /// /// + [HideInEditor] public class TrackLabel : ContainerControl { /// From c124713e996ae63c56bd2c418fb473c3ca35be82 Mon Sep 17 00:00:00 2001 From: Saas Date: Tue, 16 Sep 2025 22:05:28 +0200 Subject: [PATCH 2/5] remove create new script items when searchbox is cleared --- .../Editor/CustomEditors/Dedicated/ScriptsEditor.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs index 123c7252a..bb3cdd9d4 100644 --- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs @@ -70,7 +70,7 @@ namespace FlaxEditor.CustomEditors.Dedicated var buttonHeight = (textSize.Y < 18) ? 18 : textSize.Y + 4; _addScriptsButton = new Button { - TooltipText = "Add new scripts to the actor", + TooltipText = "Add new scripts to the actor.", AnchorPreset = AnchorPresets.MiddleCenter, Text = buttonText, Parent = this, @@ -114,7 +114,16 @@ namespace FlaxEditor.CustomEditors.Dedicated cm.TextChanged += text => { if (!IsValidScriptName(text)) + { + // Remove NewScriptItems + List die = cm.ItemsPanel.Children.FindAll(c => c is NewScriptItem); + foreach (var c in die) + { + cm.ItemsPanel.RemoveChild(c); + } + return; + } if (!cm.ItemsPanel.Children.Any(x => x.Visible && x is not NewScriptItem)) { // If there are no visible items, that means the search failed so we can find the create script button or create one if it's the first time @@ -876,7 +885,7 @@ namespace FlaxEditor.CustomEditors.Dedicated // Add drag button to the group var scriptDrag = new DragImage { - TooltipText = "Script reference", + TooltipText = "Script reference.", AutoFocus = true, IsScrollable = false, Color = FlaxEngine.GUI.Style.Current.ForegroundGrey, From eea44ac89753bca4a1985f7cc50270e0f03d01af Mon Sep 17 00:00:00 2001 From: Saas Date: Tue, 16 Sep 2025 22:06:49 +0200 Subject: [PATCH 3/5] remove search query highlights showing on create new script item --- Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs | 1 + Source/Editor/GUI/ItemsListContextMenu.cs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs index bb3cdd9d4..01e221755 100644 --- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs @@ -36,6 +36,7 @@ namespace FlaxEditor.CustomEditors.Dedicated { ScriptName = scriptName; TooltipText = "Create a new script"; + DrawHighlights = false; } } diff --git a/Source/Editor/GUI/ItemsListContextMenu.cs b/Source/Editor/GUI/ItemsListContextMenu.cs index 8fdf21e4c..033af782f 100644 --- a/Source/Editor/GUI/ItemsListContextMenu.cs +++ b/Source/Editor/GUI/ItemsListContextMenu.cs @@ -51,6 +51,11 @@ namespace FlaxEditor.GUI /// public float SortScore; + /// + /// Wether the query highlights should be draw. + /// + public bool DrawHighlights = true; + /// /// Occurs when items gets clicked by the user. /// @@ -165,7 +170,7 @@ namespace FlaxEditor.GUI Render2D.FillRectangle(new Rectangle(Float2.Zero, Size), style.BackgroundHighlighted); // Draw all highlights - if (_highlights != null) + if (DrawHighlights && _highlights != null) { var color = style.ProgressNormal * 0.6f; for (int i = 0; i < _highlights.Count; i++) From de2ee36529b748e0bea700862be63a20d2412553 Mon Sep 17 00:00:00 2001 From: Saas Date: Tue, 16 Sep 2025 22:07:42 +0200 Subject: [PATCH 4/5] fix naming lol --- Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs index 01e221755..356ae5ee4 100644 --- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs +++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs @@ -117,10 +117,10 @@ namespace FlaxEditor.CustomEditors.Dedicated if (!IsValidScriptName(text)) { // Remove NewScriptItems - List die = cm.ItemsPanel.Children.FindAll(c => c is NewScriptItem); - foreach (var c in die) + List newScriptItems = cm.ItemsPanel.Children.FindAll(c => c is NewScriptItem); + foreach (var item in newScriptItems) { - cm.ItemsPanel.RemoveChild(c); + cm.ItemsPanel.RemoveChild(item); } return; From 553a00750842bc57ecc3ddcee16b04d46502210c Mon Sep 17 00:00:00 2001 From: Saas Date: Tue, 16 Sep 2025 22:14:22 +0200 Subject: [PATCH 5/5] Revert "hide TrackLabel control in editor" This reverts commit 364a52337522b7eaf1d2d05aa7dd73aff997df2f. --- Source/Editor/Windows/Profiler/Timeline.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/Editor/Windows/Profiler/Timeline.cs b/Source/Editor/Windows/Profiler/Timeline.cs index ea653a5aa..c7a3dc7e6 100644 --- a/Source/Editor/Windows/Profiler/Timeline.cs +++ b/Source/Editor/Windows/Profiler/Timeline.cs @@ -100,7 +100,6 @@ namespace FlaxEditor.Windows.Profiler /// Timeline track label /// /// - [HideInEditor] public class TrackLabel : ContainerControl { ///