mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +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";
|
canSave = "1";
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
new GuiVariableInspector(AssetEditInspector) {
|
new GuiInspector(AssetEditInspector) {
|
||||||
dividerMargin = "5";
|
dividerMargin = "5";
|
||||||
showCustomFields = "1";
|
showCustomFields = "1";
|
||||||
stackingType = "Vertical";
|
stackingType = "Vertical";
|
||||||
|
|
|
||||||
|
|
@ -95,38 +95,20 @@ function ImageAsset::generatePreviewImage(%this, %previewButton, %forceRegenerat
|
||||||
|
|
||||||
function ImageAsset::onShowActionMenu(%this)
|
function ImageAsset::onShowActionMenu(%this)
|
||||||
{
|
{
|
||||||
if( !isObject( EditImageAssetTypePopup ) )
|
GenericAsset::onShowActionMenu(%this);
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 )
|
function GuiInspectorTypeImageAssetPtr::onControlDropped( %this, %payload, %position )
|
||||||
{
|
{
|
||||||
Canvas.popDialog(EditorDragAndDropLayer);
|
Canvas.popDialog(EditorDragAndDropLayer);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue