mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-12 08:51:41 +00:00
273 lines
7.6 KiB
Text
273 lines
7.6 KiB
Text
//--- OBJECT WRITE BEGIN ---
|
|
%guiContent = new GuiControl(ChooseLevelDlg) {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
isContainer = "1";
|
|
Profile = "GuiOverlayProfile";
|
|
HorizSizing = "width";
|
|
VertSizing = "height";
|
|
position = "0 0";
|
|
Extent = "1024 768";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
|
|
new GuiWindowCtrl(ChooseLevelWindow) {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
isContainer = "1";
|
|
Profile = "GuiWindowProfile";
|
|
HorizSizing = "center";
|
|
VertSizing = "center";
|
|
Position = "252 224";
|
|
Extent = "600 433";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
isDecoy = "0";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
Margin = "0 0 0 0";
|
|
Padding = "0 0 0 0";
|
|
AnchorTop = "1";
|
|
AnchorBottom = "0";
|
|
AnchorLeft = "1";
|
|
AnchorRight = "0";
|
|
resizeWidth = "0";
|
|
resizeHeight = "0";
|
|
canMove = "1";
|
|
canClose = "1";
|
|
canMinimize = "0";
|
|
canMaximize = "0";
|
|
minSize = "50 50";
|
|
EdgeSnap = "1";
|
|
text = "Choose Level";
|
|
closeCommand = "Canvas.popDialog(ChooseLevelDlg);";
|
|
|
|
new GuiBitmapCtrl() {
|
|
canSaveDynamicFields = "1";
|
|
internalName = "CurrentPreview";
|
|
Enabled = "1";
|
|
isContainer = "0";
|
|
Profile = "GuiDefaultProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "10 31";
|
|
Extent = "400 300";
|
|
MinExtent = "8 2";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
bitmap = "./no-preview";
|
|
wrap = "0";
|
|
};
|
|
|
|
new GuiTextCtrl() {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
internalName = "LevelName";
|
|
isContainer = "0";
|
|
Profile = "GuiMediumTextProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "420 31";
|
|
Extent = "165 18";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
Margin = "0 0 0 0";
|
|
Padding = "0 0 0 0";
|
|
AnchorTop = "1";
|
|
AnchorBottom = "0";
|
|
AnchorLeft = "1";
|
|
AnchorRight = "0";
|
|
text = "Level";
|
|
maxLength = "255";
|
|
};
|
|
new GuiTextCtrl() {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
isContainer = "0";
|
|
Profile = "GuiTextProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "420 50";
|
|
Extent = "72 18";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
Margin = "0 0 0 0";
|
|
Padding = "0 0 0 0";
|
|
AnchorTop = "1";
|
|
AnchorBottom = "0";
|
|
AnchorLeft = "1";
|
|
AnchorRight = "0";
|
|
text = "Description:";
|
|
maxLength = "255";
|
|
};
|
|
new GuiMLTextCtrl() {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
internalName = "LevelDescription";
|
|
isContainer = "0";
|
|
Profile = "GuiMLTextProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "420 76";
|
|
Extent = "165 189";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
Margin = "0 0 0 0";
|
|
Padding = "0 0 0 0";
|
|
AnchorTop = "1";
|
|
AnchorBottom = "0";
|
|
AnchorLeft = "1";
|
|
AnchorRight = "0";
|
|
text = "";
|
|
maxLength = "255";
|
|
};
|
|
new GuiCheckBoxCtrl() {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
isContainer = "0";
|
|
Profile = "GuiCheckBoxProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "420 303";
|
|
Extent = "45 23";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
Variable = "pref::HostMultiPlayer";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
text = " Host";
|
|
groupNum = "-1";
|
|
buttonType = "ToggleButton";
|
|
useMouseEvents = "0";
|
|
useInactiveState = "0";
|
|
};
|
|
new GuiButtonCtrl(ChooseLevelDlgGoBtn) {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
isContainer = "0";
|
|
Profile = "GuiMenuButtonProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "458 287";
|
|
Extent = "143 56";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
text = "Go!";
|
|
groupNum = "-1";
|
|
buttonType = "PushButton";
|
|
useMouseEvents = "1";
|
|
};
|
|
|
|
new GuiBitmapButtonCtrl() {
|
|
canSaveDynamicFields = "1";
|
|
internalName = "PreviousSmallPreviews";
|
|
Enabled = "1";
|
|
isContainer = "0";
|
|
Profile = "GuiDefaultProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "10 343";
|
|
Extent = "11 81";
|
|
MinExtent = "8 2";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
bitmap = "art/gui/previous-button";
|
|
wrap = "0";
|
|
command = "ChooseLevelWindow.previousPreviews();";
|
|
};
|
|
|
|
new GuiDynamicCtrlArrayControl() {
|
|
internalName = "SmallPreviews";
|
|
position = "24 343";
|
|
extent = "600 81";
|
|
autoCellSize = true;
|
|
colSpacing = 3;
|
|
colCount = 5;
|
|
rowCount = 1;
|
|
};
|
|
|
|
new GuiBitmapButtonCtrl() {
|
|
canSaveDynamicFields = "1";
|
|
internalName = "NextSmallPreviews";
|
|
Enabled = "1";
|
|
isContainer = "0";
|
|
Profile = "GuiDefaultProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "579 343";
|
|
Extent = "11 81";
|
|
MinExtent = "8 2";
|
|
canSave = "1";
|
|
Visible = "1";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
bitmap = "art/gui/next-button";
|
|
wrap = "0";
|
|
command = "ChooseLevelWindow.nextPreviews();";
|
|
};
|
|
|
|
new GuiTextListCtrl(CL_levelList) {
|
|
canSaveDynamicFields = "0";
|
|
Enabled = "1";
|
|
isContainer = "1";
|
|
Profile = "GuiTextArrayProfile";
|
|
HorizSizing = "right";
|
|
VertSizing = "bottom";
|
|
position = "1 1";
|
|
Extent = "421 144";
|
|
MinExtent = "8 8";
|
|
canSave = "1";
|
|
Visible = "0";
|
|
tooltipprofile = "GuiToolTipProfile";
|
|
hovertime = "1000";
|
|
enumerate = "0";
|
|
resizeCell = "1";
|
|
columns = "0";
|
|
fitParentWidth = "1";
|
|
clipColumnText = "0";
|
|
};
|
|
};
|
|
};
|
|
//--- OBJECT WRITE END ---
|
|
|
|
// Do this onMouseUp not via Command which occurs onMouseDown so we do
|
|
// not have a lingering mouseUp event lingering in the ether.
|
|
function ChooseLevelDlgGoBtn::onMouseUp( %this )
|
|
{
|
|
// So we can't fire the button when loading is in progress.
|
|
if ( isObject( ServerGroup ) )
|
|
return;
|
|
|
|
// Launch the chosen level with the editor open?
|
|
if ( ChooseLevelDlg.launchInEditor )
|
|
{
|
|
activatePackage( "BootEditor" );
|
|
ChooseLevelDlg.launchInEditor = false;
|
|
StartLevel("", "SinglePlayer");
|
|
}
|
|
else
|
|
{
|
|
StartLevel();
|
|
}
|
|
}
|