mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Full Template for ticket #1
This commit is contained in:
parent
74f265b3b3
commit
f439dc8dcd
2150 changed files with 286240 additions and 0 deletions
180
Templates/Full/game/tools/gui/saveChangesMBDlg.ed.gui
Normal file
180
Templates/Full/game/tools/gui/saveChangesMBDlg.ed.gui
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(MessageBoxSaveChangesDlg, EditorGuiGroup) {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiWindowCtrl(MBSaveChangesFrame) {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
position = "362 274";
|
||||
Extent = "340 164";
|
||||
MinExtent = "48 92";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
text = "Save Changes";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiIconButtonCtrl(mbSaveDlgSaveButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "240 117";
|
||||
Extent = "83 25";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
text = "Save";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
iconBitmap = "~/levelEditor/gui/images/iconAccept.png";
|
||||
sizeIconToButton = "0";
|
||||
textLocation = "Center";
|
||||
textMargin = "4";
|
||||
buttonMargin = "4 4";
|
||||
};
|
||||
new GuiIconButtonCtrl(mbSaveDlgCancelButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "158 117";
|
||||
Extent = "83 25";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
iconBitmap = "~/levelEditor/gui/images/iconCancel.png";
|
||||
sizeIconToButton = "0";
|
||||
textLocation = "Center";
|
||||
textMargin = "4";
|
||||
buttonMargin = "4 4";
|
||||
};
|
||||
new GuiIconButtonCtrl(mbSaveDlgDontButton) {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "14 117";
|
||||
Extent = "124 25";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
text = "Don\'t Save";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
sizeIconToButton = "0";
|
||||
textLocation = "Center";
|
||||
textMargin = "4";
|
||||
buttonMargin = "4 4";
|
||||
};
|
||||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "13 31";
|
||||
Extent = "310 73";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "EditorTextHLBoldLeft";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "15 9";
|
||||
Extent = "281 26";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
text = "Do you want to save changes to this document?";
|
||||
maxLength = "1024";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "15 38";
|
||||
Extent = "258 21";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
text = "If you don\'t save, your changes may be lost.";
|
||||
maxLength = "1024";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
function MessageBoxSaveChangesDlg::onWake( %this )
|
||||
{
|
||||
MBSaveChangesFrame.setText( %this.Data );
|
||||
}
|
||||
|
||||
function mbSaveDlgSaveButton::onClick( %this )
|
||||
{
|
||||
if( MessageBoxSaveChangesDlg.SaveCallback !$= "" )
|
||||
eval( MessageBoxSaveChangesDlg.SaveCallback @ "(" @ MessageBoxSaveChangesDlg.Data @ ");" );
|
||||
Canvas.popDialog( MessageBoxSaveChangesDlg );
|
||||
}
|
||||
|
||||
function mbSaveDlgCancelButton::onClick( %this )
|
||||
{
|
||||
Canvas.popDialog( MessageBoxSaveChangesDlg );
|
||||
}
|
||||
|
||||
function mbSaveDlgDontButton::onClick( %this )
|
||||
{
|
||||
if( MessageBoxSaveChangesDlg.DontSaveCallback !$= "" )
|
||||
eval( MessageBoxSaveChangesDlg.DontSaveCallback @ "(" @ MessageBoxSaveChangesDlg.Data @ ");" );
|
||||
Canvas.popDialog( MessageBoxSaveChangesDlg );
|
||||
}
|
||||
|
||||
// Deprecated when platform layers are all sufficient
|
||||
function checkSaveChangesOld( %data, %saveCallback, %dontSaveCallback )
|
||||
{
|
||||
// Sanity Check
|
||||
if( MessageBoxSaveChangesDlg.isAwake() )
|
||||
{
|
||||
warn("Save Changes Dialog already Awake, NOT creating second instance.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Set Proper State
|
||||
MessageBoxSaveChangesDlg.SaveCallback = %saveCallback;
|
||||
MessageBoxSaveChangesDlg.DontSaveCallback = %dontSaveCallback;
|
||||
MessageBoxSaveChangesDlg.Data = %data;
|
||||
|
||||
// Show Dialog
|
||||
Canvas.pushDialog( MessageBoxSaveChangesDlg );
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue