mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-03 11:35:11 +00:00
Merge pull request #472 from Areloch/moduleFriendlyDBCreation
Makes the DB creation process better jive with modules
This commit is contained in:
commit
1695e76514
2 changed files with 13 additions and 2 deletions
|
|
@ -299,7 +299,7 @@
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "0";
|
||||
Command = "DatablockEditorPlugin.createDatablock();";
|
||||
Command = "DatablockEditorPlugin.pickDatablockPath();";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Create New Datablock";
|
||||
hovertime = "1000";
|
||||
|
|
|
|||
|
|
@ -674,8 +674,19 @@ function DatablockEditorPlugin::createDatablock(%this)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
function DatablockEditorPlugin::pickDatablockPath(%this)
|
||||
{
|
||||
SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, "DatablockEditorPlugin.pickedNewDBPath", "Select New Datablock Path");
|
||||
SelectAssetPathWindow.selectWindow();
|
||||
}
|
||||
|
||||
function DatablockEditorPlugin::createPromptNameCheck(%this)
|
||||
function DatablockEditorPlugin::pickedNewDBPath(%this, %path)
|
||||
{
|
||||
$DATABLOCK_EDITOR_DEFAULT_FILENAME = %path @ "/managedDatablocks." @ $TorqueScriptFileExtension;
|
||||
DatablockEditorPlugin.createDatablock();
|
||||
}
|
||||
|
||||
function DatablockEditorPlugin::createPromptNameCheck(%this, %path)
|
||||
{
|
||||
%name = DatablockEditorCreatePrompt-->CreateDatablockName.getText();
|
||||
if( !Editor::validateObjectName( %name, true ) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue