Adds script function to access full path of the level asset's preview image file

Updates script function descriptions to be correct
Updates chooseLevelDlg functions to be more efficient and consistent, and use the exposed get methods for getting preview images and the like properly
This commit is contained in:
Areloch 2020-10-13 18:44:42 -05:00
parent 0763ad9649
commit 837983c767
2 changed files with 24 additions and 29 deletions

View file

@ -362,22 +362,29 @@ void LevelAsset::unloadDependencies()
}
DefineEngineMethod(LevelAsset, getLevelPath, const char*, (),,
"Creates a new script asset using the targetFilePath.\n"
"@return The bool result of calling exec")
"Gets the full path of the asset's defined level file.\n"
"@return The string result of the level path")
{
return object->getLevelPath();
}
DefineEngineMethod(LevelAsset, getPreviewImagePath, const char*, (), ,
"Gets the full path of the asset's defined preview image file.\n"
"@return The string result of the level preview image path")
{
return object->getImagePath();
}
DefineEngineMethod(LevelAsset, getPostFXPresetPath, const char*, (), ,
"Creates a new script asset using the targetFilePath.\n"
"@return The bool result of calling exec")
"Gets the full path of the asset's defined postFX preset file.\n"
"@return The string result of the postFX preset path")
{
return object->getPostFXPresetPath();
}
DefineEngineMethod(LevelAsset, getDecalsPath, const char*, (), ,
"Creates a new script asset using the targetFilePath.\n"
"@return The bool result of calling exec")
"Gets the full path of the asset's defined decal file.\n"
"@return The string result of the decal path")
{
return object->getDecalsPath();
}