mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 08:03:45 +00:00
Fixed Edit button tooltip for Shape Asset field
Disabled Edit button on image asset field as there's no current image editor Fixed positioning of edit buttons to align with preview Fixed horizontal sizing for the edit control so it keeps to the width of the field Fixed handling on the preview display so if an invalid asset is input, it clears the preview display to help indicate it's invalid Disabled the MaterialSlot handling for TSStatics until it can be further refined
This commit is contained in:
parent
6f8df41c6d
commit
74ac45e877
4 changed files with 56 additions and 11 deletions
|
|
@ -580,9 +580,10 @@ bool GuiInspectorTypeMaterialAssetPtr::updateRects()
|
|||
mPreviewBorderButton->resize(previewRect.point, previewRect.extent);
|
||||
mPreviewImage->resize(previewRect.point, previewRect.extent);
|
||||
|
||||
mEdit->resize(Point2I(previewRect.point.x + previewRect.extent.x + 10, rowSize * 1.5), Point2I(200, rowSize));
|
||||
S32 editPos = previewRect.point.x + previewRect.extent.x + 10;
|
||||
mEdit->resize(Point2I(editPos, rowSize * 1.5), Point2I(fieldExtent.x - editPos - 5, rowSize));
|
||||
|
||||
mEditButton->resize(Point2I(fieldExtent.x - 100, fieldExtent.y - rowSize), Point2I(100, rowSize));
|
||||
mEditButton->resize(Point2I(fieldExtent.x - 105, previewRect.point.y + previewRect.extent.y - rowSize), Point2I(100, rowSize));
|
||||
|
||||
mBrowseButton->setHidden(true);
|
||||
|
||||
|
|
@ -604,6 +605,13 @@ void GuiInspectorTypeMaterialAssetPtr::updatePreviewImage()
|
|||
else
|
||||
previewImage = Con::getVariable(mVariableName);
|
||||
|
||||
//if what we're working with isn't even a valid asset, don't present like we found a good one
|
||||
if (!AssetDatabase.isDeclaredAsset(previewImage))
|
||||
{
|
||||
mPreviewImage->_setBitmap(StringTable->EmptyString());
|
||||
return;
|
||||
}
|
||||
|
||||
String matPreviewAssetId = String(previewImage) + "_PreviewImage";
|
||||
matPreviewAssetId.replace(":", "_");
|
||||
matPreviewAssetId = "ToolsModule:" + matPreviewAssetId;
|
||||
|
|
@ -629,6 +637,13 @@ void GuiInspectorTypeMaterialAssetPtr::updatePreviewImage()
|
|||
|
||||
void GuiInspectorTypeMaterialAssetPtr::setPreviewImage(StringTableEntry assetId)
|
||||
{
|
||||
//if what we're working with isn't even a valid asset, don't present like we found a good one
|
||||
if (!AssetDatabase.isDeclaredAsset(assetId))
|
||||
{
|
||||
mPreviewImage->_setBitmap(StringTable->EmptyString());
|
||||
return;
|
||||
}
|
||||
|
||||
String matPreviewAssetId = String(assetId) + "_PreviewImage";
|
||||
matPreviewAssetId.replace(":", "_");
|
||||
matPreviewAssetId = "ToolsModule:" + matPreviewAssetId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue