diff --git a/Source/Editor/GUI/Docking/DockWindow.cs b/Source/Editor/GUI/Docking/DockWindow.cs
index 1a28b1307..0d58c00a5 100644
--- a/Source/Editor/GUI/Docking/DockWindow.cs
+++ b/Source/Editor/GUI/Docking/DockWindow.cs
@@ -241,7 +241,7 @@ namespace FlaxEditor.GUI.Docking
///
public void FocusOrShow()
{
- FocusOrShow(DockState.Float);
+ FocusOrShow((DockState)Editor.Instance.Options.Options.Interface.NewWindowMethod);
}
///
diff --git a/Source/Editor/Options/InterfaceOptions.cs b/Source/Editor/Options/InterfaceOptions.cs
index 121361a2c..eb0e0e762 100644
--- a/Source/Editor/Options/InterfaceOptions.cs
+++ b/Source/Editor/Options/InterfaceOptions.cs
@@ -1,6 +1,7 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
+using FlaxEditor.GUI.Docking;
using FlaxEngine;
namespace FlaxEditor.Options
@@ -36,6 +37,42 @@ namespace FlaxEditor.Options
///
TimeSinceStartup,
}
+
+ ///
+ /// A proxy DockState for window open method.
+ ///
+ public enum DockStateProxy
+ {
+ ///
+ /// The floating window.
+ ///
+ Float = DockState.Float,
+
+ ///
+ /// The dock fill as a tab.
+ ///
+ DockFill = DockState.DockFill,
+
+ ///
+ /// The dock left.
+ ///
+ DockLeft = DockState.DockLeft,
+
+ ///
+ /// The dock right.
+ ///
+ DockRight = DockState.DockRight,
+
+ ///
+ /// The dock top.
+ ///
+ DockTop = DockState.DockTop,
+
+ ///
+ /// The dock bottom.
+ ///
+ DockBottom = DockState.DockBottom
+ }
///
/// Gets or sets the Editor User Interface scale. Applied to all UI elements, windows and text. Can be used to scale the interface up on a bigger display. Editor restart required.
@@ -69,6 +106,13 @@ namespace FlaxEditor.Options
[EditorDisplay("Interface", "Center Mouse On Game Window Focus"), EditorOrder(100), Tooltip("Determines whether center mouse position on window focus in play mode. Helps when working with games that lock mouse cursor.")]
public bool CenterMouseOnGameWinFocus { get; set; } = false;
+ ///
+ /// Gets or sets the method window opening.
+ ///
+ [DefaultValue(DockStateProxy.Float)]
+ [EditorDisplay("Interface", "Define The Opening Window Method"), EditorOrder(150), Tooltip("Define the opening method for new windows, open in a new tab by default.")]
+ public DockStateProxy NewWindowMethod { get; set; } = DockStateProxy.Float;
+
///
/// Gets or sets the timestamps prefix mode for debug log messages.
///