mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 16:27:47 +01:00
Rework around a saner import popup and decouple logic from interface.
This commit is contained in:
parent
bfb630d317
commit
bbfc9a0a6f
16 changed files with 478 additions and 411 deletions
|
|
@ -32,7 +32,7 @@ public class SettingsTab : ITab
|
|||
private readonly Penumbra _penumbra;
|
||||
private readonly FileDialogService _fileDialog;
|
||||
private readonly ModManager _modManager;
|
||||
private readonly ExportManager _exportManager;
|
||||
private readonly ModExportManager _modExportManager;
|
||||
private readonly ModFileSystemSelector _selector;
|
||||
private readonly CharacterUtility _characterUtility;
|
||||
private readonly ResidentResourceManager _residentResources;
|
||||
|
|
@ -40,7 +40,7 @@ public class SettingsTab : ITab
|
|||
|
||||
public SettingsTab(Configuration config, FontReloader fontReloader, TutorialService tutorial, Penumbra penumbra,
|
||||
FileDialogService fileDialog, ModManager modManager, ModFileSystemSelector selector, CharacterUtility characterUtility,
|
||||
ResidentResourceManager residentResources, DalamudServices dalamud, ExportManager exportManager)
|
||||
ResidentResourceManager residentResources, DalamudServices dalamud, ModExportManager modExportManager)
|
||||
{
|
||||
_config = config;
|
||||
_fontReloader = fontReloader;
|
||||
|
|
@ -52,7 +52,7 @@ public class SettingsTab : ITab
|
|||
_characterUtility = characterUtility;
|
||||
_residentResources = residentResources;
|
||||
_dalamud = dalamud;
|
||||
_exportManager = exportManager;
|
||||
_modExportManager = modExportManager;
|
||||
}
|
||||
|
||||
public void DrawHeader()
|
||||
|
|
@ -116,7 +116,7 @@ public class SettingsTab : ITab
|
|||
|
||||
/// <summary> Check a potential new root directory for validity and return the button text and whether it is valid. </summary>
|
||||
private static (string Text, bool Valid) CheckRootDirectoryPath(string newName, string old, bool selected)
|
||||
{
|
||||
{
|
||||
static bool IsSubPathOf(string basePath, string subPath)
|
||||
{
|
||||
if (basePath.Length == 0)
|
||||
|
|
@ -555,7 +555,7 @@ public class SettingsTab : ITab
|
|||
_tempExportDirectory = tmp;
|
||||
|
||||
if (ImGui.IsItemDeactivatedAfterEdit())
|
||||
_exportManager.UpdateExportDirectory(_tempExportDirectory);
|
||||
_modExportManager.UpdateExportDirectory(_tempExportDirectory);
|
||||
|
||||
ImGui.SameLine();
|
||||
if (ImGuiUtil.DrawDisabledButton($"{FontAwesomeIcon.Folder.ToIconString()}##export", UiHelpers.IconButtonSize,
|
||||
|
|
@ -569,7 +569,7 @@ public class SettingsTab : ITab
|
|||
_fileDialog.OpenFolderPicker("Choose Default Export Directory", (b, s) =>
|
||||
{
|
||||
if (b)
|
||||
_exportManager.UpdateExportDirectory(s);
|
||||
_modExportManager.UpdateExportDirectory(s);
|
||||
}, startDir, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue