mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Add rudimentary quick move support to folders.
This commit is contained in:
parent
b92a3161b5
commit
21181370e7
4 changed files with 23 additions and 8 deletions
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
|||
Subproject commit e06d547c1690212c1ed3d471b0f9798101f06145
|
||||
Subproject commit e49a05e1863957144955d1c612343ccfff11563e
|
||||
|
|
@ -79,6 +79,9 @@ public class Configuration : IPluginConfiguration
|
|||
public bool OpenFoldersByDefault { get; set; } = false;
|
||||
public int SingleGroupRadioMax { get; set; } = 2;
|
||||
public string DefaultImportFolder { get; set; } = string.Empty;
|
||||
public string QuickMoveFolder1 { get; set; } = string.Empty;
|
||||
public string QuickMoveFolder2 { get; set; } = string.Empty;
|
||||
public string QuickMoveFolder3 { get; set; } = string.Empty;
|
||||
public DoubleModifier DeleteModModifier { get; set; } = new(ModifierHotkey.Control, ModifierHotkey.Shift);
|
||||
|
||||
public bool PrintSuccessfulCommandsToChat { get; set; } = true;
|
||||
|
|
|
|||
|
|
@ -141,7 +141,9 @@ public partial class ModEditWindow : Window, IDisposable
|
|||
_materialTab.Draw();
|
||||
DrawTextureTab();
|
||||
_shaderPackageTab.Draw();
|
||||
_itemSwapTab.DrawContent();
|
||||
using var tab = ImRaii.TabItem("Item Swap (WIP)");
|
||||
if (tab)
|
||||
_itemSwapTab.DrawContent();
|
||||
}
|
||||
|
||||
// A row of three buttonSizes and a help marker that can be used for material suffix changing.
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector<Mod, ModF
|
|||
public ModCollection SelectedSettingCollection { get; private set; } = ModCollection.Empty;
|
||||
|
||||
public ModFileSystemSelector(CommunicatorService communicator, ModFileSystem fileSystem, Mod.Manager modManager,
|
||||
ModCollection.Manager collectionManager, Configuration config, TutorialService tutorial, FileDialogService fileDialog, ChatService chat, ModEditor modEditor)
|
||||
ModCollection.Manager collectionManager, Configuration config, TutorialService tutorial, FileDialogService fileDialog, ChatService chat,
|
||||
ModEditor modEditor)
|
||||
: base(fileSystem, DalamudServices.KeyState)
|
||||
{
|
||||
_communicator = communicator;
|
||||
|
|
@ -48,19 +49,28 @@ public sealed partial class ModFileSystemSelector : FileSystemSelector<Mod, ModF
|
|||
_tutorial = tutorial;
|
||||
_fileDialog = fileDialog;
|
||||
_chat = chat;
|
||||
_modEditor = modEditor;
|
||||
_modEditor = modEditor;
|
||||
|
||||
SubscribeRightClickFolder(EnableDescendants, 10);
|
||||
SubscribeRightClickFolder(DisableDescendants, 10);
|
||||
SubscribeRightClickFolder(InheritDescendants, 15);
|
||||
SubscribeRightClickFolder(OwnDescendants, 15);
|
||||
// @formatter:off
|
||||
SubscribeRightClickFolder(EnableDescendants, 10);
|
||||
SubscribeRightClickFolder(DisableDescendants, 10);
|
||||
SubscribeRightClickFolder(InheritDescendants, 15);
|
||||
SubscribeRightClickFolder(OwnDescendants, 15);
|
||||
SubscribeRightClickFolder(SetDefaultImportFolder, 100);
|
||||
SubscribeRightClickFolder(f => SetQuickMove(f, 0, _config.QuickMoveFolder1, s => { _config.QuickMoveFolder1 = s; _config.Save(); }), 110);
|
||||
SubscribeRightClickFolder(f => SetQuickMove(f, 1, _config.QuickMoveFolder2, s => { _config.QuickMoveFolder2 = s; _config.Save(); }), 120);
|
||||
SubscribeRightClickFolder(f => SetQuickMove(f, 2, _config.QuickMoveFolder3, s => { _config.QuickMoveFolder3 = s; _config.Save(); }), 130);
|
||||
SubscribeRightClickLeaf(ToggleLeafFavorite);
|
||||
SubscribeRightClickLeaf(l => QuickMove(l, _config.QuickMoveFolder1, _config.QuickMoveFolder2, _config.QuickMoveFolder3));
|
||||
SubscribeRightClickMain(ClearDefaultImportFolder, 100);
|
||||
SubscribeRightClickMain(() => ClearQuickMove(0, _config.QuickMoveFolder1, () => {_config.QuickMoveFolder1 = string.Empty; _config.Save();}), 110);
|
||||
SubscribeRightClickMain(() => ClearQuickMove(1, _config.QuickMoveFolder2, () => {_config.QuickMoveFolder2 = string.Empty; _config.Save();}), 120);
|
||||
SubscribeRightClickMain(() => ClearQuickMove(2, _config.QuickMoveFolder3, () => {_config.QuickMoveFolder3 = string.Empty; _config.Save();}), 130);
|
||||
AddButton(AddNewModButton, 0);
|
||||
AddButton(AddImportModButton, 1);
|
||||
AddButton(AddHelpButton, 2);
|
||||
AddButton(DeleteModButton, 1000);
|
||||
// @formatter:on
|
||||
SetFilterTooltip();
|
||||
|
||||
SelectionChanged += OnSelectionChange;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue