Asset library fixes/unification for Flash

This commit is contained in:
Joshua Granick
2017-01-23 10:31:59 -08:00
parent 5ea2b4dfce
commit 76e51a2379
4 changed files with 19 additions and 12 deletions

View File

@@ -28,13 +28,6 @@ import sys.FileSystem;
super ();
#if flash
::if (assets != null)::::foreach assets::::if (embed)::classTypes.set ("::id::", __ASSET__::flatName::);::else::paths.set ("::id::", "::resourceName::");::end::
types.set ("::id::", AssetType.$$upper(::type::));::end::::end::
#else
if (ApplicationMain.config != null && Reflect.hasField (ApplicationMain.config, "assetsPrefix")) {
rootPath = Reflect.field (ApplicationMain.config, "assetsPrefix");
@@ -53,7 +46,7 @@ import sys.FileSystem;
}
#if (openfl && !display)
#if (openfl && !flash && !display)
::if (assets != null)::::foreach assets::::if (type == "font")::openfl.text.Font.registerFont (__ASSET__OPENFL__::flatName::);
::end::::end::::end::
#end
@@ -68,7 +61,7 @@ import sys.FileSystem;
#end ::else::::if (embed)::
#if html5
preload.set (id, true);
#elseif (desktop || cpp)
#elseif (desktop || cpp || flash)
classTypes.set (id, __ASSET__::flatName::);
types.set (id, AssetType.$$upper(::type::));
#end
@@ -111,8 +104,6 @@ import sys.FileSystem;
}
#end
}