Native file browser only missing on android now
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user