keybind events aren't mutually exclusive; fix object focus cancelling keybinds; bindable selection box key

This commit is contained in:
Tyfon
2024-06-21 01:10:37 -07:00
parent 83a88e6ae6
commit c5f90f2f43
4 changed files with 15 additions and 15 deletions

View File

@@ -55,7 +55,7 @@ namespace UIFixes
}
// checking ItemUiContext is a quick and easy way to know the mouse is over an item
if (Input.GetKeyDown(KeyCode.Mouse0) && ItemUiContext.Instance.R().ItemContext == null)
if (Settings.SelectionBoxKey.Value.IsDown() && ItemUiContext.Instance.R().ItemContext == null)
{
PointerEventData eventData = new(EventSystem.current)
{
@@ -138,7 +138,7 @@ namespace UIFixes
}
}
if (drawing && !Input.GetKey(KeyCode.Mouse0))
if (drawing && !Settings.SelectionBoxKey.Value.IsPressed())
{
drawing = false;
if (secondary)