Improve file handling on android
This commit is contained in:
@@ -52,6 +52,7 @@ node Kinc/make -g metal
|
||||
node armorcore/make android -g opengl --shaderversion 300
|
||||
cp -r build/krom/* armorcore/build/Krom/app/src/main/assets/
|
||||
cd armorcore
|
||||
git apply patch/android_document_picker.diff --directory=Kinc
|
||||
node Kinc/make android -g opengl
|
||||
# Manual tweaking is required for now:
|
||||
# https://github.com/armory3d/armorcore/blob/master/kincfile.js#L68
|
||||
|
||||
@@ -24,9 +24,12 @@ class UIFiles {
|
||||
public static function show(filters: String, isSave: Bool, filesDone: String->Void) {
|
||||
|
||||
#if krom_android
|
||||
if (path == null) path = defaultPath;
|
||||
showCustom(filters, isSave, filesDone);
|
||||
#else
|
||||
if (isSave) {
|
||||
if (path == null) path = defaultPath;
|
||||
showCustom(filters, isSave, filesDone);
|
||||
}
|
||||
else {
|
||||
#end
|
||||
|
||||
path = isSave ? Krom.saveDialog(filters, "") : Krom.openDialog(filters, "");
|
||||
if (path != null) {
|
||||
@@ -37,6 +40,9 @@ class UIFiles {
|
||||
filesDone(path);
|
||||
}
|
||||
releaseKeys();
|
||||
|
||||
#if krom_android
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
||||
@@ -259,7 +265,8 @@ class UIFiles {
|
||||
#if krom_windows
|
||||
"C:\\Users"
|
||||
#elseif krom_android
|
||||
"/sdcard/Android/data/org.armorpaint/files"
|
||||
// "/sdcard/Android/data/org.armorpaint/files"
|
||||
"/sdcard/Download"
|
||||
#elseif krom_darwin
|
||||
"/Users"
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user