diff --git a/src/mlogwatcher/Setting.java b/src/mlogwatcher/Setting.java index 8ab3150..3a32689 100644 --- a/src/mlogwatcher/Setting.java +++ b/src/mlogwatcher/Setting.java @@ -1,15 +1,10 @@ package mlogwatcher; import arc.Core; -import arc.scene.Group; -import arc.scene.ui.Dialog; import arc.scene.ui.Label; import arc.scene.ui.TextField; -import arc.scene.ui.layout.*; import mindustry.Vars; -import mindustry.ui.Styles; -import mindustry.ui.dialogs.BaseDialog; public class Setting { public static void init(){ @@ -25,14 +20,14 @@ public static void init(){ settingTable.center(); settingTable.add(Constants.Bundles.settingMlogPathLabel).row(); settingTable.add(label).row(); - settingTable.button(Constants.Bundles.settingMlogSelectButton, () -> { + settingTable.button(Constants.Bundles.settingMlogSelectButton, () -> Vars.platform.showFileChooser(true, Constants.Bundles.settingFileChooserTitle, field.getText(), fi -> { label.setText(fi.absolutePath()); Core.settings.put(Constants.Settings.mlogPath, fi.absolutePath()); FileWatcher.stopWatcherThread(); FileWatcher.startWatcherThread(); - }); - }).width(280f).height(60f).pad(16f).row(); + }) + ).width(280f).height(60f).pad(16f).row(); settingTable.table(fieldTable -> { fieldTable.add(Constants.Bundles.settingExtensionInputLabel); fieldTable.add(field);