From 109925fe26cdb04b225e96d48b149ef6d0cff18a Mon Sep 17 00:00:00 2001 From: Lubos Lenco Date: Tue, 7 Sep 2021 17:37:44 +0200 Subject: [PATCH] Improve project handling on ios and android --- Sources/arm/io/ExportArm.hx | 6 +++++- Sources/arm/ui/BoxProjects.hx | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Sources/arm/io/ExportArm.hx b/Sources/arm/io/ExportArm.hx index 3dfa92d0..53a43bdd 100644 --- a/Sources/arm/io/ExportArm.hx +++ b/Sources/arm/io/ExportArm.hx @@ -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) { diff --git a/Sources/arm/ui/BoxProjects.hx b/Sources/arm/ui/BoxProjects.hx index ce8cc52d..0a4e31d3 100644 --- a/Sources/arm/ui/BoxProjects.hx +++ b/Sources/arm/ui/BoxProjects.hx @@ -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); } }