diff --git a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
index 1a4bcab4d..f4423c6c6 100644
--- a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
@@ -557,7 +557,7 @@ namespace FlaxEditor.CustomEditors.Editors
MinValue = _minCount,
MaxValue = _maxCount,
AnchorPreset = AnchorPresets.TopRight,
- Bounds = new Rectangle(-40 - dropPanel.ItemsMargin.Right, y, 40, height),
+ Bounds = new Rectangle(-55 - dropPanel.ItemsMargin.Right, y, 55, height),
Parent = dropPanel,
};
@@ -566,7 +566,7 @@ namespace FlaxEditor.CustomEditors.Editors
Text = "Size",
AnchorPreset = AnchorPresets.TopRight,
Bounds = new Rectangle(-_sizeBox.Width - 40 - dropPanel.ItemsMargin.Right - 2, y, 40, height),
- Parent = dropPanel
+ Parent = dropPanel,
};
if (!_canResize || (NotNullItems && size == 0))
diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs
index 967ac1cec..15fee5e23 100644
--- a/Source/Editor/Modules/WindowsModule.cs
+++ b/Source/Editor/Modules/WindowsModule.cs
@@ -821,17 +821,18 @@ namespace FlaxEditor.Modules
}
internal void AddToRestore(CustomEditorWindow win)
- {
- AddToRestore(win.Window, win.GetType(), new WindowRestoreData());
- }
-
- private void AddToRestore(EditorWindow win, Type type, WindowRestoreData winData)
{
// Validate if can restore type
+ var type = win.GetType();
var constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, Type.EmptyTypes, null);
if (constructor == null || type.IsGenericType)
return;
+ AddToRestore(win.Window, type, new WindowRestoreData());
+ }
+
+ private void AddToRestore(EditorWindow win, Type type, WindowRestoreData winData)
+ {
var panel = win.ParentDockPanel;
// Ensure that this window is only selected following recompilation
diff --git a/Source/Editor/Options/InterfaceOptions.cs b/Source/Editor/Options/InterfaceOptions.cs
index 3b80cd63c..9c0ed17dc 100644
--- a/Source/Editor/Options/InterfaceOptions.cs
+++ b/Source/Editor/Options/InterfaceOptions.cs
@@ -346,13 +346,6 @@ namespace FlaxEditor.Options
}
}
- ///
- /// Gets or sets the output log text color.
- ///
- [DefaultValue(typeof(Color), "1,1,1,1")]
- [EditorDisplay("Output Log", "Text Color"), EditorOrder(430), Tooltip("The output log text color.")]
- public Color OutputLogTextColor { get; set; } = Color.White;
-
///
/// Gets or sets the output log text shadow color.
///
@@ -379,22 +372,6 @@ namespace FlaxEditor.Options
}
}
- ///
- /// Gets or sets the output log text color for warnings
- ///
- [DefaultValue(typeof(Color), "1,1,0,1")]
- [EditorDisplay("Output Log", "Warning Color"), EditorOrder(446), Tooltip("The output log text color for warnings.")]
- public Color OutputLogWarningTextColor { get; set; } = Color.Yellow;
-
-
- ///
- /// Gets or sets the output log text color for errors
- ///
- [DefaultValue(typeof(Color), "1,0,0,1")]
- [EditorDisplay("Output Log", "Error Color"), EditorOrder(445), Tooltip("The output log text color for errors.")]
- public Color OutputLogErrorTextColor { get; set; } = Color.Red;
-
-
///
/// Gets or sets a value indicating whether auto-focus output log window on code compilation error.
///
diff --git a/Source/Editor/Options/VisualOptions.cs b/Source/Editor/Options/VisualOptions.cs
index 4f014ae16..9912141b8 100644
--- a/Source/Editor/Options/VisualOptions.cs
+++ b/Source/Editor/Options/VisualOptions.cs
@@ -94,5 +94,33 @@ namespace FlaxEditor.Options
[DefaultValue(true)]
[EditorDisplay("Preview"), EditorOrder(1000)]
public bool EnableParticlesPreview { get; set; } = true;
+
+ ///
+ /// Gets or sets the output log text color.
+ ///
+ [DefaultValue(typeof(Color), "1,1,1,1")]
+ [EditorDisplay("Log", "Info Color"), EditorOrder(1500), Tooltip("The color used for info messages in the Debug and Output Log.")]
+ public Color LogInfoColor { get; set; } = Color.White;
+
+ ///
+ /// Gets or sets the output log text color for warnings
+ ///
+ [DefaultValue(typeof(Color), "1,1,0,1")]
+ [EditorDisplay("Log", "Warning Color"), EditorOrder(1501), Tooltip("The color used for warnings in the Debug and Output Log.")]
+ public Color LogWarningColor { get; set; } = Color.Yellow;
+
+ ///
+ /// Gets or sets the output log text color for errors
+ ///
+ [DefaultValue(typeof(Color), "1,0,0,1")]
+ [EditorDisplay("Log", "Error Color"), EditorOrder(1502), Tooltip("The color used for errors in the Debug and Output Log.")]
+ public Color LogErrorColor { get; set; } = Color.Red;
+
+ ///
+ /// Gets or sets a value wether the Debug Log entry text color should use the set color.
+ ///
+ [DefaultValue(true)]
+ [EditorDisplay("Log", "Color Debug Log Text"), EditorOrder(1503), Tooltip("Wether to use the set colors in the text of a Debug Log entry.")]
+ public bool ColorDebugLogText = true;
}
}
diff --git a/Source/Editor/Windows/Assets/JsonAssetWindow.cs b/Source/Editor/Windows/Assets/JsonAssetWindow.cs
index e1bd19609..a6282e4b5 100644
--- a/Source/Editor/Windows/Assets/JsonAssetWindow.cs
+++ b/Source/Editor/Windows/Assets/JsonAssetWindow.cs
@@ -221,6 +221,7 @@ namespace FlaxEditor.Windows.Assets
{
Text = $"{Asset.DataTypeName}",
TooltipText = "Asset data type (full name)",
+ Pivot = Float2.Zero,
AnchorPreset = AnchorPresets.TopRight,
AutoWidth = true,
Parent = this,
diff --git a/Source/Editor/Windows/DebugLogWindow.cs b/Source/Editor/Windows/DebugLogWindow.cs
index eaf5b792f..e05dfc091 100644
--- a/Source/Editor/Windows/DebugLogWindow.cs
+++ b/Source/Editor/Windows/DebugLogWindow.cs
@@ -125,7 +125,12 @@ namespace FlaxEditor.Windows
// Background
if (_window._selected == this)
- Render2D.FillRectangle(clientRect, IsFocused ? style.BackgroundSelected : style.LightBackground);
+ {
+ Render2D.FillRectangle(clientRect, style.LightBackground);
+ // Small rectangle to signal that entry is selected
+ Rectangle selectionHighlightRect = clientRect with { Width = 5 };
+ Render2D.FillRectangle(selectionHighlightRect, style.BackgroundSelected);
+ }
else if (IsMouseOver)
Render2D.FillRectangle(clientRect, style.BackgroundHighlighted);
else if (index % 2 == 0)
@@ -134,18 +139,19 @@ namespace FlaxEditor.Windows
var color = Group == LogGroup.Error ? _window._colorError : (Group == LogGroup.Warning ? _window._colorWarning : _window._colorInfo);
// Icon
- Render2D.DrawSprite(Icon, new Rectangle(5, 0, 32, 32), color);
+ Render2D.DrawSprite(Icon, new Rectangle(8, 0, 32, 32), color);
// Title
- var textRect = new Rectangle(38, 2, clientRect.Width - 40, clientRect.Height - 10);
+ var textRect = new Rectangle(43, 2, clientRect.Width - 40, clientRect.Height - 10);
Render2D.PushClip(ref clientRect);
+ bool coloredText = _window._colorDebugLogText;
if (LogCount == 1)
{
- Render2D.DrawText(style.FontMedium, Desc.Title, textRect, color);
+ Render2D.DrawText(style.FontMedium, Desc.Title, textRect, coloredText ? color : style.Foreground);
}
else if (LogCount > 1)
{
- Render2D.DrawText(style.FontMedium, $"{Desc.Title} ({LogCount})", textRect, color);
+ Render2D.DrawText(style.FontMedium, $"{Desc.Title} ({LogCount})", textRect, coloredText ? color : style.Foreground);
}
Render2D.PopClip();
}
@@ -311,7 +317,8 @@ namespace FlaxEditor.Windows
private Color _colorInfo;
private Color _colorWarning;
private Color _colorError;
-
+ private bool _colorDebugLogText;
+
///
/// Initializes a new instance of the class.
///
@@ -384,6 +391,7 @@ namespace FlaxEditor.Windows
VerticalAlignment = TextAlignment.Near,
HorizontalAlignment = TextAlignment.Near,
Offsets = Margin.Zero,
+ Pivot = Float2.Zero,
};
// Entries panel
@@ -419,9 +427,10 @@ namespace FlaxEditor.Windows
_groupButtons[0].Checked = options.Interface.DebugLogShowErrorMessages;
_groupButtons[1].Checked = options.Interface.DebugLogShowWarningMessages;
_groupButtons[2].Checked = options.Interface.DebugLogShowInfoMessages;
- _colorInfo = options.Interface.OutputLogTextColor;
- _colorWarning = options.Interface.OutputLogWarningTextColor;
- _colorError = options.Interface.OutputLogErrorTextColor;
+ _colorInfo = options.Visual.LogInfoColor;
+ _colorWarning = options.Visual.LogWarningColor;
+ _colorError = options.Visual.LogErrorColor;
+ _colorDebugLogText = options.Visual.ColorDebugLogText;
}
///
@@ -707,13 +716,13 @@ namespace FlaxEditor.Windows
// Scroll to the new entry (if any added to view)
if (scrollView && anyVisible)
{
- panelScroll.ScrollViewTo(newEntry);
+ panelScroll.ScrollViewTo(newEntry, true);
bool scrollViewNew = (panelScroll.VScrollBar.Maximum - panelScroll.VScrollBar.TargetValue) < LogEntry.DefaultHeight * 1.5f;
if (scrollViewNew != scrollView)
{
// Make sure scrolling doesn't stop in case too many entries were added at once
- panelScroll.ScrollViewTo(new Float2(float.MaxValue, float.MaxValue));
+ panelScroll.ScrollViewTo(new Float2(float.MaxValue, float.MaxValue), true);
}
}
}
diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs
index 69359b349..8c2390451 100644
--- a/Source/Editor/Windows/OutputLogWindow.cs
+++ b/Source/Editor/Windows/OutputLogWindow.cs
@@ -594,26 +594,26 @@ namespace FlaxEditor.Windows
if (options.Interface.OutputLogTimestampsFormat == _timestampsFormats &&
options.Interface.OutputLogShowLogType == _showLogType &&
_output.DefaultStyle.Font == options.Interface.OutputLogTextFont &&
- _output.DefaultStyle.Color == options.Interface.OutputLogTextColor &&
+ _output.DefaultStyle.Color == options.Visual.LogInfoColor &&
_output.DefaultStyle.ShadowColor == options.Interface.OutputLogTextShadowColor &&
_output.DefaultStyle.ShadowOffset == options.Interface.OutputLogTextShadowOffset &&
- _output.WarningStyle.Color == options.Interface.OutputLogWarningTextColor &&
- _output.ErrorStyle.Color == options.Interface.OutputLogErrorTextColor)
+ _output.WarningStyle.Color == options.Visual.LogWarningColor &&
+ _output.ErrorStyle.Color == options.Visual.LogErrorColor)
return;
_output.DefaultStyle = new TextBlockStyle
{
Font = options.Interface.OutputLogTextFont,
- Color = options.Interface.OutputLogTextColor,
+ Color = options.Visual.LogInfoColor,
ShadowColor = options.Interface.OutputLogTextShadowColor,
ShadowOffset = options.Interface.OutputLogTextShadowOffset,
BackgroundSelectedBrush = new SolidColorBrush(Style.Current.BackgroundSelected),
};
_output.WarningStyle = _output.DefaultStyle;
- _output.WarningStyle.Color = options.Interface.OutputLogWarningTextColor;
+ _output.WarningStyle.Color = options.Visual.LogWarningColor;
_output.ErrorStyle = _output.DefaultStyle;
- _output.ErrorStyle.Color = options.Interface.OutputLogErrorTextColor;
+ _output.ErrorStyle.Color = options.Visual.LogErrorColor;
_timestampsFormats = options.Interface.OutputLogTimestampsFormat;
_showLogType = options.Interface.OutputLogShowLogType;
diff --git a/Source/Editor/Windows/PluginsWindow.cs b/Source/Editor/Windows/PluginsWindow.cs
index 282c1dfe9..83e5c23a3 100644
--- a/Source/Editor/Windows/PluginsWindow.cs
+++ b/Source/Editor/Windows/PluginsWindow.cs
@@ -110,7 +110,7 @@ namespace FlaxEditor.Windows
AnchorPreset = AnchorPresets.TopRight,
Text = versionString,
Parent = this,
- Bounds = new Rectangle(Width - 140 - margin - xOffset, margin, 140, 14),
+ Bounds = new Rectangle(Width - 140 - margin, margin, 140, 14),
};
string url = null;
@@ -130,7 +130,7 @@ namespace FlaxEditor.Windows
AnchorPreset = AnchorPresets.TopRight,
Text = desc.Author,
Parent = this,
- Bounds = new Rectangle(Width - authorWidth - margin - xOffset, versionLabel.Bottom + margin, authorWidth, 14),
+ Bounds = new Rectangle(Width - authorWidth - margin, versionLabel.Bottom + margin, authorWidth, 14),
};
if (url != null)
{
@@ -245,6 +245,7 @@ namespace FlaxEditor.Windows
Text = "Name",
HorizontalAlignment = TextAlignment.Near,
};
+ nameLabel.LocalX -= 10;
nameLabel.LocalY += 10;
var nameTextBox = new TextBox
@@ -291,7 +292,7 @@ namespace FlaxEditor.Windows
Text = "Git Path",
HorizontalAlignment = TextAlignment.Near,
};
- gitPathLabel.LocalX += (300 - gitPathLabel.Width) * 0.5f;
+ gitPathLabel.LocalX += (250 - gitPathLabel.Width) * 0.5f;
gitPathLabel.LocalY += 35;
var gitPathTextBox = new TextBox
diff --git a/Source/Editor/Windows/Search/ContentFinder.cs b/Source/Editor/Windows/Search/ContentFinder.cs
index c6522255b..2d196cde6 100644
--- a/Source/Editor/Windows/Search/ContentFinder.cs
+++ b/Source/Editor/Windows/Search/ContentFinder.cs
@@ -161,7 +161,8 @@ namespace FlaxEditor.Windows.Search
// Setup
_resultPanel.ScrollViewTo(Float2.Zero);
- _searchBox.Text = string.Empty;
+ // Select the text in the search bar so that the user can just start typing
+ _searchBox.SelectAll();
_searchBox.Focus();
}