As described in the issue using the event systems we can check for any UI object being focused/pressed, i.e., text boxes, menu buttons, etc. UnityInspector has a config option to either use the RoR2 ones or override it with its own, which we can get from the base class that the event systems are derived from.
Checking for the inspector windows being open is as simple as checking whether the related game object is present and active. Technically, it's the Canvas component within them that needs to also be active for the panels to appear, but I'm keeping it simple.
I also changed the keybind iterator to prevent an error if the keybinds are modified while they're enumerated.
This PR closes #127
As described in the issue using the event systems we can check for any UI object being focused/pressed, i.e., text boxes, menu buttons, etc. UnityInspector has a config option to either use the RoR2 ones or override it with its own, which we can get from the base class that the event systems are derived from.
Checking for the inspector windows being open is as simple as checking whether the related game object is present and active. Technically, it's the Canvas component within them that needs to also be active for the panels to appear, but I'm keeping it simple.
I also changed the keybind iterator to prevent an error if the keybinds are modified while they're enumerated.