Show toast messages on ios and android
This commit is contained in:
+11
-1
@@ -408,7 +408,17 @@ class Project {
|
||||
if (ui.button(tr("Import")) || ui.isReturnDown) {
|
||||
UIBox.show = false;
|
||||
App.redrawUI();
|
||||
ImportMesh.run(path, clearLayers, replaceExisting);
|
||||
function doImport() {
|
||||
ImportMesh.run(path, clearLayers, replaceExisting);
|
||||
}
|
||||
#if (krom_android || krom_ios)
|
||||
arm.App.notifyOnNextFrame(function() {
|
||||
Console.toast(tr("Importing mesh"));
|
||||
arm.App.notifyOnNextFrame(doImport);
|
||||
});
|
||||
#else
|
||||
doImport();
|
||||
#end
|
||||
}
|
||||
if (ui.button(tr("?"))) {
|
||||
File.loadUrl("https://github.com/armory3d/armorpaint_docs/blob/master/faq.md");
|
||||
|
||||
@@ -127,10 +127,20 @@ class BoxExport {
|
||||
var filters = App.bitsHandle.position != Bits8 ? "exr" : Context.formatType == FormatPng ? "png" : "jpg";
|
||||
UIFiles.show(filters, true, false, function(path: String) {
|
||||
Context.textureExportPath = path;
|
||||
function _init() {
|
||||
ExportTexture.run(Context.textureExportPath, bakeMaterial);
|
||||
function doExport() {
|
||||
function _init() {
|
||||
ExportTexture.run(Context.textureExportPath, bakeMaterial);
|
||||
}
|
||||
iron.App.notifyOnInit(_init);
|
||||
}
|
||||
iron.App.notifyOnInit(_init);
|
||||
#if (krom_android || krom_ios)
|
||||
arm.App.notifyOnNextFrame(function() {
|
||||
Console.toast(tr("Exporting textures"));
|
||||
arm.App.notifyOnNextFrame(doExport);
|
||||
});
|
||||
#else
|
||||
doExport();
|
||||
#end
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,10 +99,21 @@ class BoxProjects {
|
||||
ui._x = uix;
|
||||
ui.fill(0, 0, 128, 128, 0x66000000);
|
||||
ui._x = _uix;
|
||||
iron.App.notifyOnInit(function() {
|
||||
ImportArm.runProject(path);
|
||||
function doImport() {
|
||||
iron.App.notifyOnInit(function() {
|
||||
UIBox.show = false;
|
||||
ImportArm.runProject(path);
|
||||
});
|
||||
}
|
||||
|
||||
#if (krom_android || krom_ios)
|
||||
arm.App.notifyOnNextFrame(function() {
|
||||
Console.toast(tr("Opening project"));
|
||||
arm.App.notifyOnNextFrame(doImport);
|
||||
});
|
||||
UIBox.show = false;
|
||||
#else
|
||||
doImport();
|
||||
#end
|
||||
}
|
||||
|
||||
var name = path.substring(path.lastIndexOf(arm.sys.Path.sep) + 1, path.lastIndexOf("."));
|
||||
|
||||
@@ -37,6 +37,7 @@ class UIMenubar {
|
||||
if (iconButton(ui, 0, 3)) {
|
||||
ui.fill(0, 2, -(32 + 4), 32, 0x66000000);
|
||||
#if (krom_android || krom_ios)
|
||||
Console.toast(tr("Saving project"));
|
||||
Project.projectSave();
|
||||
#end
|
||||
App.notifyOnNextFrame(function() {
|
||||
|
||||
Reference in New Issue
Block a user