Added ability to drag maximized panels.

This commit is contained in:
Tryibion
2022-11-25 15:13:25 -06:00
parent b1618a88be
commit 8707d658f1

View File

@@ -53,8 +53,14 @@ namespace FlaxEditor.GUI.Docking
// Check if window is maximized // Check if window is maximized
if (_window.IsMaximized) if (_window.IsMaximized)
return; {
// Restore window and set position to mouse.
var mousePos = _window.MousePosition;
var previousSize = _window.Size;
_window.Restore();
_window.Window.Position = FlaxEngine.Input.MouseScreenPosition - mousePos * _window.Size / previousSize;
}
// Create docking hint window // Create docking hint window
DockHintWindow.Create(this); DockHintWindow.Create(this);
} }