Add keybinds for Use/UseAll
This commit is contained in:
@@ -40,6 +40,20 @@ namespace UIFixes
|
||||
return;
|
||||
}
|
||||
|
||||
if (Settings.UseKeyBind.Value.IsDown())
|
||||
{
|
||||
__instance.GetItemContextInteractions(itemContext, null).ExecuteInteraction(EItemInfoButton.Use);
|
||||
}
|
||||
|
||||
if (Settings.UseAllKeyBind.Value.IsDown())
|
||||
{
|
||||
var interactions = __instance.GetItemContextInteractions(itemContext, null);
|
||||
if (!interactions.ExecuteInteraction(EItemInfoButton.UseAll))
|
||||
{
|
||||
interactions.ExecuteInteraction(EItemInfoButton.Use);
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings.FilterByKeyBind.Value.IsDown())
|
||||
{
|
||||
__instance.GetItemContextInteractions(itemContext, null).ExecuteInteraction(EItemInfoButton.FilterSearch);
|
||||
|
||||
20
Settings.cs
20
Settings.cs
@@ -45,6 +45,8 @@ namespace UIFixes
|
||||
public static ConfigEntry<KeyboardShortcut> InspectKeyBind { get; set; }
|
||||
public static ConfigEntry<KeyboardShortcut> OpenKeyBind { get; set; }
|
||||
public static ConfigEntry<KeyboardShortcut> TopUpKeyBind { get; set; }
|
||||
public static ConfigEntry<KeyboardShortcut> UseKeyBind { get; set; }
|
||||
public static ConfigEntry<KeyboardShortcut> UseAllKeyBind { get; set; }
|
||||
public static ConfigEntry<KeyboardShortcut> FilterByKeyBind { get; set; }
|
||||
public static ConfigEntry<KeyboardShortcut> LinkedSearchKeyBind { get; set; }
|
||||
public static ConfigEntry<bool> UseRaidMouseScrollMulti { get; set; } // Advanced
|
||||
@@ -194,6 +196,24 @@ namespace UIFixes
|
||||
null,
|
||||
new ConfigurationManagerAttributes { })));
|
||||
|
||||
configEntries.Add(UseKeyBind = config.Bind(
|
||||
InputSection,
|
||||
"Use Item Shortcut",
|
||||
new KeyboardShortcut(KeyCode.None),
|
||||
new ConfigDescription(
|
||||
"Keybind to use an item, such a consumable.",
|
||||
null,
|
||||
new ConfigurationManagerAttributes { })));
|
||||
|
||||
configEntries.Add(UseAllKeyBind = config.Bind(
|
||||
InputSection,
|
||||
"Use Item (All) Shortcut",
|
||||
new KeyboardShortcut(KeyCode.None),
|
||||
new ConfigDescription(
|
||||
"Keybind to use all of an item, such a consumable. This will still work on items that don't have 'Use All', just 'Use', in their context menu.",
|
||||
null,
|
||||
new ConfigurationManagerAttributes { })));
|
||||
|
||||
configEntries.Add(FilterByKeyBind = config.Bind(
|
||||
InputSection,
|
||||
"Filter by Item Shortcut",
|
||||
|
||||
Reference in New Issue
Block a user