mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Windowed Console button close / open / resize
- Close the windowed console when it's opened and the button is hit. - Resize/reposition the window after reopening. - Add a button to the GUI editor.
This commit is contained in:
parent
0291b000e0
commit
02b86eafee
4 changed files with 64 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
@ -2763,8 +2777,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" )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue