make textbox behavior configurable
This commit is contained in:
@@ -44,6 +44,14 @@ namespace UIFixes
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Settings.ItemContextBlocksTextInputs.Value &&
|
||||
EventSystem.current?.currentSelectedGameObject != null &&
|
||||
EventSystem.current.currentSelectedGameObject.GetComponent<TMP_InputField>() != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var interactions = __instance.GetItemContextInteractions(itemContext, null);
|
||||
if (Settings.InspectKeyBind.Value.IsDown())
|
||||
{
|
||||
@@ -167,6 +175,11 @@ namespace UIFixes
|
||||
[PatchPostfix]
|
||||
public static void Postfix()
|
||||
{
|
||||
if (!Settings.ItemContextBlocksTextInputs.Value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (EventSystem.current?.currentSelectedGameObject != null)
|
||||
{
|
||||
LastSelectedInput = EventSystem.current.currentSelectedGameObject.GetComponent<TMP_InputField>();
|
||||
@@ -188,6 +201,11 @@ namespace UIFixes
|
||||
[PatchPostfix]
|
||||
public static void Postfix()
|
||||
{
|
||||
if (!Settings.ItemContextBlocksTextInputs.Value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (LastSelectedInput != null)
|
||||
{
|
||||
LastSelectedInput.readOnly = false;
|
||||
|
10
Settings.cs
10
Settings.cs
@@ -64,6 +64,7 @@ namespace UIFixes
|
||||
public static ConfigEntry<KeyboardShortcut> LinkedSearchKeyBind { get; set; }
|
||||
public static ConfigEntry<bool> UseRaidMouseScrollMulti { get; set; } // Advanced
|
||||
public static ConfigEntry<int> MouseScrollMultiInRaid { get; set; } // Advanced
|
||||
public static ConfigEntry<bool> ItemContextBlocksTextInputs { get; set; } // Advanced
|
||||
|
||||
// Inventory
|
||||
public static ConfigEntry<bool> EnableMultiSelect { get; set; }
|
||||
@@ -300,6 +301,15 @@ namespace UIFixes
|
||||
new AcceptableValueRange<int>(1, 10),
|
||||
new ConfigurationManagerAttributes { IsAdvanced = true })));
|
||||
|
||||
configEntries.Add(ItemContextBlocksTextInputs = config.Bind(
|
||||
InputSection,
|
||||
"Block Text Inputs on Item Mouseover",
|
||||
true,
|
||||
new ConfigDescription(
|
||||
"In order for keybinds to work and not get mixed up with textboxes, key presses while mousing over an item will not be sent to the currently focused textbox",
|
||||
null,
|
||||
new ConfigurationManagerAttributes { IsAdvanced = true })));
|
||||
|
||||
// Inventory
|
||||
configEntries.Add(EnableMultiSelect = config.Bind(
|
||||
InventorySection,
|
||||
|
Reference in New Issue
Block a user