Merge pull request #1322 from Eikelenboom/development

Windowed Console button close / open / resize
This commit is contained in:
Brian Roberts 2024-09-24 14:13:56 -05:00 committed by GitHub
commit b6efb96191
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 64 additions and 8 deletions

View file

@ -628,6 +628,7 @@ function EditorGui::updateSideBar(%this)
{
if(GuiEditorIsActive())
{
// Update the Asset Browser's size
if(isObject(AssetBrowserWindow) && isObject(GuiEditorSidebar))
{
if(AssetBrowserWindow.docked == true)
@ -639,6 +640,19 @@ function EditorGui::updateSideBar(%this)
AssetBrowserWindow.resize(0, %browserPosY, %browserWidth, %browserHeight);
}
}
// Update the Windowed Console's size
if(isObject(windowConsoleControl) && isObject(GuiEditorSidebar))
{
if(windowConsoleControl.docked == true)
{
// The width is relative to the sidepanel
%consoleWidth = Canvas.extent.x - GuiEditorSidebar.extent.x;
%consoleHeight = windowConsoleControl.extent.y;
%consolePosY = Canvas.extent.y - windowConsoleControl.extent.y - 33;
windowConsoleControl.resize(0, %consolePosY, %consoleWidth, %consoleHeight);
}
}
return;
}
@ -2767,8 +2781,8 @@ function toggleSnappingOptions( %var )
}
else if( %var $= "grid" )
{
EWorldEditor.UseGridSnap = !EWorldEditor.UseGridSnap;
EditorSettings.setValue("WorldEditor/Tools/UseGridSnap", EWorldEditor.UseGridSnap );
EWorldEditor.UseGridSnap = !EWorldEditor.UseGridSnap;
EditorSettings.setValue("WorldEditor/Tools/UseGridSnap", EWorldEditor.UseGridSnap );
EWorldEditor.setGridSnap( EWorldEditor.UseGridSnap );
}
else if( %var $= "byGroup" )

View file

@ -636,7 +636,7 @@ function TerrainPainterContainer::maxSize(%this, %window)
// --- Windowed Console --------------------------------------------------
if(isObject(windowConsoleControl))
{
// Only resize the AssetBrowser if it's docked
// Only resize the console if it's docked
if(windowConsoleControl.docked == true)
{
// The width is relative to the sidepanel