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:
Nils Eikelenboom 2024-09-24 20:52:41 +02:00
parent 0291b000e0
commit 02b86eafee
4 changed files with 64 additions and 8 deletions

View file

@ -102,11 +102,24 @@ function windowConsoleDlg::hideWindow(%this)
function windowConsoleDlg::showWindow(%this)
{
$WindowConsole::Open = true;
Canvas.pushDialog(%this);
%this-->Scroll.setVisible(true);
if($WindowConsole::Open)
{
// close the window when it's already opened
windowConsoleDlg.hideWindow();
}
else
{
// open the console window
$WindowConsole::Open = true;
Canvas.pushDialog(%this);
%this-->Scroll.setVisible(true);
// update all the windows (position and size)
EditorGui.updateSideBar();
}
}
//-----------------------------------------------------------------------------
function windowConsoleControl::setTab(%this, %tab, %text, %command)