Create new option for open method window

This commit is contained in:
HosRa
2021-08-05 12:20:31 +02:00
parent 6ee6c8e0be
commit 23e94a259b
2 changed files with 46 additions and 1 deletions

View File

@@ -241,7 +241,7 @@ namespace FlaxEditor.GUI.Docking
/// </summary>
public void FocusOrShow()
{
FocusOrShow(DockState.Float);
FocusOrShow((DockState)Editor.Instance.Options.Options.Interface.DockNewWindow);
}
/// <summary>

View File

@@ -1,6 +1,8 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using System.Net.Sockets;
using FlaxEditor.GUI.Docking;
using FlaxEngine;
namespace FlaxEditor.Options
@@ -36,6 +38,42 @@ namespace FlaxEditor.Options
/// </summary>
TimeSinceStartup,
}
/// <summary>
/// A proxy DockState for window open method.
/// </summary>
public enum DockStateProxy
{
/// <summary>
/// The floating window.
/// </summary>
Float = DockState.Float,
/// <summary>
/// The dock fill as a tab.
/// </summary>
DockFill = DockState.DockFill,
/// <summary>
/// The dock left.
/// </summary>
DockLeft = DockState.DockLeft,
/// <summary>
/// The dock right.
/// </summary>
DockRight = DockState.DockRight,
/// <summary>
/// The dock top.
/// </summary>
DockTop = DockState.DockTop,
/// <summary>
/// The dock bottom.
/// </summary>
DockBottom = DockState.DockBottom
}
/// <summary>
/// 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 +107,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;
/// <summary>
/// Gets or sets the method window opening.
/// </summary>
[DefaultValue(DockStateProxy.Float)]
[EditorDisplay("Interface", "Define The Method Window Opening"), EditorOrder(150), Tooltip("Define the opening method for windows, open a in new tab by default.")]
public DockStateProxy DockNewWindow { get; set; } = DockStateProxy.Float;
/// <summary>
/// Gets or sets the timestamps prefix mode for debug log messages.
/// </summary>