And I am back. Mostly. Okay, in chronological order:
I'm trying to figure out if there is a way to call terminal_read_str and obfuscate the input, for creating something like a password input field. <...> I know I don't have to use terminal_read_str but I do like the cursor functionality that it exposes.
No, the terminal_read_str function is a fairly simple wrapper over standard library input/output and its functionality is very limited. The only thing that is not directly available in API is a timed read which it uses to animate the cursor. I'll consider input obfuscation, but in the meantime it should be quite easy to write a custom read_str.
Here is a simple outline for a custom read_str but without a cursor. For that you'll need to wrap the call to terminal_read, something along the lines of
int terminal_read_timeout(int timeout)
{
for (int i = 0; i < timeout; i++)
{
if (terminal_has_input())
return terminal_read();
else
terminal_delay(1);
}
return -1;
}
And flip the cursor every read that timed out.
Idly wondering if it'd be possible to combine bearlibterminal with PyQt?
It is hard to integrate any fairly complex custom input/output into a GUI framework, be it Qt or another one. Usually it is easier to completely rewrite one side to match the other =/.
I am registerd just to ask: is mouse supported by BearLib terminal in Linux? <...> Maybe mouse events should be enabled before it can be catched?
Yes, you have to enable it explicitly. Specifically:
terminal_set("input.filter={keyboard, mouse}");
Yep, not the most intuitive part =/.
I remember that you are planning to switch to use SDL for bearlibterminal. Does it mean that you are going to drop support for true/open type fonts?
Nothing of the sort. The only thing I need from SDL is its cross-platform window and context management (I'll try to cut everything else away). From the user perspective transition to SDL should not even be noticeable at first. It is more about portability/stability and management costs.