Native file browser only missing on android now

This commit is contained in:
luboslenco
2020-11-05 11:59:08 +01:00
parent 07e33971f4
commit 01955e2b3d
4 changed files with 8 additions and 15 deletions
-5
View File
@@ -102,11 +102,6 @@ class Config {
raw.camera_speed = 1.0;
raw.invert_zoom_direction = false;
raw.displace_strength = 0.0;
#if krom_android
raw.native_file_browser = false;
#else
raw.native_file_browser = true;
#end
raw.show_asset_names = false;
raw.node_preview = true;
raw.workspace = 0;
-1
View File
@@ -45,7 +45,6 @@ typedef TConfig = {
@:optional var camera_speed: Null<Float>;
@:optional var invert_zoom_direction: Null<Bool>;
@:optional var displace_strength: Null<Float>;
@:optional var native_file_browser: Null<Bool>;
@:optional var show_asset_names: Null<Bool>;
@:optional var layout: Array<Int>;
@:optional var workspace: Null<Int>;
-4
View File
@@ -60,10 +60,6 @@ class BoxPreferences {
Config.raw.invert_zoom_direction = ui.check(Id.handle({selected: Config.raw.invert_zoom_direction}), tr("Invert Zoom Direction"));
#if (!krom_android && !krom_ios)
Config.raw.native_file_browser = ui.check(Id.handle({selected: Config.raw.native_file_browser}), tr("Native File Browser"));
#end
Config.raw.node_preview = ui.check(Id.handle({selected: Config.raw.node_preview}), tr("Show Node Preview"));
#if arm_debug
+8 -5
View File
@@ -21,11 +21,11 @@ class UIFiles {
static var showExtensions = true;
public static function show(filters: String, isSave: Bool, filesDone: String->Void) {
if (!Config.raw.native_file_browser) {
if (path == null) path = defaultPath;
showCustom(filters, isSave, filesDone);
return;
}
#if krom_android
if (path == null) path = defaultPath;
showCustom(filters, isSave, filesDone);
#else
path = isSave ? Krom.saveDialog(filters, "") : Krom.openDialog(filters, "");
if (path != null) {
@@ -36,8 +36,10 @@ class UIFiles {
filesDone(path);
}
releaseKeys();
#end
}
#if krom_android
@:access(zui.Zui)
static function showCustom(filters: String, isSave: Bool, filesDone: String->Void) {
var known = false;
@@ -59,6 +61,7 @@ class UIFiles {
}
}, 600, 500);
}
#end
static function releaseKeys() {
// File dialog may prevent firing key up events