mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-28 15:55:39 +00:00
Updates the behavior and layout of the ImageAsset, MaterialAsset and ShapeAsset inspector field types to be clearer, with previews and obvious edit buttons
Also fixes drag-n-drop behavior from the AB into the image and shape fields to ensure they update as expected.
This commit is contained in:
parent
fc1bbabe46
commit
6162c5da05
11 changed files with 422 additions and 108 deletions
|
|
@ -336,17 +336,14 @@ function GuiInspectorTypeImageAssetPtr::onControlDropped( %this, %payload, %posi
|
|||
return;
|
||||
|
||||
%assetType = %payload.assetType;
|
||||
%module = %payload.moduleName;
|
||||
%assetName = %payload.assetName;
|
||||
|
||||
if(%assetType $= "ImageAsset")
|
||||
{
|
||||
%module = %payload.moduleName;
|
||||
%asset = %payload.assetName;
|
||||
|
||||
%oldValue = %this.targetObject.bitmapAsset;
|
||||
%arrayIndex = "";
|
||||
|
||||
%targetObject = %this.targetObject;
|
||||
%targetObject.bitmapAsset = %module @ ":" @ %asset;
|
||||
%cmd = %this @ ".apply(\""@ %module @ ":" @ %assetName @ "\");";
|
||||
echo("Changing asset via the " @ %cmd @ " command");
|
||||
eval(%cmd);
|
||||
}
|
||||
|
||||
EWorldEditor.isDirty = true;
|
||||
|
|
|
|||
|
|
@ -411,18 +411,14 @@ function GuiInspectorTypeShapeAssetPtr::onControlDropped( %this, %payload, %posi
|
|||
return;
|
||||
|
||||
%assetType = %payload.assetType;
|
||||
%module = %payload.moduleName;
|
||||
%assetName = %payload.assetName;
|
||||
|
||||
if(%assetType $= "ShapeAsset")
|
||||
{
|
||||
%module = %payload.moduleName;
|
||||
%asset = %payload.assetName;
|
||||
|
||||
%oldValue = %this.targetObject.shapeAsset;
|
||||
%arrayIndex = "";
|
||||
|
||||
%targetObject = %this.targetObject;
|
||||
%targetObject.shapeAsset = %module @ ":" @ %asset;
|
||||
|
||||
%cmd = %this @ ".apply(\""@ %module @ ":" @ %assetName @ "\");";
|
||||
echo("Changing asset via the " @ %cmd @ " command");
|
||||
eval(%cmd);
|
||||
}
|
||||
|
||||
EWorldEditor.isDirty = true;
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ new GuiControlProfile( ToolsGuiTextEditProfile )
|
|||
border = -2; // fix to display textEdit img
|
||||
//borderWidth = "1"; // fix to display textEdit img
|
||||
//borderColor = "100 100 100";
|
||||
fillColor = EditorSettings.value("Theme/fieldBGColor");
|
||||
fillColor = EditorSettings.value("Theme/dividerDarkColor");
|
||||
fillColorHL = "75 75 75 255";
|
||||
fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue