TTF Loading Fixed
This commit is contained in:
@@ -25,6 +25,8 @@ int32_t PrefabAssetParser::onParse(
|
||||
|
||||
if(values["type"] == "texture") {
|
||||
out->type = PREFAB_ASSET_TYPE_TEXTURE;
|
||||
} else if(values["type"] == "truetype") {
|
||||
out->type = PREFAB_ASSET_TYPE_TRUETYPE_FONT;
|
||||
} else {
|
||||
*error = "Unknown asset type '" + values["type"] + "'";
|
||||
return 1;
|
||||
|
@@ -8,7 +8,8 @@
|
||||
|
||||
namespace Dawn {
|
||||
enum PrefabAssetType {
|
||||
PREFAB_ASSET_TYPE_TEXTURE
|
||||
PREFAB_ASSET_TYPE_TEXTURE,
|
||||
PREFAB_ASSET_TYPE_TRUETYPE_FONT
|
||||
};
|
||||
|
||||
struct PrefabAsset {
|
||||
|
@@ -44,6 +44,11 @@ void PrefabGen::generate(
|
||||
assetMap[a.fileName] = "&" + a.usageName + "->texture";
|
||||
break;
|
||||
|
||||
case PREFAB_ASSET_TYPE_TRUETYPE_FONT:
|
||||
assetType = "TrueTypeAsset";
|
||||
assetMap[a.fileName] = "&" + a.usageName + "->font";
|
||||
break;
|
||||
|
||||
default:
|
||||
assertUnreachable();
|
||||
}
|
||||
|
Reference in New Issue
Block a user