mirror of
https://github.com/Ragora/TribesReplay.git
synced 2026-01-20 01:54:47 +00:00
81 lines
1.8 KiB
Plaintext
81 lines
1.8 KiB
Plaintext
//--- OBJECT WRITE BEGIN ---
|
|
new GuiControl(ConsoleDlg) {
|
|
profile = "GuiDefaultProfile";
|
|
|
|
new GuiWindowCtrl()
|
|
{
|
|
profile = "GuiWindowProfile";
|
|
position = "0 0";
|
|
extent = "640 370";
|
|
text = "Console";
|
|
|
|
new GuiScrollCtrl()
|
|
{
|
|
profile = "GuiButtonProfile";
|
|
position = "0 0";
|
|
extent = "640 350";
|
|
hScrollBar = "alwaysOn";
|
|
vScrollBar = "alwaysOn";
|
|
horizSizing = "width";
|
|
vertSizing = "height";
|
|
|
|
new GuiScrollContentCtrl("testScrollContentCtrl")
|
|
{
|
|
profile = "GuiButtonProfile";
|
|
|
|
new GuiConsole("testArrayCtrl")
|
|
{
|
|
profile = "GuiConsoleProfile";
|
|
position = "0 0";
|
|
};
|
|
};
|
|
};
|
|
|
|
new GuiConsoleEditCtrl("ConsoleEntry")
|
|
{
|
|
profile = "GuiTextEditProfile";
|
|
position = "0 350";
|
|
extent = "640 20";
|
|
historySize = 20;
|
|
altCommand = "ConsoleEntry::eval();";
|
|
horizSizing = "width";
|
|
vertSizing = "top";
|
|
};
|
|
};
|
|
};
|
|
//--- OBJECT WRITE END ---
|
|
|
|
$ConsoleActive = false;
|
|
|
|
function ConsoleEntry::eval()
|
|
{
|
|
%text = ConsoleEntry.getValue();
|
|
echo("==>" @ %text);
|
|
eval(%text);
|
|
ConsoleEntry.setValue("");
|
|
}
|
|
|
|
function ToggleConsole(%make)
|
|
{
|
|
if (%make)
|
|
{
|
|
if ($ConsoleActive)
|
|
{
|
|
Canvas.popDialog(ConsoleDlg);
|
|
$ConsoleActive = false;
|
|
if(!ConsoleDlg.mouseOn)
|
|
CursorOff();
|
|
}
|
|
else
|
|
{
|
|
Canvas.pushDialog(ConsoleDlg, 99);
|
|
ConsoleDlg.mouseOn = Canvas.isCursorOn();
|
|
$ConsoleActive = true;
|
|
if(!ConsoleDlg.mouseOn)
|
|
CursorOn();
|
|
}
|
|
}
|
|
}
|
|
|
|
|