Shifts the tools messageboxes to be distinct from any messageboxes in the main game

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
This commit is contained in:
Areloch 2020-07-24 00:40:03 -05:00
parent ef4cc8b573
commit 5b289bce5e
57 changed files with 217 additions and 217 deletions

View file

@ -413,7 +413,7 @@ function ECameraSettingsPage::deleteCameraSettingsGroup( %this, %levelName, %rol
{
if( %levelName $= EditorGui.levelName )
{
MessageBoxOK("Error", "You may not delete the settings group associated with the currently loaded level");
toolsMessageBoxOK("Error", "You may not delete the settings group associated with the currently loaded level");
return;
}

View file

@ -238,7 +238,7 @@ function TerrainExportGui::export( %this )
%terrainObj = TerrainSelectListBox.getItemObject( %itemId );
if ( !isObject( %terrainObj ) )
{
MessageBoxOK( "Export failed", "Could not find the selected TerrainBlock!" );
toolsMessageBoxOK( "Export failed", "Could not find the selected TerrainBlock!" );
return;
}

View file

@ -620,7 +620,7 @@ function TerrainImportGui::import( %this )
}
else
{
MessageBox( "Import Terrain",
toolsMessageBox( "Import Terrain",
"Terrain import failed! Check console for error messages.",
"Ok", "Error" );
}

View file

@ -716,7 +716,7 @@ function ObjectBuilderGui::buildScatterSky( %this, %dontWarnAboutSun )
if( %object.isMemberOfClass( "Sun" ) )
{
MessageBoxYesNo( "Warning",
toolsMessageBoxYesNo( "Warning",
"A ScatterSky object will conflict with the Sun object that is already in the level." SPC
"Do you still want to create a ScatterSky object?",
%this @ ".buildScatterSky( true );" );
@ -812,7 +812,7 @@ function ObjectBuilderGui::buildSun( %this, %dontWarnAboutScatterSky )
if( %object.isMemberOfClass( "ScatterSky" ) )
{
MessageBoxYesNo( "Warning",
toolsMessageBoxYesNo( "Warning",
"A Sun object will conflict with the ScatterSky object that is already in the level." SPC
"Do you still want to create a Sun object?",
%this @ ".buildSun( true );" );

View file

@ -45,7 +45,7 @@ function AddFMODProjectDlg::show( %this )
if( getField( sfxGetDeviceInfo(), $SFX::DEVICE_INFO_PROVIDER ) !$= "FMOD" )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"You do not currently have FMOD selected as your sound system." NL
"" NL
"To install FMOD, place the FMOD DLLs (" @ %fmodex @ " and " @ %fmodevent @ ")" SPC
@ -64,7 +64,7 @@ function AddFMODProjectDlg::show( %this )
%deviceCaps = getField( sfxGetDeviceInfo(), $SFX::DEVICE_INFO_CAPS );
if( !( %deviceCaps & $SFX::DEVICE_CAPS_FMODDESIGNER ) )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"You do not have the requisite FMOD Event DLL in place." NL
"" NL
"Please copy " @ %fmodevent @ " into your game/ folder and restart Torque."
@ -114,14 +114,14 @@ function AddFMODProjectDlg::onOK( %this )
if( %fileName $= "" )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"Please enter a project file name."
);
return;
}
if( !isFile( %fileName ) )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"'" @ %fileName @ "' is not a valid file."
);
return;
@ -131,7 +131,7 @@ function AddFMODProjectDlg::onOK( %this )
if( !isDirectory( %mediaPath ) )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"'" @ %mediaPath @ "' is not a valid directory."
);
return;
@ -155,7 +155,7 @@ function AddFMODProjectDlg::onOK( %this )
if( !isObject( %objName ) )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"Failed to create the object. Please take a look at the log for details."
);
return;

View file

@ -2088,7 +2088,7 @@ function EWorldEditor::addSimGroup( %this, %groupCurrentSelection )
%activeSelection = %this.getActiveSelection();
if ( %activeSelection.getObjectIndex( getScene(0) ) != -1 )
{
MessageBoxOK( "Error", "Cannot add Scene to a new SimGroup" );
toolsMessageBoxOK( "Error", "Cannot add Scene to a new SimGroup" );
return;
}

View file

@ -84,7 +84,7 @@ function EManageSFXParameters::createNewParameter( %this, %name )
function EManageSFXParameters::showDeleteParameterDlg( %this, %parameter )
{
MessageBoxOkCancel( "Confirmation",
toolsMessageBoxOkCancel( "Confirmation",
"Really delete '" @ %parameter.getInternalName() @ "'?" NL
"" NL
"The parameter will be removed from the file '" @ %parameter.getFileName() @ "'.",

View file

@ -133,7 +133,7 @@ function ESelectObjectsWindow::onSelectObjects( %this, %val, %reuseExistingSet )
{
if( !%name.isMemberOfClass( "WorldEditorSelection" ) )
{
MessageBoxOk( "Error",
toolsMessageBoxOk( "Error",
"An object called '" @ %name @ "' already exists and is not a selection." NL
"" NL
"Please choose a different name." );
@ -141,7 +141,7 @@ function ESelectObjectsWindow::onSelectObjects( %this, %val, %reuseExistingSet )
}
else if( !%reuseExistingSet )
{
MessageBoxYesNo( "Question",
toolsMessageBoxYesNo( "Question",
"A selection called '" @ %name @ "' already exists. Modify the existing selection?",
%this @ ".onSelectObjects( " @ %val @ ", true );" );
return;
@ -159,7 +159,7 @@ function ESelectObjectsWindow::onSelectObjects( %this, %val, %reuseExistingSet )
eval( "%sel = new WorldEditorSelection( " @ %name @ " ) { parentGroup = Selections; canSave = true; };" );
if( !isObject( %sel ) )
{
MessageBoxOk( "Error",
toolsMessageBoxOk( "Error",
"Could not create the selection set. Please look at the console.log for details." );
return;
}

View file

@ -338,7 +338,7 @@ function EManageBookmarksTextEdit::onValidate( %this )
{
%id = %this.getId();
%callback = %id @ ".setText(\"" @ %oldname @ "\"); " @ %id @ ".makeFirstResponder(true); " @ %id @ ".selectAllText();";
MessageBoxOK("Create Bookmark", "You must provide a unique name for the new bookmark.", %callback);
toolsMessageBoxOK("Create Bookmark", "You must provide a unique name for the new bookmark.", %callback);
return;
}

View file

@ -189,7 +189,7 @@ function EPainter::updateLayers( %this, %matIndex )
function EPainter::showMaterialDeleteDlg( %this, %matInternalName )
{
MessageBoxYesNo( "Confirmation",
toolsMessageBoxYesNo( "Confirmation",
"Really remove material '" @ %matInternalName @ "' from the terrain?",
%this @ ".removeMaterial( " @ %matInternalName @ " );", "" );
}
@ -389,7 +389,7 @@ function TerrainEditorPlugin::setEditorFunction(%this)
%terrainExists = parseMissionGroup( "TerrainBlock" );
if( %terrainExists == false )
MessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset",
toolsMessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset",
"AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule, createTerrainBlock);",
"AssetBrowser.showDialog(\"TerrainAsset\", createTerrainBlock, \"\", \"\", \"\");");
@ -401,7 +401,7 @@ function TerrainPainterPlugin::setEditorFunction(%this, %overrideGroup)
%terrainExists = parseMissionGroup( "TerrainBlock" );
if( %terrainExists == false )
MessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset",
toolsMessageBoxYesNoCancel("No Terrain","Would you like to create a New Terrain? No to Select Existing Terrain Block Asset",
"AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule, createTerrainBlock);",
"AssetBrowser.showDialog(\"TerrainAsset\", createTerrainBlock, \"\", \"\", \"\");");

View file

@ -206,7 +206,7 @@ function TerrainMaterialDlg::setMaterialName( %this, %newName )
%existingMat = TerrainMaterialSet.findObjectByInternalName( %newName );
if( isObject( %existingMat ) )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"There already is a terrain material called '" @ %newName @ "'.", "", "" );
}
else
@ -366,7 +366,7 @@ function TerrainMaterialDlg::deleteMat( %this )
if ( ( ETerrainEditor.getMaterialCount() == 1 ) &&
( ETerrainEditor.getMaterialIndex( %this.activeMat.internalName ) != -1 ) )
{
MessageBoxOK( "Error", "Cannot delete this Material, it is the only " @
toolsMessageBoxOK( "Error", "Cannot delete this Material, it is the only " @
"Material still in use by the active Terrain." );
return;
}
@ -543,7 +543,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
%existingMat = TerrainMaterialSet.findObjectByInternalName( %newName );
if( isObject( %existingMat ) )
{
MessageBoxOK( "Error",
toolsMessageBoxOK( "Error",
"There already is a terrain material called '" @ %newName @ "'.", "", "" );
// Reset the name edit control to the old name.

View file

@ -88,7 +88,7 @@ function EditorQuitGame()
{
if( EditorIsDirty())
{
MessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before quitting?", "EditorSaveMissionMenu(); quit();", "quit();", "" );
toolsMessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before quitting?", "EditorSaveMissionMenu(); quit();", "quit();", "" );
}
else
quit();
@ -98,7 +98,7 @@ function EditorExitMission()
{
if( EditorIsDirty())
{
MessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before exiting?", "EditorDoExitMission(true);", "EditorDoExitMission(false);", "");
toolsMessageBoxYesNoCancel("Level Modified", "Would you like to save your changes before exiting?", "EditorDoExitMission(true);", "EditorDoExitMission(false);", "");
}
else
EditorDoExitMission(false);
@ -129,7 +129,7 @@ function EditorOpenTorsionProject( %projectFile )
%torsionPath = EditorSettings.value( "WorldEditor/torsionPath" );
if( !isFile( %torsionPath ) )
{
MessageBoxOK(
toolsMessageBoxOK(
"Torsion Not Found",
"Torsion not found at '" @ %torsionPath @ "'. Please set the correct path in the Editor Settings."
);
@ -147,7 +147,7 @@ function EditorOpenTorsionProject( %projectFile )
%projectFile = findFirstFile( "*.torsion", false );
if( !isFile( %projectFile ) )
{
MessageBoxOK(
toolsMessageBoxOK(
"Project File Not Found",
"Cannot find .torsion project file in '" @ getMainDotCsDir() @ "'."
);
@ -168,7 +168,7 @@ function EditorOpenFileInTorsion( %file, %line )
%torsionPath = EditorSettings.value( "WorldEditor/torsionPath" );
if( !isFile( %torsionPath ) )
{
MessageBoxOK(
toolsMessageBoxOK(
"Torsion Not Found",
"Torsion not found at '" @ %torsionPath @ "'. Please set the correct path in the Editor Settings."
);
@ -205,7 +205,7 @@ function EditorNewLevel( %file )
if ( EditorIsDirty() )
{
error(knob);
%saveFirst = MessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
%saveFirst = toolsMessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
$Server::MissionFile @ "\" before creating a new mission?", "SaveDontSave", "Question") == $MROk;
}
@ -239,7 +239,7 @@ function EditorNewLevel( %file )
function EditorSaveAsDefaultLevel()
{
MessageBoxYesNo("Save as Default?", "This will save the currently active root scene as the default level the editor loads when it is opened. Continue?",
toolsMessageBoxYesNo("Save as Default?", "This will save the currently active root scene as the default level the editor loads when it is opened. Continue?",
"doEditorSaveAsDefaultLevel();", "");
}
@ -250,7 +250,7 @@ function doEditorSaveAsDefaultLevel()
function EditorResetDefaultLevel()
{
MessageBoxYesNo("Reset Default?", "This will reset the default level for the editor back to the original. Continue?",
toolsMessageBoxYesNo("Reset Default?", "This will reset the default level for the editor back to the original. Continue?",
"doEditorResetDefaultLevel();", "");
}
@ -279,7 +279,7 @@ function EditorSaveMission()
// first check for dirty and read-only files:
if((EWorldEditor.isDirty || ETerrainEditor.isMissionDirty) && !isWriteableFileName($Server::MissionFile))
{
MessageBox("Error", "Mission file \""@ $Server::MissionFile @ "\" is read-only. Continue?", "Ok", "Stop");
toolsMessageBox("Error", "Mission file \""@ $Server::MissionFile @ "\" is read-only. Continue?", "Ok", "Stop");
return false;
}
if(ETerrainEditor.isDirty)
@ -291,7 +291,7 @@ function EditorSaveMission()
{
if (!isWriteableFileName(%terrainObject.terrainFile))
{
if (MessageBox("Error", "Terrain file \""@ %terrainObject.terrainFile @ "\" is read-only. Continue?", "Ok", "Stop") == $MROk)
if (toolsMessageBox("Error", "Terrain file \""@ %terrainObject.terrainFile @ "\" is read-only. Continue?", "Ok", "Stop") == $MROk)
continue;
else
return false;
@ -370,7 +370,7 @@ function EditorOpenMission(%levelAsset)
if( EditorIsDirty())
{
// "EditorSaveBeforeLoad();", "getLoadFilename(\"*.mis\", \"EditorDoLoadMission\");"
if(MessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
if(toolsMessageBox("Mission Modified", "Would you like to save changes to the current mission \"" @
$Server::MissionFile @ "\" before opening a new mission?", SaveDontSave, Question) == $MROk)
{
if(! EditorSaveMission())