Currently, there appears to be no way to tell if the console is open. This is an almost required feature for a console as without it you cannot block inputs while using the console or control how the mouse behaves when the console is open.
Solution
Exposed the ConsoleUiState struct (keeping the fields as only crate public)
Exposed a function that returns whether the console is currently open
Imagined usage
(with the console only conditionally included in the project)
I can also see this being useful for locking and unlocking the mouse based on whether the console is visible.
Other
There also appears to be a text_focus field however this appears to not be updated while the console is
presented. In the future, it'd be nice to have an text_focused() method so that an open console only blocks
input when the text field is selected.
Objective
Currently, there appears to be no way to tell if the console is open. This is an almost required feature for a console as without it you cannot block inputs while using the console or control how the mouse behaves when the console is open.
Solution
Imagined usage
(with the console only conditionally included in the project)
I can also see this being useful for locking and unlocking the mouse based on whether the console is visible.
Other
There also appears to be a
text_focus
field however this appears to not be updated while the console is presented. In the future, it'd be nice to have antext_focused()
method so that an open console only blocks input when the text field is selected.