Merge branch 'master' into 1.5

# Conflicts:
#	Content/Shaders/GI/DDGI.flax
#	Content/Shaders/GI/GlobalSurfaceAtlas.flax
#	Content/Shaders/TAA.flax
#	Content/Shaders/VolumetricFog.flax
#	Source/Editor/Utilities/Utils.cs
This commit is contained in:
Wojtek Figat
2022-12-28 16:59:11 +01:00
54 changed files with 245 additions and 99 deletions

View File

@@ -93,6 +93,7 @@ namespace FlaxEditor.Windows
"Stefan Brandmair",
"Lukáš Jech",
"Jean-Baptiste Perrier",
"Chandler Cox",
});
authors.Sort();
var authorsLabel = new Label(4, topParentControl.Bottom + 20, Width - 8, 70)

View File

@@ -6,6 +6,7 @@ using FlaxEditor.Content;
using FlaxEditor.CustomEditors;
using FlaxEditor.Gizmo;
using FlaxEditor.GUI;
using FlaxEditor.GUI.Input;
using FlaxEditor.SceneGraph;
using FlaxEditor.Viewport;
using FlaxEngine;
@@ -124,10 +125,9 @@ namespace FlaxEditor.Windows.Assets
IsScrollable = false,
Offsets = new Margin(0, 0, 0, 18 + 6),
};
_searchBox = new TextBox
_searchBox = new SearchBox()
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = headerPanel,
Bounds = new Rectangle(4, 4, headerPanel.Width - 8, 18),
};

View File

@@ -113,10 +113,9 @@ namespace FlaxEditor.Windows
IsScrollable = false,
Offsets = new Margin(0, 0, 0, 18 + 6),
};
_foldersSearchBox = new TextBox
_foldersSearchBox = new SearchBox
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = headerPanel,
Bounds = new Rectangle(4, 4, headerPanel.Width - 8, 18),
};
@@ -149,10 +148,9 @@ namespace FlaxEditor.Windows
Parent = _split.Panel2,
};
const float viewDropdownWidth = 50.0f;
_itemsSearchBox = new TextBox
_itemsSearchBox = new SearchBox
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = contentItemsSearchPanel,
Bounds = new Rectangle(viewDropdownWidth + 8, 4, contentItemsSearchPanel.Width - 12 - viewDropdownWidth, 18),
};
@@ -837,13 +835,20 @@ namespace FlaxEditor.Windows
};
_root.Expand(true);
// Add game project on top, plugins in the middle and engine at bottom
_root.AddChild(Editor.ContentDatabase.Game);
foreach (var project in Editor.ContentDatabase.Projects)
{
project.SortChildrenRecursive();
if (project == Editor.ContentDatabase.Game || project == Editor.ContentDatabase.Engine)
continue;
_root.AddChild(project);
}
_root.AddChild(Editor.ContentDatabase.Engine);
Editor.ContentDatabase.Game?.Expand(true);
_tree.Margin = new Margin(0.0f, 0.0f, -16.0f, 2.0f); // Hide root node
_tree.AddChild(_root);
_root.SortChildrenRecursive();
// Setup navigation
_navigationUnlocked = true;

View File

@@ -7,6 +7,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Input;
using FlaxEditor.Options;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -157,9 +158,8 @@ namespace FlaxEditor.Windows
Parent = this,
};
_viewDropdown.Clicked += OnViewButtonClicked;
_searchBox = new TextBox(false, _viewDropdown.Right + 2, 2, Width - _viewDropdown.Right - 2 - _scrollSize)
_searchBox = new SearchBox(false, _viewDropdown.Right + 2, 2, Width - _viewDropdown.Right - 2 - _scrollSize)
{
WatermarkText = "Search...",
Parent = this,
};
_searchBox.TextChanged += Refresh;

View File

@@ -6,6 +6,7 @@ using FlaxEditor.Gizmo;
using FlaxEditor.Content;
using FlaxEditor.GUI.Tree;
using FlaxEditor.GUI.Drag;
using FlaxEditor.GUI.Input;
using FlaxEditor.SceneGraph;
using FlaxEditor.SceneGraph.GUI;
using FlaxEditor.Scripting;
@@ -49,10 +50,9 @@ namespace FlaxEditor.Windows
IsScrollable = false,
Offsets = new Margin(0, 0, 0, 18 + 6),
};
_searchBox = new TextBox
_searchBox = new SearchBox
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = headerPanel,
Bounds = new Rectangle(4, 4, headerPanel.Width - 8, 18),
};

View File

@@ -10,6 +10,7 @@ using FlaxEditor;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Docking;
using FlaxEditor.GUI.Input;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Scripting;
using FlaxEditor.Surface;
@@ -224,10 +225,9 @@ namespace FlaxEngine.Windows.Search
Parent = topPanel,
};
optionsButton.ButtonClicked += OnOptionsDropdownClicked;
_searchBox = new TextBox
_searchBox = new SearchBox
{
AnchorPreset = AnchorPresets.HorizontalStretchMiddle,
WatermarkText = "Search...",
Parent = topPanel,
Bounds = new Rectangle(optionsButton.Right + 2.0f, 2, topPanel.Width - 4.0f - optionsButton.Width, 18.0f),
};

View File

@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using FlaxEditor.GUI.Input;
using FlaxEditor.GUI.Tabs;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Scripting;
@@ -130,10 +131,9 @@ namespace FlaxEditor.Windows
};
_groupSearch = CreateGroupWithList(_actorGroups, "Search", 26);
_searchBox = new TextBox
_searchBox = new SearchBox
{
AnchorPreset = AnchorPresets.HorizontalStretchTop,
WatermarkText = "Search...",
Parent = _groupSearch.Parent.Parent,
Bounds = new Rectangle(4, 4, _actorGroups.Width - 8, 18),
};