Initial commit
BIN
example/tstpro/common/ui/CUR_3darrow-original.png
Normal file
After Width: | Height: | Size: 615 B |
BIN
example/tstpro/common/ui/CUR_3darrow.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
74
example/tstpro/common/ui/ConsoleDlg.gui
Normal file
@ -0,0 +1,74 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(ConsoleDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
|
||||
new GuiWindowCtrl()
|
||||
{
|
||||
profile = "GuiWindowProfile";
|
||||
position = "0 0";
|
||||
extent = "640 370";
|
||||
text = "Console";
|
||||
|
||||
new GuiScrollCtrl()
|
||||
{
|
||||
profile = "GuiScrollProfile";
|
||||
position = "0 0";
|
||||
extent = "640 350";
|
||||
hScrollBar = "alwaysOn";
|
||||
vScrollBar = "alwaysOn";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
|
||||
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)
|
||||
{
|
||||
if ( $enableDirectInput )
|
||||
activateKeyboard();
|
||||
Canvas.popDialog(ConsoleDlg);
|
||||
$ConsoleActive = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $enableDirectInput )
|
||||
deactivateKeyboard();
|
||||
Canvas.pushDialog(ConsoleDlg, 99);
|
||||
$ConsoleActive = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
example/tstpro/common/ui/ConsoleDlg.gui.dso
Normal file
29
example/tstpro/common/ui/FrameOverlayGui.gui
Normal file
@ -0,0 +1,29 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(FrameOverlayGui) {
|
||||
profile = "GuiModelessDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "false";
|
||||
helpTag = "0";
|
||||
noCursor = true;
|
||||
|
||||
new GuiConsoleTextCtrl(TextOverlayControl) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 5";
|
||||
extent = "15 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
expression = "10";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
BIN
example/tstpro/common/ui/FrameOverlayGui.gui.dso
Normal file
572
example/tstpro/common/ui/GuiEditorGui.gui
Normal file
@ -0,0 +1,572 @@
|
||||
//----------------------------------------------------------------
|
||||
|
||||
new GuiControlProfile (BackFillProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "0 94 94";
|
||||
border = true;
|
||||
borderColor = "255 128 128";
|
||||
fontType = "Arial";
|
||||
fontSize = 12;
|
||||
fontColor = "0 0 0";
|
||||
fontColorHL = "32 100 100";
|
||||
fixedExtent = true;
|
||||
justify = "center";
|
||||
};
|
||||
|
||||
new GuiControl(GuiEditorGui) {
|
||||
profile = GuiDefaultProfile;
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
helpPage = "3. Gui Editor";
|
||||
new GuiMenuBar(GuiEditorMenuBar) {
|
||||
profile = "GuiMenuBarProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "800 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
};
|
||||
new GuiFrameSetCtrl()
|
||||
{
|
||||
position = "0 22";
|
||||
extent = "800 578";
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
columns = "0 640";
|
||||
rows = "0";
|
||||
|
||||
new GuiControl() {
|
||||
position = "0 0";
|
||||
extent = "640 578";
|
||||
minExtent = "64 64";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = GuiDefaultProfile;
|
||||
//----------------------------------------
|
||||
// toolbar
|
||||
new GuiControl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 28";
|
||||
|
||||
new GuiControlListPopup(GuiEditorClassPopup)
|
||||
{
|
||||
profile = "GuiEditorClassProfile";
|
||||
position = "8 6";
|
||||
extent = "180 16";
|
||||
};
|
||||
new GuiPopUpMenuCtrl(GuiEditorContentList)
|
||||
{
|
||||
profile = "GuiEditorClassProfile";
|
||||
position = "196 6";
|
||||
extent = "180 16";
|
||||
};
|
||||
new GuiPopUpMenuCtrl(GuiEditorResList)
|
||||
{
|
||||
profile = "GuiEditorClassProfile";
|
||||
position = "382 6";
|
||||
extent = "180 16";
|
||||
};
|
||||
};
|
||||
new GuiEditorRuler(GuiEditorTopRuler) {
|
||||
position = "10 28";
|
||||
extent = "630 10";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiButtonProfile";
|
||||
refCtrl = GuiEditorScroll;
|
||||
};
|
||||
new GuiEditorRuler(GuiEditorLeftRuler) {
|
||||
position = "0 38";
|
||||
extent = "10 540";
|
||||
horizSizing = "right";
|
||||
vertSizing = "height";
|
||||
profile = "GuiButtonProfile";
|
||||
refCtrl = GuiEditorScroll;
|
||||
};
|
||||
new GuiScrollCtrl(GuiEditorScroll)
|
||||
{
|
||||
profile = "GuiScrollProfile";
|
||||
position = "10 38";
|
||||
extent = "630 540";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
vScrollBar = "dynamic";
|
||||
hScrollBar = "dynamic";
|
||||
|
||||
new GuiControl(GuiEditorRegion)
|
||||
{
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
|
||||
new GuiControl() // background
|
||||
{
|
||||
profile = "BackFillProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
};
|
||||
new GuiControl(GuiEditorContent)
|
||||
{
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
};
|
||||
new GuiEditCtrl(GuiEditor)
|
||||
{
|
||||
profile = "GuiTextEditProfile"; // so it's tabable
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiFrameSetCtrl()
|
||||
{
|
||||
position = "640 0";
|
||||
minExtent = "128 64";
|
||||
extent = "160 600";
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
columns = "0";
|
||||
rows = "0 300";
|
||||
//----------------------------------------
|
||||
// Tree View
|
||||
new GuiScrollCtrl()
|
||||
{
|
||||
profile = "GuiScrollProfile";
|
||||
minExtent = "72 64";
|
||||
position = "0 0";
|
||||
extent = "160 300";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
vScrollBar = "alwaysOn";
|
||||
hScrollBar = "dynamic";
|
||||
|
||||
new GuiTreeViewCtrl(GuiEditorTreeView)
|
||||
{
|
||||
profile = "GuiTreeViewProfile";
|
||||
position = "0 0";
|
||||
horizSizing = "width";
|
||||
};
|
||||
};
|
||||
//----------------------------------------
|
||||
// Inspector
|
||||
new GuiControl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "160 300";
|
||||
minExtent = "64 64";
|
||||
|
||||
new GuiButtonCtrl () {
|
||||
profile = "GuiButtonSmProfile";
|
||||
position = "6, 16";
|
||||
extent = "40 16";
|
||||
font = "12 252 Arial";
|
||||
fontHL = "12 253 Arial";
|
||||
text = "APPLY";
|
||||
command = "GuiEditorInspectApply();";
|
||||
fillColor = "249";
|
||||
borderColor = "249";
|
||||
selectBorderColor = "255";
|
||||
};
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
position = "52 4";
|
||||
extent = "30 16";
|
||||
font = "12 244 Arial";
|
||||
text = "Name:";
|
||||
};
|
||||
|
||||
new GuiTextEditCtrl (GuiEditorInspectName) {
|
||||
profile = "GuiTextEditProfile";
|
||||
position = "84 3";
|
||||
extent = "72 18";
|
||||
text = "";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
};
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
position = "0 24";
|
||||
extent = "160 276";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
vScrollBar = "alwaysOn";
|
||||
hScrollBar = "alwaysOff";
|
||||
|
||||
new GuiInspector (GuiEditorInspectFields) {
|
||||
useFieldGrouping = false;
|
||||
profile = "GuiDefaultProfile";
|
||||
position = "0 0";
|
||||
extent = "140 0";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
new GuiControl(NewGuiDialog)
|
||||
{
|
||||
profile = "GuiDialogProfile";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
|
||||
new GuiWindowCtrl()
|
||||
{
|
||||
profile = "GuiWindowProfile";
|
||||
position = "220 146";
|
||||
extent = "200 188";
|
||||
text = "Create new GUI";
|
||||
canMove = "false";
|
||||
canClose = "false";
|
||||
canMinimize = "false";
|
||||
canMaximize = "false";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 28";
|
||||
text = "GUI Name:";
|
||||
};
|
||||
new GuiTextEditCtrl(NewGuiDialogName)
|
||||
{
|
||||
profile = "GuiTextEditProfile";
|
||||
position = "20 44";
|
||||
extent = "160 20";
|
||||
};
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 68";
|
||||
text = "Class:";
|
||||
};
|
||||
new GuiControlListPopup(NewGuiDialogClass)
|
||||
{
|
||||
profile = "GuiControlListPopupProfile";
|
||||
position = "20 84";
|
||||
extent = "160 20";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
position = "56 156";
|
||||
extent = "40 16";
|
||||
text = "Create";
|
||||
command = "GuiEditorCreate();";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
position = "104 156";
|
||||
extent = "40 16";
|
||||
text = "Cancel";
|
||||
command = "Canvas.popDialog(NewGuiDialog);";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorStartCreate()
|
||||
{
|
||||
NewGuiDialogClass.setText("GuiControl");
|
||||
NewGuiDialogClass.sort();
|
||||
NewGuiDialogName.setValue("NewGui");
|
||||
Canvas.pushDialog(NewGuiDialog);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorCreate()
|
||||
{
|
||||
%name = NewGuiDialogName.getValue();
|
||||
%class = NewGuiDialogClass.getText();
|
||||
Canvas.popDialog(NewGuiDialog);
|
||||
%obj = eval("return new " @ %class @ "(" @ %name @ ");");
|
||||
GuiEditorOpen(%obj);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorSaveGui()
|
||||
{
|
||||
%obj = GuiEditorContent.getObject(0);
|
||||
if(%obj == -1 || %obj.getName() $= "")
|
||||
return;
|
||||
%name = %obj.getName() @ ".gui";
|
||||
getSaveFilename("*.gui", "GuiEditorSaveGuiCallback", %name);
|
||||
}
|
||||
|
||||
function GuiEditorSaveGuiCallback(%name)
|
||||
{
|
||||
%obj = GuiEditorContent.getObject(0);
|
||||
|
||||
// make sure it is saved...
|
||||
if(!%obj.save(%name))
|
||||
{
|
||||
MessageBoxOK("GuiEditor Save Failure", "Failed to save '" @ %name @ "'. The file may be read-only.");
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEdit(%val)
|
||||
{
|
||||
if(%val != 0)
|
||||
return;
|
||||
|
||||
%content = Canvas.getContent();
|
||||
|
||||
if(%content == GuiEditorGui.getId())
|
||||
{
|
||||
//GlobalActionMap.bind(mouse, button1, mouselook);
|
||||
|
||||
%obj = GuiEditorContent.getObject(0);
|
||||
if(%obj != -1)
|
||||
{
|
||||
GuiGroup.add(%obj);
|
||||
Canvas.setContent(%obj);
|
||||
}
|
||||
|
||||
GlobalActionMap.unbind( keyboard, "delete" );
|
||||
}
|
||||
else
|
||||
{
|
||||
//GlobalActionMap.unbind(mouse, button1);
|
||||
GuiEditorOpen(%content);
|
||||
}
|
||||
}
|
||||
|
||||
package GuiEditor_BlockDialogs
|
||||
{
|
||||
|
||||
function GuiCanvas::pushDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
function GuiCanvas::popDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorOpen(%content)
|
||||
{
|
||||
GuiEditorMenuBar.clearMenus();
|
||||
GuiEditorMenuBar.addMenu("File", 0);
|
||||
GuiEditorMenuBar.addMenuItem("File", "New GUI...", 1);
|
||||
GuiEditorMenuBar.scriptCommand["File", 1] = "GuiEditorStartCreate();";
|
||||
GuiEditorMenuBar.addMenuItem("File", "Save GUI...", 2);
|
||||
GuiEditorMenuBar.scriptCommand["File", 2] = "GuiEditorSaveGui();";
|
||||
GuiEditorMenuBar.addMenuItem("File", "-", 0);
|
||||
GuiEditorMenuBar.addMenuItem("File", "GUI Editor Help...", 3, "F1");
|
||||
GuiEditorMenuBar.scriptCommand["File", 3] = "getHelp(\"3. Gui Editor\");";
|
||||
GuiEditorMenuBar.addMenuItem("File", "Toggle GUI Editor...", 4, "F10");
|
||||
GuiEditorMenuBar.scriptCommand["File", 4] = "GuiEdit(0);";
|
||||
|
||||
GuiEditorMenuBar.addMenu("Edit", 1);
|
||||
GuiEditorMenuBar.addMenuItem("Edit", "Cut", 3, "Ctrl X");
|
||||
GuiEditorMenuBar.scriptCommand["Edit", 3] = "GuiEditor.saveSelection($GUI::clipboardFile); GuiEditor.deleteSelection();";
|
||||
GuiEditorMenuBar.setMenuItemBitmap("Edit", "Cut", 3);
|
||||
GuiEditorMenuBar.addMenuItem("Edit", "Copy", 4, "Ctrl C");
|
||||
GuiEditorMenuBar.scriptCommand["Edit", 4] = "GuiEditor.saveSelection($GUI::clipboardFile);";
|
||||
GuiEditorMenuBar.setMenuItemBitmap("Edit", "Copy", 4);
|
||||
GuiEditorMenuBar.addMenuItem("Edit", "Paste", 5, "Ctrl V");
|
||||
GuiEditorMenuBar.scriptCommand["Edit", 5] = "GuiEditor.loadSelection($GUI::clipboardFile);";
|
||||
GuiEditorMenuBar.setMenuItemBitmap("Edit", "Paste", 5);
|
||||
GuiEditorMenuBar.addMenuItem("Edit", "-", 0);
|
||||
GuiEditorMenuBar.addMenuItem("Edit", "Select All", 6, "Ctrl A");
|
||||
GuiEditorMenuBar.scriptCommand["Edit", 6] = "GuiEditor.selectAll();";
|
||||
|
||||
GuiEditorMenuBar.addMenu("Layout", 2);
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Align Left", 1, "Ctrl L");
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 1] = "GuiEditor.Justify(0);";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Align Right", 2, "Ctrl R");
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 2] = "GuiEditor.Justify(2);";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Align Top", 3, "Ctrl T");
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 3] = "GuiEditor.Justify(3);";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Align Bottom", 4, "Ctrl B");
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 4] = "GuiEditor.Justify(4);";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "-", 0);
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Center Horizontally", 5);
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 5] = "GuiEditor.Justify(1);";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Space Vertically", 6);
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 6] = "GuiEditor.Justify(5);";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Space Horizontally", 7);
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 7] = "GuiEditor.Justify(6);";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "-", 0);
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Bring to Front", 8);
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 8] = "GuiEditor.BringToFront();";
|
||||
GuiEditorMenuBar.addMenuItem("Layout", "Send to Back", 9);
|
||||
GuiEditorMenuBar.scriptCommand["Layout", 9] = "GuiEditor.PushToBack();";
|
||||
|
||||
GuiEditorMenuBar.addMenu("Move", 3);
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Nudge Left", 1, "Left");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 1] = "GuiEditor.moveSelection(-1,0);";
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Nudge Right", 2, "Right");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 2] = "GuiEditor.moveSelection(1,0);";
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Nudge Up", 3, "Up");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 3] = "GuiEditor.moveSelection(0,-1);";
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Nudge Down", 4, "Down");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 4] = "GuiEditor.moveSelection(0,1);";
|
||||
GuiEditorMenuBar.addMenuItem("Move", "-", 0);
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Left", 5, "Shift Left");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 5] = "GuiEditor.moveSelection(-10,0);";
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Right", 6, "Shift Right");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 6] = "GuiEditor.moveSelection(10,0);";
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Up", 7, "Shift Up");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 7] = "GuiEditor.moveSelection(0,-10);";
|
||||
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Down", 8, "Shift Down");
|
||||
GuiEditorMenuBar.scriptCommand["Move", 8] = "GuiEditor.moveSelection(0,10);";
|
||||
|
||||
Canvas.setContent(GuiEditorGui);
|
||||
while((%obj = GuiEditorContent.getObject(0)) != -1)
|
||||
GuiGroup.add(%obj); // get rid of anything being edited
|
||||
|
||||
%i = 0;
|
||||
GuiEditorContentList.clear();
|
||||
while((%obj = GuiGroup.getObject(%i)) != -1)
|
||||
{
|
||||
if(%obj.getName() !$= Canvas)
|
||||
{
|
||||
if(%obj.getName() $= "")
|
||||
%name = "(unnamed) - " @ %obj;
|
||||
else
|
||||
%name = %obj.getName() @ " - " @ %obj;
|
||||
|
||||
GuiEditorContentList.add(%name, %obj);
|
||||
}
|
||||
%i++;
|
||||
}
|
||||
activatePackage(GuiEditor_BlockDialogs);
|
||||
GuiEditorContent.add(%content);
|
||||
deactivatePackage(GuiEditor_BlockDialogs);
|
||||
GuiEditorContentList.sort();
|
||||
GuiEditorClassPopup.sort();
|
||||
GuiEditorResList.clear();
|
||||
GuiEditorResList.add("640 x 480", 640);
|
||||
GuiEditorResList.add("800 x 600", 800);
|
||||
GuiEditorResList.add("1024 x 768", 1024);
|
||||
%ext = GuiEditorRegion.getExtent();
|
||||
switch(getWord(%ext, 0))
|
||||
{
|
||||
case 640:
|
||||
GuiEditorResList.setText("640 x 480");
|
||||
case 800:
|
||||
GuiEditorResList.setText("800 x 600");
|
||||
case 1024:
|
||||
GuiEditorResList.setText("1024 x 768");
|
||||
}
|
||||
if(%content.getName() $= "")
|
||||
%name = "(unnamed) - " @ %content;
|
||||
else
|
||||
%name = %content.getName() @ " - " @ %content;
|
||||
|
||||
GuiEditorContentList.setText(%name);
|
||||
GuiEditorClassPopup.setText("New Control");
|
||||
GuiEditor.setRoot(%content);
|
||||
%content.resize(0,0,getWord(%ext,0), getWord(%ext, 1));
|
||||
GuiEditorTreeView.open(%content);
|
||||
|
||||
}
|
||||
|
||||
function GuiEditorMenuBar::onMenuItemSelect(%this, %menuId, %menu, %itemId, %item)
|
||||
{
|
||||
if(%this.scriptCommand[%menu, %itemId] !$= "")
|
||||
eval(%this.scriptCommand[%menu, %itemId]);
|
||||
else
|
||||
error("No script command defined for menu " @ %menu @ " item " @ %item);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorContentList::onSelect(%this, %id)
|
||||
{
|
||||
GuiEditorOpen(%id);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorClassPopup::onSelect(%this, %id)
|
||||
{
|
||||
%class = %this.getText();
|
||||
%obj = eval("return new " @ %class @ "();");
|
||||
GuiEditor.addNewCtrl(%obj);
|
||||
GuiEditorClassPopup.setText("New Control");
|
||||
}
|
||||
|
||||
function GuiEditorResList::onSelect(%this, %id)
|
||||
{
|
||||
switch(%id)
|
||||
{
|
||||
case 640:
|
||||
GuiEditorRegion.resize(0,0,640,480);
|
||||
GuiEditorContent.getObject(0).resize(0,0,640,480);
|
||||
case 800:
|
||||
GuiEditorRegion.resize(0,0,800,600);
|
||||
GuiEditorContent.getObject(0).resize(0,0,800,600);
|
||||
case 1024:
|
||||
GuiEditorRegion.resize(0,0,1024,768);
|
||||
GuiEditorContent.getObject(0).resize(0,0,1024,768);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorTreeView::onSelect(%this, %obj, %rightMouse)
|
||||
{
|
||||
if(%rightMouse)
|
||||
GuiEditor.setCurrentAddSet(%obj);
|
||||
else
|
||||
{
|
||||
GuiEditorInspectFields.inspect(%obj);
|
||||
GuiEditorInspectName.setValue(%obj.getName());
|
||||
GuiEditor.select(%obj);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorInspectApply()
|
||||
{
|
||||
GuiEditorInspectFields.apply(GuiEditorInspectName.getValue());
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditor::onSelect(%this, %ctrl)
|
||||
{
|
||||
|
||||
GuiEditorInspectFields.inspect(%ctrl);
|
||||
GuiEditorInspectName.setValue(%ctrl.getName());
|
||||
GuiEditor.select(%ctrl);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function GuiEditorDeleteSelected( %val ) {
|
||||
if( %val )
|
||||
GuiEditor.deleteSelection();
|
||||
}
|
||||
|
||||
GlobalActionMap.bind(keyboard, "f10", GuiEdit);
|
BIN
example/tstpro/common/ui/GuiEditorGui.gui.dso
Normal file
94
example/tstpro/common/ui/HelpDlg.gui
Normal file
@ -0,0 +1,94 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(HelpDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "75 36";
|
||||
extent = "483 393";
|
||||
minExtent = "300 200";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Help";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(HelpDlg);";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "height";
|
||||
position = "8 26";
|
||||
extent = "132 356";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "dynamic";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiTextListCtrl(HelpFileList) {
|
||||
profile = "GuiTextListProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "1 1";
|
||||
extent = "130 8";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
enumerate = "0";
|
||||
resizeCell = "1";
|
||||
columns = "0";
|
||||
fitParentWidth = "1";
|
||||
clipColumnText = "0";
|
||||
};
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "146 26";
|
||||
extent = "328 356";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiMLTextCtrl(HelpText) {
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "1 1";
|
||||
extent = "310 16";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
BIN
example/tstpro/common/ui/HelpDlg.gui.dso
Normal file
103
example/tstpro/common/ui/InspectAddFieldDlg.gui
Normal file
@ -0,0 +1,103 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(InspectAddFieldDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "209 177";
|
||||
extent = "221 125";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Add dynamic field...";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(InspectAddFieldDlg);";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "22 32";
|
||||
extent = "30 18";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Name:";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "21 58";
|
||||
extent = "31 18";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Value:";
|
||||
};
|
||||
new GuiTextEditCtrl(InspectAddFieldValue) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "62 58";
|
||||
extent = "146 18";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextEditCtrl(InspectAddFieldName) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "62 32";
|
||||
extent = "146 18";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "25 88";
|
||||
extent = "73 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "OK";
|
||||
command = "canvas.popDialog(InspectAddFieldDlg);InspectAddFieldDlg.doAction();";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "125 88";
|
||||
extent = "73 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "CANCEL";
|
||||
command = "canvas.popDialog(InspectAddFieldDlg);";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
BIN
example/tstpro/common/ui/InspectAddFieldDlg.gui.dso
Normal file
234
example/tstpro/common/ui/InspectDlg.gui
Normal file
@ -0,0 +1,234 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(InspectDlg) {
|
||||
profile = "GuiDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "False";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl(InspectTitle) {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 20";
|
||||
extent = "200 400";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(InspectDlg);";
|
||||
font = "12 244 Arial";
|
||||
selectfillColor = "253";
|
||||
fillColor = "250";
|
||||
opaque = "true";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "8 24";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "InspectApply();";
|
||||
helpTag = "0";
|
||||
text = "APPLY";
|
||||
selectBorderColor = "255";
|
||||
borderColor = "249";
|
||||
fillColor = "249";
|
||||
fontHL = "12 253 Arial";
|
||||
font = "12 252 Arial";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "56 24";
|
||||
extent = "29 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Name:";
|
||||
font = "12 244 Arial";
|
||||
};
|
||||
new GuiTextEditCtrl(InspectObjectName) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "98 23";
|
||||
extent = "72 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "8 44";
|
||||
extent = "184 348";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiInspector(InspectFields) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "184 8";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiWindowCtrl(InspectTreeTitle) {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "232 20";
|
||||
extent = "200 400";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "TREE VIEW";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(InspectDlg);";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "8 24";
|
||||
extent = "184 368";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiTreeViewCtrl(InspectTreeView) {
|
||||
profile = "GuiTreeViewProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "64 64";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
exec("./InspectAddFieldDlg.gui");
|
||||
|
||||
function Inspect(%obj)
|
||||
{
|
||||
Canvas.popDialog("InspectDlg");
|
||||
Canvas.pushDialog("InspectDlg", 30);
|
||||
|
||||
InspectFields.inspect(%obj);
|
||||
InspectObjectName.setValue(%obj.getName());
|
||||
InspectTitle.setValue(%obj.getId() @ ": " @ %obj.getName());
|
||||
}
|
||||
|
||||
function InspectApply()
|
||||
{
|
||||
InspectFields.apply(InspectObjectName.getValue());
|
||||
}
|
||||
|
||||
function InspectTreeView::onSelect(%this, %obj)
|
||||
{
|
||||
Inspect(%obj);
|
||||
}
|
||||
|
||||
function Tree(%obj)
|
||||
{
|
||||
Canvas.popDialog("InspectDlg");
|
||||
Canvas.pushDialog("InspectDlg", 20);
|
||||
InspectTreeView.open(%obj);
|
||||
}
|
||||
|
||||
// MM: Added Dynamic group toggle support.
|
||||
function GuiInspector::toggleDynamicGroupScript(%this, %obj)
|
||||
{
|
||||
%this.toggleDynamicGroupExpand();
|
||||
%this.inspect(%obj);
|
||||
}
|
||||
// MM: Added group toggle support.
|
||||
function GuiInspector::toggleGroupScript(%this, %obj, %fieldName)
|
||||
{
|
||||
%this.toggleGroupExpand(%obj, %fieldName);
|
||||
%this.inspect(%obj);
|
||||
}
|
||||
|
||||
// MM: Set All Group State support.
|
||||
function GuiInspector::setAllGroupStateScript(%this, %obj, %groupState)
|
||||
{
|
||||
%this.setAllGroupState(%groupState);
|
||||
%this.inspect(%obj);
|
||||
}
|
||||
|
||||
function GuiInspector::addDynamicField(%this, %obj)
|
||||
{
|
||||
InspectAddFieldDlg.object = %obj;
|
||||
InspectAddFieldDlg.inspector = %this;
|
||||
InspectAddFieldName.setValue("");
|
||||
InspectAddFieldValue.setValue("");
|
||||
Canvas.pushDialog(InspectAddFieldDlg, 99);
|
||||
}
|
||||
|
||||
function InspectAddFieldDlg::doAction(%this)
|
||||
{
|
||||
if(InspectAddFieldName.getValue() $= "" || InspectAddFieldValue.getValue() $= "")
|
||||
return;
|
||||
eval(%this.object @ "." @ firstWord(InspectAddFieldName.getValue()) @ " = " @ InspectAddFieldValue.getValue() @ ";");
|
||||
%this.inspector.inspect(%this.object);
|
||||
}
|
||||
|
||||
|
BIN
example/tstpro/common/ui/InspectDlg.gui.dso
Normal file
120
example/tstpro/common/ui/LoadFileDlg.gui
Normal file
@ -0,0 +1,120 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(LoadFileDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "137 78";
|
||||
extent = "578 326";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Load File...";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(LoadFileDlg);";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "9 26";
|
||||
extent = "482 289";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
defaultLineHeight = "15";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiTextListCtrl(loadFileList) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "361 8";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
altCommand = "eval($loadFileCommand); Canvas.popDialog(LoadFileDlg);";
|
||||
helpTag = "0";
|
||||
enumerate = "0";
|
||||
resizeCell = "1";
|
||||
columns = "0";
|
||||
fitParentWidth = "0";
|
||||
clipColumnText = "0";
|
||||
noDuplicates = "false";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "503 268";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "eval($loadFileCommand); Canvas.popDialog(LoadFileDlg);";
|
||||
helpTag = "0";
|
||||
text = "Load";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "503 294";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "eval($loadFileCancelCommand); Canvas.popDialog(LoadFileDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
||||
function fillFileList(%filespec, %ctrl)
|
||||
{
|
||||
%ctrl.clear();
|
||||
%i = 0;
|
||||
%f = 0;
|
||||
for(%fld = getField(%filespec, 0); %fld !$= ""; %fld = getField(%filespec, %f++))
|
||||
{
|
||||
for(%file = findFirstFile(%fld); %file !$= ""; %file = findNextFile(%fld))
|
||||
if (getSubStr(%file, 0, 4) !$= "CVS/")
|
||||
%ctrl.addRow(%i++, %file);
|
||||
}
|
||||
%ctrl.sort(0);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ex: getLoadFilename("stuff\*.*", loadStuff);
|
||||
// -- calls 'loadStuff(%filename)' on dblclick or ok
|
||||
//------------------------------------------------------------------------------
|
||||
function getLoadFilename(%filespec, %callback)
|
||||
{
|
||||
$loadFileCommand = "if(loadFileList.getSelectedId() >= 0)" @ %callback @ "(loadFileList.getValue());";
|
||||
$loadFileCancelCommand = "";
|
||||
Canvas.pushDialog(LoadFileDlg, 99);
|
||||
fillFileList(%filespec, loadFileList);
|
||||
}
|
||||
|
BIN
example/tstpro/common/ui/LoadFileDlg.gui.dso
Normal file
73
example/tstpro/common/ui/MessageBoxOKCancelDlg.gui
Normal file
@ -0,0 +1,73 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(MessageBoxOKCancelDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl(MBOKCancelFrame) {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "170 175";
|
||||
extent = "300 129";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiMLTextCtrl(MBOKCancelText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
position = "32 39";
|
||||
extent = "236 24";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "158 88";
|
||||
extent = "110 23";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.callback);";
|
||||
accelerator = "return";
|
||||
helpTag = "0";
|
||||
text = "OK";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "30 88";
|
||||
extent = "110 23";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.cancelCallback);";
|
||||
accelerator = "escape";
|
||||
helpTag = "0";
|
||||
text = "CANCEL";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
BIN
example/tstpro/common/ui/MessageBoxOKCancelDlg.gui.dso
Normal file
61
example/tstpro/common/ui/MessageBoxOkDlg.gui
Normal file
@ -0,0 +1,61 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(MessageBoxOKDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl(MBOKFrame) {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "330 248";
|
||||
extent = "240 103";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiMLTextCtrl(MBOKText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
position = "2 39";
|
||||
extent = "236 14";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
new GuiButtonCtrl(MBOKButton) {
|
||||
profile = "GuiButtonProfileBlue";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "95 67";
|
||||
extent = "50 23";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "MessageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);";
|
||||
accelerator = "return";
|
||||
helpTag = "0";
|
||||
text = "OK";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
BIN
example/tstpro/common/ui/MessageBoxOkDlg.gui.dso
Normal file
77
example/tstpro/common/ui/MessageBoxYesNoDlg.gui
Normal file
@ -0,0 +1,77 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(MessageBoxYesNoDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl(MBYesNoFrame) {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "250 235";
|
||||
extent = "300 129";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiMLTextCtrl(MBYesNoText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
position = "32 39";
|
||||
extent = "236 14";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
helpTag = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "213 88";
|
||||
extent = "55 25";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.yesCallback);";
|
||||
accelerator = "return";
|
||||
text = "YES";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
helpTag = "0";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "30 88";
|
||||
extent = "55 25";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);";
|
||||
accelerator = "escape";
|
||||
text = "NO";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
helpTag = "0";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
BIN
example/tstpro/common/ui/MessageBoxYesNoDlg.gui.dso
Normal file
45
example/tstpro/common/ui/MessagePopupDlg.gui
Normal file
@ -0,0 +1,45 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(MessagePopupDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl(MessagePopFrame) {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "170 175";
|
||||
extent = "300 92";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiMLTextCtrl(MessagePopText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
position = "32 39";
|
||||
extent = "236 24";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
BIN
example/tstpro/common/ui/MessagePopupDlg.gui.dso
Normal file
182
example/tstpro/common/ui/NetGraphGui.gui
Normal file
@ -0,0 +1,182 @@
|
||||
// Profiles
|
||||
new GuiControlProfile (NetGraphGhostsActiveProfile)
|
||||
{
|
||||
fontColor = "255 255 255";
|
||||
};
|
||||
new GuiControlProfile (NetGraphGhostUpdatesProfile)
|
||||
{
|
||||
fontColor = "255 0 0";
|
||||
};
|
||||
new GuiControlProfile (NetGraphBitsSentProfile)
|
||||
{
|
||||
fontColor = "0 255 0";
|
||||
};
|
||||
new GuiControlProfile (NetGraphBitsReceivedProfile)
|
||||
{
|
||||
fontColor = "0 0 255";
|
||||
};
|
||||
new GuiControlProfile (NetGraphLatencyProfile)
|
||||
{
|
||||
fontColor = "0 255 255";
|
||||
};
|
||||
new GuiControlProfile (NetGraphPacketLossProfile)
|
||||
{
|
||||
fontColor = "0 0 0";
|
||||
};
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(NetGraphGui) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
noCursor = "1";
|
||||
|
||||
new GuiGraphCtrl(NetGraph) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "432 5";
|
||||
extent = "200 200";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
};
|
||||
|
||||
new GuiTextCtrl(Latency) {
|
||||
profile = "NetGraphLatencyProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "436 184";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Latency";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(PacketLoss) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "536 184";
|
||||
extent = "59 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Packet Loss";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(BitsReceived) {
|
||||
profile = "NetGraphBitsReceivedProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "536 170";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Bits Received";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(GhostsActive) {
|
||||
profile = "NetGraphGhostsActiveProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "436 156";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Ghosts Active";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(GhostUpdates) {
|
||||
profile = "NetGraphGhostUpdatesProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "536 156";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Ghost Updates";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(BitsSent) {
|
||||
profile = "NetGraphBitsSentProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "436 170";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Bits Sent";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
// Functions
|
||||
function NetGraph::toggleNetGraph()
|
||||
{
|
||||
if(!$NetGraph::isInitialized)
|
||||
{
|
||||
$Stats::netGhostUpdates = 0;
|
||||
NetGraph::updateStats();
|
||||
$NetGraph::isInitialized = true;
|
||||
}
|
||||
|
||||
if(!Canvas.isMember(NetGraphGui))
|
||||
{
|
||||
Canvas.add(NetGraphGui);
|
||||
}
|
||||
else
|
||||
Canvas.remove(NetGraphGui);
|
||||
}
|
||||
|
||||
function NetGraph::updateStats()
|
||||
{
|
||||
$NetGraphThread = NetGraph.schedule(32, "updateStats");
|
||||
|
||||
if(!$Stats::netGhostUpdates)
|
||||
return;
|
||||
|
||||
if(isobject(NetGraph))
|
||||
{
|
||||
if(isobject(ServerConnection))
|
||||
NetGraph.addDatum(0,ServerConnection.getGhostsActive());
|
||||
GhostsActive.setText("Ghosts Active: " @ ServerConnection.getGhostsActive());
|
||||
NetGraph.addDatum(1,$Stats::netGhostUpdates);
|
||||
GhostUpdates.setText("Ghost Updates: " @ $Stats::netGhostUpdates);
|
||||
$Stats::netGhostUpdates = 0;
|
||||
NetGraph.addDatum(2,$Stats::netBitsSent);
|
||||
BitsSent.setText("Bits Sent: " @ $Stats::netBitsSent);
|
||||
NetGraph.addDatum(3,$Stats::netBitsReceived);
|
||||
BitsReceived.setText("Bits Received: " @ $Stats::netBitsReceived);
|
||||
NetGraph.matchScale(2,3);
|
||||
NetGraph.addDatum(4,ServerConnection.getPing());
|
||||
Latency.setText("Latency: " @ ServerConnection.getPing());
|
||||
NetGraph.addDatum(5,ServerConnection.getPacketLoss());
|
||||
PacketLoss.setText("Packet Loss: " @ ServerConnection.getPacketLoss());
|
||||
}
|
||||
}
|
||||
|
||||
function NetGraph::toggleKey()
|
||||
{
|
||||
if(!GhostsActive.visible)
|
||||
{
|
||||
GhostsActive.visible = 1;
|
||||
GhostUpdates.visible = 1;
|
||||
BitsSent.visible = 1;
|
||||
BitsReceived.visible = 1;
|
||||
Latency.visible = 1;
|
||||
PacketLoss.visible = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
GhostsActive.visible = 0;
|
||||
GhostUpdates.visible = 0;
|
||||
BitsSent.visible = 0;
|
||||
BitsReceived.visible = 0;
|
||||
Latency.visible = 0;
|
||||
PacketLoss.visible = 0;
|
||||
}
|
||||
}
|
BIN
example/tstpro/common/ui/NetGraphGui.gui.dso
Normal file
97
example/tstpro/common/ui/RecordingsDlg.gui
Normal file
@ -0,0 +1,97 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(recordingsDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "55 65";
|
||||
extent = "530 338";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Demo Recordings";
|
||||
maxLength = "255";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(recordingsDlg);";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "23 37";
|
||||
extent = "484 260";
|
||||
minExtent = "32 32";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
defaultLineHeight = "15";
|
||||
|
||||
new GuiTextListCtrl(RecordingsDlgList) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "2 2";
|
||||
extent = "462 20";
|
||||
minExtent = "8 20";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
enumerate = "0";
|
||||
columns = "0";
|
||||
resizeCell = "1";
|
||||
fitParentWidth = "1";
|
||||
clipColumnText = "0";
|
||||
noDuplicates = "false";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl(DR_CancelBtn) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "396 306";
|
||||
extent = "110 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "Canvas.popDialog(recordingsDlg);";
|
||||
accelerator = "escape";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiButtonCtrl(DR_StartDemoBtn) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "25 305";
|
||||
extent = "110 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "StartSelectedDemo();";
|
||||
helpTag = "0";
|
||||
text = "Play";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
BIN
example/tstpro/common/ui/RecordingsDlg.gui.dso
Normal file
151
example/tstpro/common/ui/RegisterDlg COPY.gui
Normal file
@ -0,0 +1,151 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(RegisterDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "139 133";
|
||||
extent = "274 200";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Register Torque2D";
|
||||
maxLength = "255";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextEditCtrl(REG_edit) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "28 119";
|
||||
extent = "207 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "31 153";
|
||||
extent = "85 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Register";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
command = "RegisterDlg.doRegister();";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "151 153";
|
||||
extent = "85 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
command = "Canvas.popDialog(RegisterDlg);";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
function RegisterDlg::doRegister(%this)
|
||||
{
|
||||
|
||||
%ret = iRegisterProduct( REG_edit.getValue() );
|
||||
|
||||
if( %ret == 0 ) // Success
|
||||
{
|
||||
%this.regSucceed();
|
||||
return;
|
||||
}
|
||||
else if( %ret == 1 ) // Wait
|
||||
{
|
||||
%status = iGetRegistrationStatus();
|
||||
while( %status == 1 )
|
||||
{
|
||||
%status = iGetRegistrationStatus();
|
||||
}
|
||||
|
||||
switch( %status )
|
||||
{
|
||||
case 0:
|
||||
// Woot
|
||||
%this.regSucceed();
|
||||
return;
|
||||
case 2:
|
||||
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
|
||||
case 3:
|
||||
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
|
||||
case 4:
|
||||
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
|
||||
case 5:
|
||||
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
|
||||
}
|
||||
|
||||
if( %errorString !$= "" )
|
||||
{
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.popDialog( %this );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( %ret )
|
||||
{
|
||||
case 2:
|
||||
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
|
||||
case 3:
|
||||
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
|
||||
case 4:
|
||||
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
|
||||
case 5:
|
||||
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
|
||||
|
||||
case -1:
|
||||
%errorString = "An unknown error has occured.";
|
||||
}
|
||||
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
}
|
||||
}
|
||||
|
||||
function RegisterDlg::regSucceed(%this)
|
||||
{
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
|
||||
|
||||
Canvas.popDialog( %this );
|
||||
}
|
278
example/tstpro/common/ui/RegisterDlg.gui
Normal file
@ -0,0 +1,278 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(RegisterDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
|
||||
new GuiColouredBox(REG_Background) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
color = "0 0 0 255";
|
||||
color2 = "0 0 0 255";
|
||||
opaque = "1";
|
||||
gradientDir = "0";
|
||||
};
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "264 74";
|
||||
extent = "326 425";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Register Torque ShowTool Pro";
|
||||
maxLength = "255";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextEditCtrl(REG_edit) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 349";
|
||||
extent = "306 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "73 383";
|
||||
extent = "80 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "RegisterDlg.doRegister();";
|
||||
text = "Register";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiButtonCtrl(REG_CancelBut) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "173 383";
|
||||
extent = "80 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "Canvas.popDialog(RegisterDlg);";
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiColouredBox() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 30";
|
||||
extent = "306 256";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
color = "255 255 255 255";
|
||||
color2 = "0 0 0 255";
|
||||
opaque = "1";
|
||||
gradientDir = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "25 0";
|
||||
extent = "256 256";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
bitmap = "./productlogo";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiText24Profile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "96 177";
|
||||
extent = "113 28";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Registration";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(REG_TryoutExp) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "65 215";
|
||||
extent = "175 18";
|
||||
minExtent = "8 2";
|
||||
visible = "0";
|
||||
text = "Your 30 day trial period has expired!";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(REG_PleaseReg) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "75 215";
|
||||
extent = "155 18";
|
||||
minExtent = "8 2";
|
||||
visible = "0";
|
||||
text = "Please register your Ignition Key";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 330";
|
||||
extent = "296 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Please enter your Ignition Key as assigned by GarageGames:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 300";
|
||||
extent = "142 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Your Off-Line Registration ID:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(REG_GUID) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "160 300";
|
||||
extent = "101 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
function RegisterDlg::onWake(%this)
|
||||
{
|
||||
if($ThirtyDayOver == true)
|
||||
{
|
||||
REG_PleaseReg.setVisible(0);
|
||||
REG_Background.setVisible(1);
|
||||
} else
|
||||
{
|
||||
REG_TryoutExp.setVisible(0);
|
||||
REG_Background.setVisible(0);
|
||||
}
|
||||
|
||||
REG_GUID.setValue(iGetMachineGUID());
|
||||
}
|
||||
|
||||
function RegisterDlg::doRegister(%this)
|
||||
{
|
||||
|
||||
%ret = iRegisterProduct( REG_edit.getValue() );
|
||||
|
||||
if( %ret == 0 ) // Success
|
||||
{
|
||||
%this.regSucceed();
|
||||
return;
|
||||
}
|
||||
else if( %ret == 1 ) // Wait
|
||||
{
|
||||
%status = iGetRegistrationStatus();
|
||||
while( %status == 1 )
|
||||
{
|
||||
%status = iGetRegistrationStatus();
|
||||
}
|
||||
|
||||
switch( %status )
|
||||
{
|
||||
case 0:
|
||||
// Woot
|
||||
%this.regSucceed();
|
||||
return;
|
||||
case 2:
|
||||
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
|
||||
case 3:
|
||||
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
|
||||
case 4:
|
||||
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
|
||||
case 5:
|
||||
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
|
||||
}
|
||||
|
||||
if( %errorString !$= "" )
|
||||
{
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.popDialog( %this );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( %ret )
|
||||
{
|
||||
case 2:
|
||||
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
|
||||
case 3:
|
||||
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
|
||||
case 4:
|
||||
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
|
||||
case 5:
|
||||
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
|
||||
|
||||
case -1:
|
||||
%errorString = "An unknown error has occured.";
|
||||
}
|
||||
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
}
|
||||
}
|
||||
|
||||
function RegisterDlg::regSucceed(%this)
|
||||
{
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
|
||||
|
||||
Canvas.popDialog( %this );
|
||||
Canvas.popDialog( ThirtyDayTrialDlg ); //*** Also pop the 30-day dialog
|
||||
|
||||
//*** If the 30-day trial was up and only this dialog is visible, we need to bring back up
|
||||
//*** the exporter interface
|
||||
if($ThirtyDayOver == true)
|
||||
{
|
||||
startExporter();
|
||||
}
|
||||
}
|
262
example/tstpro/common/ui/RegisterDlg.gui.bak
Normal file
@ -0,0 +1,262 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(RegisterDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "237 87";
|
||||
extent = "326 425";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Register Torque ShowTool Pro";
|
||||
maxLength = "255";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextEditCtrl(REG_edit) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 349";
|
||||
extent = "306 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "73 383";
|
||||
extent = "80 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "RegisterDlg.doRegister();";
|
||||
text = "Register";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiButtonCtrl(REG_CancelBut) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "173 383";
|
||||
extent = "80 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "Canvas.popDialog(RegisterDlg);";
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiColouredBox() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 30";
|
||||
extent = "306 256";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
color = "255 255 255 255";
|
||||
color2 = "0 0 0 255";
|
||||
opaque = "1";
|
||||
gradientDir = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "25 0";
|
||||
extent = "256 256";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
bitmap = "./productlogo";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiText24Profile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "96 177";
|
||||
extent = "113 28";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Registration";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(REG_TryoutExp) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "65 215";
|
||||
extent = "175 18";
|
||||
minExtent = "8 2";
|
||||
visible = "0";
|
||||
text = "Your 30 day trial period has expired!";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(REG_PleaseReg) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "75 215";
|
||||
extent = "155 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Please register your Ignition Key";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 330";
|
||||
extent = "296 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Please enter your Ignition Key as assigned by GarageGames:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 300";
|
||||
extent = "142 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Your Off-Line Registration ID:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(REG_GUID) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "160 300";
|
||||
extent = "157 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
function RegisterDlg::onWake(%this)
|
||||
{
|
||||
if($ThirtyDayOver == true)
|
||||
{
|
||||
REG_PleaseReg.setVisible(0);
|
||||
} else
|
||||
{
|
||||
REG_TryoutExp.setVisible(0);
|
||||
}
|
||||
|
||||
REG_GUID.setValue(iGetMachineGUID());
|
||||
}
|
||||
|
||||
function RegisterDlg::doRegister(%this)
|
||||
{
|
||||
|
||||
%ret = iRegisterProduct( REG_edit.getValue() );
|
||||
|
||||
if( %ret == 0 ) // Success
|
||||
{
|
||||
%this.regSucceed();
|
||||
return;
|
||||
}
|
||||
else if( %ret == 1 ) // Wait
|
||||
{
|
||||
%status = iGetRegistrationStatus();
|
||||
while( %status == 1 )
|
||||
{
|
||||
%status = iGetRegistrationStatus();
|
||||
}
|
||||
|
||||
switch( %status )
|
||||
{
|
||||
case 0:
|
||||
// Woot
|
||||
%this.regSucceed();
|
||||
return;
|
||||
case 2:
|
||||
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
|
||||
case 3:
|
||||
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
|
||||
case 4:
|
||||
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
|
||||
case 5:
|
||||
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
|
||||
}
|
||||
|
||||
if( %errorString !$= "" )
|
||||
{
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.popDialog( %this );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch( %ret )
|
||||
{
|
||||
case 2:
|
||||
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
|
||||
case 3:
|
||||
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
|
||||
case 4:
|
||||
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
|
||||
case 5:
|
||||
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
|
||||
|
||||
case -1:
|
||||
%errorString = "An unknown error has occured.";
|
||||
}
|
||||
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", %errorString );
|
||||
}
|
||||
}
|
||||
|
||||
function RegisterDlg::regSucceed(%this)
|
||||
{
|
||||
if( $UseSysMessageBox )
|
||||
sysMessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
|
||||
else
|
||||
MessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
|
||||
|
||||
Canvas.popDialog( %this );
|
||||
Canvas.popDialog( ThirtyDayTrialDlg ); //*** Also pop the 30-day dialog
|
||||
|
||||
//*** If the 30-day trial was up and only this dialog is visible, we need to bring back up
|
||||
//*** the exporter interface
|
||||
if($ThirtyDayOver == true)
|
||||
{
|
||||
startExporter();
|
||||
}
|
||||
}
|
BIN
example/tstpro/common/ui/RegisterDlg.gui.dso
Normal file
211
example/tstpro/common/ui/SaveFileDlg.gui
Normal file
@ -0,0 +1,211 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(SaveFileDlg) {
|
||||
profile = "GuiDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "131 77";
|
||||
extent = "378 326";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Save File...";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(SaveFileDlg);";
|
||||
|
||||
new GuiPopUpMenuCtrl(SA_directoryList) {
|
||||
profile = "GuiPopUpMenuProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "68 23";
|
||||
extent = "226 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
maxLength = "255";
|
||||
maxPopupHeight = "200";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "9 46";
|
||||
extent = "285 248";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "0";
|
||||
defaultLineHeight = "15";
|
||||
childMargin = "0 0";
|
||||
|
||||
new GuiTextListCtrl(SA_fileList) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "267 144";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
altCommand = "doSACallback();";
|
||||
helpTag = "0";
|
||||
enumerate = "0";
|
||||
resizeCell = "1";
|
||||
columns = "0";
|
||||
fitParentWidth = "1";
|
||||
clipColumnText = "0";
|
||||
noDuplicates = "false";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "303 268";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "doSACallback();";
|
||||
helpTag = "0";
|
||||
text = "Save";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "303 294";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
command = "Canvas.popDialog(SaveFileDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
new GuiTextEditCtrl(SA_nameEdit) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "8 299";
|
||||
extent = "286 16";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
maxLength = "255";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 21";
|
||||
extent = "55 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Directory";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ex: getSaveFilename("~/stuff/*.*", saveStuff);
|
||||
// -- calls 'saveStuff(%filename)' on dblclick or ok
|
||||
//------------------------------------------------------------------------------
|
||||
function getSaveFilename(%filespec, %callback, %currentFile)
|
||||
{
|
||||
$SA_callback = %callback;
|
||||
$SA_filespec = %filespec;
|
||||
|
||||
%hasPath = (filePath(%currentFile) $= "") ? false : true;
|
||||
Canvas.pushDialog(SaveFileDlg, 99);
|
||||
|
||||
// Fill the Directory Drop Down
|
||||
%i = 0;
|
||||
%unique = 0;
|
||||
SA_directoryList.clear();
|
||||
for(%file = findFirstFile("*"); %file !$= ""; %file = findNextFile("*"))
|
||||
if (strstr(%file, "/CVS/") == -1)
|
||||
{
|
||||
%path = filePath(%file);
|
||||
if (!%unique[%path])
|
||||
{
|
||||
%i++;
|
||||
%unique[%path] = %i;
|
||||
SA_directoryList.add(%path, %i);
|
||||
if (!%hasPath)
|
||||
{
|
||||
if (isFile(%path @ "/" @ %currentFile))
|
||||
{
|
||||
%currentFile = %path @ "/" @ %currentFile;
|
||||
%hasPath = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SA_directoryList.sort();
|
||||
|
||||
// select the directory represented by current file
|
||||
if ( %unique[filePath(%currentFile)] )
|
||||
SA_directoryList.setSelected( %unique[filePath(%currentFile)] );
|
||||
else
|
||||
SA_directoryList.setSelected( 1 );
|
||||
|
||||
SA_nameEdit.setValue(fileName(%currentFile));
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
function doSACallback()
|
||||
{
|
||||
if (SA_nameEdit.getValue() !$= "" && SA_directoryList.getValue() !$= "")
|
||||
{
|
||||
%file = SA_directoryList.getValue() @ "/" @ SA_nameEdit.getValue();
|
||||
eval( $SA_callback @ "(\"" @ %file @"\");" );
|
||||
}
|
||||
Canvas.popDialog(SaveFileDlg);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
function SA_directoryList::onSelect(%this, %id)
|
||||
{
|
||||
// when a directory is selected put it's files in the file list
|
||||
SA_fileList.clear();
|
||||
%filespec = %this.getTextById(%id) @ "/" @ $SA_filespec;
|
||||
for(%file = findFirstFile(%filespec); %file !$= ""; %file = findNextFile(%filespec))
|
||||
if (strStr(%file, "/CVS/") == -1)
|
||||
SA_fileList.addRow(%i++, fileName(%file));
|
||||
SA_fileList.sort(0);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------
|
||||
function SA_filelist::onSelect(%this, %id)
|
||||
{
|
||||
// when a file is selected change the current filename
|
||||
SA_nameEdit.setValue(%this.getRowTextById(%id));
|
||||
}
|
||||
|
BIN
example/tstpro/common/ui/SaveFileDlg.gui.dso
Normal file
83
example/tstpro/common/ui/ThirtyDayTrialDlg COPY.gui
Normal file
@ -0,0 +1,83 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(ThirtyDayTrialDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "190 140";
|
||||
extent = "259 200";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "0";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiButtonCtrl(TDT_regbtn) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "173 163";
|
||||
extent = "79 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "ThirtyDayTrialDlg.pushRegisterBtn();";
|
||||
text = "Register";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiMLTextCtrl(TDT_text) {
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "9 30";
|
||||
extent = "244 123";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "";
|
||||
};
|
||||
new GuiButtonCtrl(TDT_ok) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "90 163";
|
||||
extent = "79 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "ThirtyDayTrialDlg.pushOkBtn();";
|
||||
text = "Ok";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
function ThirtyDayTrialDlg::onWake(%this)
|
||||
{
|
||||
TDT_text.setText( wpbGetEvalDays() @ " out of " @ wpbGetMaxEvalDays() @ " days evaluated." );
|
||||
}
|
||||
|
||||
function ThirtyDayTrialDlg::pushRegisterBtn(%this)
|
||||
{
|
||||
Canvas.pushDialog(RegisterDlg);
|
||||
}
|
||||
|
||||
function ThirtyDayTrialDlg::pushOkBtn(%this)
|
||||
{
|
||||
|
||||
}
|
170
example/tstpro/common/ui/ThirtyDayTrialDlg.gui
Normal file
@ -0,0 +1,170 @@
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(ThirtyDayTrialDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "237 110";
|
||||
extent = "326 380";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
maxLength = "255";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "0";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiButtonCtrl(TDT_regbtn) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "123 338";
|
||||
extent = "80 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "ThirtyDayTrialDlg.pushRegisterBtn();";
|
||||
text = "Register";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiMLTextCtrl(TDT_text) {
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 290";
|
||||
extent = "244 14";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
};
|
||||
new GuiButtonCtrl(TDT_ok) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "33 338";
|
||||
extent = "80 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "ThirtyDayTrialDlg.pushOkBtn();";
|
||||
text = "Ok";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
new GuiColouredBox() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 30";
|
||||
extent = "306 256";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
color = "255 255 255 255";
|
||||
color2 = "0 0 0 255";
|
||||
opaque = "1";
|
||||
gradientDir = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "25 0";
|
||||
extent = "256 256";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
bitmap = "./productlogo";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiText24Profile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "85 175";
|
||||
extent = "136 28";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Tryout Version";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "36 205";
|
||||
extent = "234 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "This tryout version will expire after a limited time.";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "46 225";
|
||||
extent = "213 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
text = "Purchase today at www.garagegames.com";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
new GuiProgressCtrl(TDT_progress) {
|
||||
profile = "GuiProgressProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 308";
|
||||
extent = "306 20";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
};
|
||||
new GuiButtonCtrl(TDT_purbtn) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "213 338";
|
||||
extent = "80 30";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "ThirtyDayTrialDlg.pushPurchaseBtn();";
|
||||
text = "Purchase";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
function ThirtyDayTrialDlg::onWake(%this)
|
||||
{
|
||||
TDT_text.setText( wpbGetEvalDays() @ " out of " @ wpbGetMaxEvalDays() @ " days evaluated." );
|
||||
|
||||
%percent = wpbGetEvalDays() / wpbGetMaxEvalDays();
|
||||
TDT_progress.setValue( %percent );
|
||||
}
|
||||
|
||||
function ThirtyDayTrialDlg::pushRegisterBtn(%this)
|
||||
{
|
||||
Canvas.pushDialog(RegisterDlg);
|
||||
}
|
||||
|
||||
function ThirtyDayTrialDlg::pushPurchaseBtn(%this)
|
||||
{
|
||||
gotoWebPage("http://www.garagegames.com/pg/product/view.php?id=59");
|
||||
}
|
||||
|
||||
function ThirtyDayTrialDlg::pushOkBtn(%this)
|
||||
{
|
||||
Canvas.popDialog(ThirtyDayTrialDlg);
|
||||
}
|
BIN
example/tstpro/common/ui/ThirtyDayTrialDlg.gui.dso
Normal file
BIN
example/tstpro/common/ui/cache/Arial Bold Italic_16.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial Bold_14.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial Bold_16.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial Bold_20.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial Bold_24.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial Bold_32.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial Italic_16.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial Narrow_14.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial_12.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial_13.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial_14.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial_16.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial_24.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Arial_36.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Courier New_14.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/Lucida Console_12.gft
vendored
Normal file
BIN
example/tstpro/common/ui/cache/arial bold_18.gft
vendored
Normal file
15
example/tstpro/common/ui/cache/clipboard.gui
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
new SimSet(guiClipboard) {
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "126 180";
|
||||
extent = "148 18";
|
||||
minExtent = "8 2";
|
||||
visible = "1";
|
||||
command = "gotoWebPage(\"www.garagegames.com\");";
|
||||
text = "Synapse Gaming Lighting Pack";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
BIN
example/tstpro/common/ui/darkBorder.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
example/tstpro/common/ui/darkScroll.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
example/tstpro/common/ui/darkWindow.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
example/tstpro/common/ui/defaultProfiles.cs.dso
Normal file
BIN
example/tstpro/common/ui/osxCheck.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
example/tstpro/common/ui/osxMenu.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
example/tstpro/common/ui/osxRadio.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
example/tstpro/common/ui/osxScroll.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
example/tstpro/common/ui/osxWindow.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
example/tstpro/common/ui/productlogo.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
example/tstpro/common/ui/torqueCheck.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
example/tstpro/common/ui/torqueMenu.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
example/tstpro/common/ui/torqueRadio.png
Normal file
After Width: | Height: | Size: 480 B |