Valheim-Modding / Jotunn

Jötunn, the Valheim Library.
https://valheim-modding.github.io/Jotunn/
MIT License
128 stars 40 forks source link

[FEATURE] Publicize IsInputBlocked() method (GUIManager) #413

Open aaron01-dev opened 1 year ago

aaron01-dev commented 1 year ago

User Story As a dev I want to make a condition to check for when the input is blocked so that my mod's UI (which is triggered by inputs) won't get triggered whenever something happens like typing in chat or keyboard controls from somewhere else. but I'd have to copy the entire flag Valheim uses. bool flag = (Chat.instance == null || !Chat.instance.HasFocus()) && !Console.IsVisible() && !TextInput.IsVisible() && !Menu.IsVisible() && !InventoryGui.IsVisible();

Envisioned Solution Publicize IsInputBlocked()