Show toast when downloading from cloud
This commit is contained in:
@@ -12,10 +12,22 @@ class ImportAsset {
|
|||||||
public static function run(path: String, dropX = -1.0, dropY = -1.0, showBox = true, hdrAsEnvmap = true, done: Void->Void = null) {
|
public static function run(path: String, dropX = -1.0, dropY = -1.0, showBox = true, hdrAsEnvmap = true, done: Void->Void = null) {
|
||||||
|
|
||||||
if (path.startsWith("cloud")) {
|
if (path.startsWith("cloud")) {
|
||||||
File.cacheCloud(path, function(abs: String) {
|
function doCacheCloud() {
|
||||||
if (abs == null) return;
|
File.cacheCloud(path, function(abs: String) {
|
||||||
run(abs, dropX, dropY, showBox, hdrAsEnvmap, done);
|
if (abs == null) return;
|
||||||
|
run(abs, dropX, dropY, showBox, hdrAsEnvmap, done);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#if (krom_android || krom_ios)
|
||||||
|
arm.App.notifyOnNextFrame(function() {
|
||||||
|
Console.toast(tr("Downloading"));
|
||||||
|
arm.App.notifyOnNextFrame(doCacheCloud);
|
||||||
});
|
});
|
||||||
|
#else
|
||||||
|
doCacheCloud();
|
||||||
|
#end
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user