mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Fixes the handling of imageAssets for array'd field types, as well as fixing the editor behavior of guiBitmapCtrl so the imageAssets correctly update the fields upon editing
This commit is contained in:
parent
79e06af6dd
commit
1e21cc678f
2 changed files with 17 additions and 4 deletions
|
|
@ -482,13 +482,13 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
|||
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
{
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mCaption);
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s);",
|
||||
getIdString());
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
|
||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||
|
||||
previewImage = mInspector->getInspectObject()->getDataField(mCaption, NULL);
|
||||
previewImage = getData();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -672,7 +672,7 @@ void GuiInspectorTypeImageAssetPtr::updatePreviewImage()
|
|||
{
|
||||
const char* previewImage;
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
previewImage = mInspector->getInspectObject()->getDataField(mCaption, NULL);
|
||||
previewImage = getData();
|
||||
else
|
||||
previewImage = Con::getVariable(mVariableName);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue