From e7daffbd55931dffc34fb5d5dd8fd1d45d85f4c4 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Mon, 16 Nov 2020 15:06:37 +0100 Subject: [PATCH] Add open containing directory button --- Sources/arm/ui/TabTextures.hx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/arm/ui/TabTextures.hx b/Sources/arm/ui/TabTextures.hx index 78516719..c689dad8 100644 --- a/Sources/arm/ui/TabTextures.hx +++ b/Sources/arm/ui/TabTextures.hx @@ -7,6 +7,7 @@ import iron.system.Time; import iron.system.Input; import arm.io.ImportAsset; import arm.sys.Path; +import arm.sys.File; import arm.Enums; class TabTextures { @@ -144,7 +145,10 @@ class TabTextures { for (m in Project.materials) updateTexturePointers(m.canvas.nodes, i); for (b in Project.brushes) updateTexturePointers(b.canvas.nodes, i); } - }, 5); + if (ui.button(tr("Open Containing Directory..."), Left)) { + File.explorer(asset.file.substr(0, asset.file.lastIndexOf(Path.sep))); + } + }, 6); } } }