mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-31 01:51:00 +00:00
Reorged the canvas handling of gamepad inputs for the axis and triggers to use the SI_ versions in the right spots Fixed issue where pause menu would be hidden and not display again Made the pause menu active from the gamepad start button rather than back
180 lines
5.3 KiB
Plaintext
180 lines
5.3 KiB
Plaintext
//--- OBJECT WRITE BEGIN ---
|
|
%guiContent = new GuiControl(toolsMessageBoxSaveChangesDlg, 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 toolsMessageBoxSaveChangesDlg::onWake( %this )
|
|
{
|
|
MBSaveChangesFrame.setText( %this.Data );
|
|
}
|
|
|
|
function mbSaveDlgSaveButton::onClick( %this )
|
|
{
|
|
if( toolsMessageBoxSaveChangesDlg.SaveCallback !$= "" )
|
|
eval( toolsMessageBoxSaveChangesDlg.SaveCallback @ "(" @ toolsMessageBoxSaveChangesDlg.Data @ ");" );
|
|
Canvas.popDialog( toolsMessageBoxSaveChangesDlg );
|
|
}
|
|
|
|
function mbSaveDlgCancelButton::onClick( %this )
|
|
{
|
|
Canvas.popDialog( toolsMessageBoxSaveChangesDlg );
|
|
}
|
|
|
|
function mbSaveDlgDontButton::onClick( %this )
|
|
{
|
|
if( toolsMessageBoxSaveChangesDlg.DontSaveCallback !$= "" )
|
|
eval( toolsMessageBoxSaveChangesDlg.DontSaveCallback @ "(" @ toolsMessageBoxSaveChangesDlg.Data @ ");" );
|
|
Canvas.popDialog( toolsMessageBoxSaveChangesDlg );
|
|
}
|
|
|
|
// Deprecated when platform layers are all sufficient
|
|
function checkSaveChangesOld( %data, %saveCallback, %dontSaveCallback )
|
|
{
|
|
// Sanity Check
|
|
if( toolsMessageBoxSaveChangesDlg.isAwake() )
|
|
{
|
|
warn("Save Changes Dialog already Awake, NOT creating second instance.");
|
|
return;
|
|
}
|
|
|
|
// Set Proper State
|
|
toolsMessageBoxSaveChangesDlg.SaveCallback = %saveCallback;
|
|
toolsMessageBoxSaveChangesDlg.DontSaveCallback = %dontSaveCallback;
|
|
toolsMessageBoxSaveChangesDlg.Data = %data;
|
|
|
|
// Show Dialog
|
|
Canvas.pushDialog( toolsMessageBoxSaveChangesDlg );
|
|
} |