Improve project handling on ios and android

This commit is contained in:
Lubos Lenco
2021-09-07 17:37:44 +02:00
parent 0ad1e32209
commit 109925fe26
2 changed files with 8 additions and 5 deletions
+5 -1
View File
@@ -118,11 +118,15 @@ class ExportArm {
};
#if (krom_android || krom_ios)
var tex = iron.RenderPath.active.renderTargets.get("tex").image;
var tex = iron.RenderPath.active.renderTargets.get(Context.renderMode == RenderForward ? "buf" : "tex").image;
var mesh_icon = kha.Image.createRenderTarget(256, 256);
var r = App.w() / App.h();
mesh_icon.g2.begin(false);
#if kha_opengl
mesh_icon.g2.drawScaledImage(tex, -(256 * r - 256) / 2, 256, 256 * r, -256);
#else
mesh_icon.g2.drawScaledImage(tex, -(256 * r - 256) / 2, 0, 256 * r, 256);
#end
mesh_icon.g2.end();
var mesh_icon_pixels = mesh_icon.getPixels();
for (i in 0...256 * 256 * 4) {
+3 -4
View File
@@ -73,16 +73,15 @@ class BoxProjects {
UIMenu.draw(function(ui: Zui) {
var name = path.substr(Project.filepath.lastIndexOf("/") + 1);
ui.text(name, Right, ui.t.HIGHLIGHT_COL);
if (ui.button(tr("Duplicate"), Left)) {
}
// if (ui.button(tr("Duplicate"), Left)) {}
if (ui.button(tr("Delete"), Left)) {
iron.App.notifyOnInit(function() {
arm.sys.File.delete(path);
arm.sys.File.delete(iconPath);
recent_projects.splice(i, 1);
});
}
}, 3);
}, 2);
}
}