1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-10 17:08:39 +00:00

* open dialog at default configs directory

This commit is contained in:
ad 2018-04-19 18:18:54 +03:00
parent 3a57269510
commit fdd30413c4

View File

@ -42,13 +42,14 @@ class AppDelegate: NSObject, NSApplicationDelegate {
@objc func openPreset(_ sender: Any?) {
let dialog = NSOpenPanel();
dialog.title = "Choose a items.json file";
dialog.showsResizeIndicator = true;
dialog.showsHiddenFiles = true;
dialog.canChooseDirectories = false;
dialog.canCreateDirectories = false;
dialog.allowsMultipleSelection = false;
dialog.allowedFileTypes = ["json"];
dialog.title = "Choose a items.json file"
dialog.showsResizeIndicator = true
dialog.showsHiddenFiles = true
dialog.canChooseDirectories = false
dialog.canCreateDirectories = false
dialog.allowsMultipleSelection = false
dialog.allowedFileTypes = ["json"]
dialog.directoryURL = NSURL.fileURL(withPath: NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first!.appending("/MTMR"), isDirectory: true)
if (dialog.runModal() == NSApplication.ModalResponse.OK) {
let result = dialog.url