diff --git a/Source/Editor/Surface/ContextMenu/VisjectCM.cs b/Source/Editor/Surface/ContextMenu/VisjectCM.cs index 9551f0f34..85b68dcfa 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCM.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCM.cs @@ -126,12 +126,34 @@ namespace FlaxEditor.Surface.ContextMenu _parameterSetNodeArchetype = info.ParameterSetNodeArchetype ?? Archetypes.Parameters.Nodes[3]; // Context menu dimensions - Size = new Float2(320, 220); + Size = new Float2(320, 248); + + var headerPanel = new Panel(ScrollBars.None) + { + Parent = this, + Height = 20, + Width = Width - 4, + X = 2, + Y = 1, + BackgroundColor = Style.Current.BackgroundNormal, + }; + // Title bar + var titleLabel = new Label + { + Width = Width - 8, + Height = 20, + X = 4, + Y = 1, + Parent = headerPanel, + Text = "Select Node", + HorizontalAlignment = TextAlignment.Near, + Font = new FontReference(Style.Current.FontLarge.Asset, 10), + }; // Search box - _searchBox = new SearchBox(false, 1, 1) + _searchBox = new SearchBox(false, 2, 22) { - Width = Width - 3, + Width = Width - 4, Parent = this }; _searchBox.TextChanged += OnSearchFilterChanged; @@ -548,6 +570,8 @@ namespace FlaxEditor.Surface.ContextMenu }; var group = CreateGroup(groupArchetype); + group.ArrowImageOpened = new SpriteBrush(Style.Current.ArrowDown); + group.ArrowImageClosed = new SpriteBrush(Style.Current.ArrowRight); group.Close(false); archetypeIndex = 0; for (int i = 0; i < parameters.Count; i++) diff --git a/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs b/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs index 28014f897..c0a23c9fb 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCMGroup.cs @@ -46,6 +46,10 @@ namespace FlaxEditor.Surface.ContextMenu ContextMenu = cm; Archetypes.Add(archetype); Name = archetype.Name; + EnableDropDownIcon = true; + HeaderColor = Style.Current.Background; + ArrowImageOpened = new SpriteBrush(Style.Current.ArrowDown); + ArrowImageClosed = new SpriteBrush(Style.Current.ArrowRight); } /// diff --git a/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs b/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs index e066de380..3ee45e278 100644 --- a/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs +++ b/Source/Editor/Surface/ContextMenu/VisjectCMItem.cs @@ -192,7 +192,7 @@ namespace FlaxEditor.Surface.ContextMenu { var style = Style.Current; var rect = new Rectangle(Float2.Zero, Size); - var textRect = new Rectangle(2, 0, rect.Width - 4, rect.Height); + var textRect = new Rectangle(22, 0, rect.Width - 24, rect.Height); var showScoreHit = SortScore > 0.1f; // Overlay