tvOS support for default assets library
This commit is contained in:
@@ -315,14 +315,15 @@ class DefaultAssetLibrary extends AssetLibrary {
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
if (className.exists (id)) {
|
if (className.exists (id)) {
|
||||||
|
|
||||||
var fontClass = className.get (id);
|
var fontClass = className.get (id);
|
||||||
return cast (Type.createInstance (fontClass, []), Image);
|
return cast (Type.createInstance (fontClass, []), Image);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
#if tvos
|
||||||
|
return Image.fromFile ("assets/" + path.get (id));
|
||||||
|
#else
|
||||||
return Image.fromFile (path.get (id));
|
return Image.fromFile (path.get (id));
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
#end
|
#end
|
||||||
@@ -711,7 +712,7 @@ class DefaultAssetLibrary extends AssetLibrary {
|
|||||||
|
|
||||||
if (!className.exists (asset.id)) {
|
if (!className.exists (asset.id)) {
|
||||||
|
|
||||||
#if ios
|
#if ios || tvos
|
||||||
path.set (asset.id, "assets/" + asset.path);
|
path.set (asset.id, "assets/" + asset.path);
|
||||||
#else
|
#else
|
||||||
path.set (asset.id, asset.path);
|
path.set (asset.id, asset.path);
|
||||||
|
|||||||
Reference in New Issue
Block a user