Merge pull request #248 from SHADE-DP/SP3-6-c-scripting

Fixed compilation error in Editor.h++
This commit is contained in:
XiaoQiDigipen 2022-11-22 19:49:55 +08:00 committed by GitHub
commit 8a292a5e9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,7 @@ namespace SHADE
bool Editor::renderFieldEditorInternal<AssetID, FontAsset>(const std::string& fieldName, interior_ptr<FontAsset> managedValPtr, EditorFieldFunc<uint32_t>, bool* isHovered, RangeAttribute^) bool Editor::renderFieldEditorInternal<AssetID, FontAsset>(const std::string& fieldName, interior_ptr<FontAsset> managedValPtr, EditorFieldFunc<uint32_t>, bool* isHovered, RangeAttribute^)
{ {
uint32_t assetId = managedValPtr->NativeAssetID; uint32_t assetId = managedValPtr->NativeAssetID;
if (SHEditorUI::InputAssetField(fieldName, assetId, AssetType::FONT, isHovered, !(*managedValPtr))) if (SHEditorUI::InputAssetField(fieldName, assetId, AssetType::FONT, isHovered))
{ {
*managedValPtr = FontAsset(assetId); *managedValPtr = FontAsset(assetId);
return true; return true;
@ -219,7 +219,7 @@ namespace SHADE
bool Editor::renderFieldEditorInternal<AssetID, MeshAsset>(const std::string& fieldName, interior_ptr<MeshAsset> managedValPtr, EditorFieldFunc<uint32_t>, bool* isHovered, RangeAttribute^) bool Editor::renderFieldEditorInternal<AssetID, MeshAsset>(const std::string& fieldName, interior_ptr<MeshAsset> managedValPtr, EditorFieldFunc<uint32_t>, bool* isHovered, RangeAttribute^)
{ {
uint32_t assetId = managedValPtr->NativeAssetID; uint32_t assetId = managedValPtr->NativeAssetID;
if (SHEditorUI::InputAssetField(fieldName, assetId, AssetType::MESH, isHovered, !(*managedValPtr))) if (SHEditorUI::InputAssetField(fieldName, assetId, AssetType::MESH, isHovered))
{ {
*managedValPtr = MeshAsset(assetId); *managedValPtr = MeshAsset(assetId);
return true; return true;
@ -231,7 +231,7 @@ namespace SHADE
bool Editor::renderFieldEditorInternal<AssetID, MaterialAsset>(const std::string& fieldName, interior_ptr<MaterialAsset> managedValPtr, EditorFieldFunc<uint32_t>, bool* isHovered, RangeAttribute^) bool Editor::renderFieldEditorInternal<AssetID, MaterialAsset>(const std::string& fieldName, interior_ptr<MaterialAsset> managedValPtr, EditorFieldFunc<uint32_t>, bool* isHovered, RangeAttribute^)
{ {
uint32_t assetId = managedValPtr->NativeAssetID; uint32_t assetId = managedValPtr->NativeAssetID;
if (SHEditorUI::InputAssetField(fieldName, assetId, AssetType::MATERIAL, isHovered, !(*managedValPtr))) if (SHEditorUI::InputAssetField(fieldName, assetId, AssetType::MATERIAL, isHovered))
{ {
*managedValPtr = MaterialAsset(assetId); *managedValPtr = MaterialAsset(assetId);
return true; return true;