mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-01 03:23:52 +00:00
Made the Asset Properties inspector ctrl be a regular GuiInspector control
Standardized the image asset action menu and editing callbacks while leaving it open for modification/expansion later as needed
This commit is contained in:
parent
5566f8a396
commit
0bf38aacf3
2 changed files with 13 additions and 31 deletions
|
|
@ -75,7 +75,7 @@ $guiContent = new GuiControl(AssetBrowser_editAsset) {
|
|||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiVariableInspector(AssetEditInspector) {
|
||||
new GuiInspector(AssetEditInspector) {
|
||||
dividerMargin = "5";
|
||||
showCustomFields = "1";
|
||||
stackingType = "Vertical";
|
||||
|
|
|
|||
|
|
@ -95,38 +95,20 @@ function ImageAsset::generatePreviewImage(%this, %previewButton, %forceRegenerat
|
|||
|
||||
function ImageAsset::onShowActionMenu(%this)
|
||||
{
|
||||
if( !isObject( EditImageAssetTypePopup ) )
|
||||
{
|
||||
new PopupMenu( EditImageAssetTypePopup )
|
||||
{
|
||||
superClass = "MenuBuilder";
|
||||
class = "EditorWorldMenu";
|
||||
|
||||
jumpFileName = "";
|
||||
jumpLineNumber = "";
|
||||
};
|
||||
}
|
||||
|
||||
EditImageAssetTypePopup.objectData = %this;
|
||||
EditImageAssetTypePopup.objectType = "ImageAsset";
|
||||
|
||||
//Regen the menu so we're fully up and current with options and references
|
||||
EditImageAssetTypePopup.clearItems();
|
||||
|
||||
EditImageAssetTypePopup.item[ 0 ] = "Rename Folder" TAB "" TAB $CurrentAssetBrowser @ ".renameAsset();";
|
||||
EditImageAssetTypePopup.item[ 1 ] = "Duplicate Folder" TAB "" TAB $CurrentAssetBrowser @ ".duplicateAsset();";
|
||||
EditImageAssetTypePopup.item[ 2 ] = "-";
|
||||
EditImageAssetTypePopup.item[ 3 ] = "Open File Location" TAB "" TAB $CurrentAssetBrowser @ ".openFolderLocation(" @ filePath(%this.getFilename()) @ ");";
|
||||
EditImageAssetTypePopup.item[ 4 ] = "-";
|
||||
EditImageAssetTypePopup.item[ 5 ] = "Delete Folder" TAB "" TAB $CurrentAssetBrowser @ ".deleteAsset();";
|
||||
|
||||
EditImageAssetTypePopup.reloadItems();
|
||||
|
||||
EditImageAssetTypePopup.showPopup(Canvas);
|
||||
|
||||
$CurrentAssetBrowser.popupMenu = EditImageAssetTypePopup;
|
||||
GenericAsset::onShowActionMenu(%this);
|
||||
}
|
||||
|
||||
function ImageAsset::onEditProperties(%this)
|
||||
{
|
||||
GenericAsset::onEditProperties(%this);
|
||||
}
|
||||
|
||||
//Called when the AssetType has it's properties saved from the onEditProperties process
|
||||
function ImageAsset::onSaveProperties(%this)
|
||||
{
|
||||
GenericAsset::onSaveProperties(%this);
|
||||
}
|
||||
|
||||
function GuiInspectorTypeImageAssetPtr::onControlDropped( %this, %payload, %position )
|
||||
{
|
||||
Canvas.popDialog(EditorDragAndDropLayer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue