mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Add file types to Resource Tree and require Ctrl+Shift for some quick imports
This commit is contained in:
parent
4a00d82921
commit
514b0e7f30
7 changed files with 224 additions and 33 deletions
|
|
@ -110,8 +110,11 @@ public partial class ModEditWindow
|
|||
_quickImportActions.Add((resourceNode.GamePath, writable), quickImport);
|
||||
}
|
||||
|
||||
var canQuickImport = quickImport.CanExecute;
|
||||
var quickImportEnabled = canQuickImport && (!resourceNode.Protected || _config.DeleteModModifier.IsActive());
|
||||
if (ImGuiUtil.DrawDisabledButton(FontAwesomeIcon.FileImport.ToIconString(), buttonSize,
|
||||
$"Add a copy of this file to {quickImport.OptionName}.", !quickImport.CanExecute, true))
|
||||
$"Add a copy of this file to {quickImport.OptionName}.{(canQuickImport && !quickImportEnabled ? $"\nHold {_config.DeleteModModifier} while clicking to add." : string.Empty)}",
|
||||
!quickImportEnabled, true))
|
||||
{
|
||||
quickImport.Execute();
|
||||
_quickImportActions.Remove((resourceNode.GamePath, writable));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue