Torque3D/Templates/Full/game/tools/gui/saveChangesMBDlg.ed.gui
thecelloman ceff8d72e0 Tools GuiProfile Separation.
This effectively duplicates (where necessary) and moves tools specific GuiProfiles out of the core and into the tools.  This will allow future modifications to either the game guis or tools guis that use these profiles to not conflict with each other.
2013-03-18 06:38:48 -04:00

180 lines
No EOL
5.3 KiB
Text

//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(MessageBoxSaveChangesDlg, EditorGuiGroup) {
canSaveDynamicFields = "0";
Profile = "ToolsGuiDefaultProfile";
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 = "ToolsGuiWindowProfile";
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 = "ToolsGuiButtonProfile";
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 = "ToolsGuiButtonProfile";
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 = "ToolsGuiButtonProfile";
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 = "ToolsGuiDefaultProfile";
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 = "ToolsGuiDefaultProfile";
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 );
}