mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-24 01:19:22 +01:00
Add option to always open mod importer at default path.
This commit is contained in:
parent
0a81e39690
commit
2746f7ea4f
3 changed files with 7 additions and 3 deletions
|
|
@ -51,6 +51,7 @@ public partial class Configuration : IPluginConfiguration
|
||||||
public bool EnableHttpApi { get; set; }
|
public bool EnableHttpApi { get; set; }
|
||||||
|
|
||||||
public string DefaultModImportPath { get; set; } = string.Empty;
|
public string DefaultModImportPath { get; set; } = string.Empty;
|
||||||
|
public bool AlwaysOpenDefaultImport { get; set; } = false;
|
||||||
public string DefaultModAuthor { get; set; } = DefaultTexToolsData.Author;
|
public string DefaultModAuthor { get; set; } = DefaultTexToolsData.Author;
|
||||||
|
|
||||||
public Dictionary< ColorId, uint > Colors { get; set; }
|
public Dictionary< ColorId, uint > Colors { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -174,9 +174,9 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector< Mod, Mod
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var modPath = _hasSetFolder ? null
|
var modPath = _hasSetFolder && !Penumbra.Config.AlwaysOpenDefaultImport ? null
|
||||||
: Penumbra.Config.DefaultModImportPath.Length > 0 ? Penumbra.Config.DefaultModImportPath
|
: Penumbra.Config.DefaultModImportPath.Length > 0 ? Penumbra.Config.DefaultModImportPath
|
||||||
: Penumbra.Config.ModDirectory.Length > 0 ? Penumbra.Config.ModDirectory : null;
|
: Penumbra.Config.ModDirectory.Length > 0 ? Penumbra.Config.ModDirectory : null;
|
||||||
_hasSetFolder = true;
|
_hasSetFolder = true;
|
||||||
_fileManager.OpenFileDialog( "Import Mod Pack", "TexTools Mod Packs{.ttmp,.ttmp2}", ( s, f ) =>
|
_fileManager.OpenFileDialog( "Import Mod Pack", "TexTools Mod Packs{.ttmp,.ttmp2}", ( s, f ) =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,9 @@ public partial class ConfigWindow
|
||||||
_window._selector.SetFilterDirty();
|
_window._selector.SetFilterDirty();
|
||||||
} );
|
} );
|
||||||
ImGui.Dummy( _window._defaultSpace );
|
ImGui.Dummy( _window._defaultSpace );
|
||||||
|
Checkbox( "Always Open Import at Default Directory",
|
||||||
|
"Open the import window at the location specified here every time, forgetting your previous path.",
|
||||||
|
Penumbra.Config.AlwaysOpenDefaultImport, v => Penumbra.Config.AlwaysOpenDefaultImport = v );
|
||||||
DrawDefaultModImportPath();
|
DrawDefaultModImportPath();
|
||||||
DrawDefaultModAuthor();
|
DrawDefaultModAuthor();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue