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