I currently do:
ImGui::GetCurrentContext()->InputTextState.CursorAnimReset();
each frame
or alternately:
https://github.com/ocornut/imgui/blob/master/imgui.cpp#L8370
comment out
edit_state.CursorAnim += io.DeltaTime;
I figured you want a proper API/variable for blink speed / disable.
Hello,
Would a InputTextFlags work for you? That would be easy to add.
May I ask why you need to disable the cursor blinking? Or disabling cursor at all?
Yeah, you could add it as a flag too, I misread first and thought ImGuiInputTextFlags_CharsNoBlank was it :)
But that would mean I'd have to pass it to every InputText I create ever, and keep a global setting myself. Whereas you already have a global variable for the CursorAnim timer.
The need, is that I find blinking cursors extremely stressful. I disable them in all programs, and OS-wide. There are webpages dedicated to this problem. for example: http://www.jurta.org/en/prog/noblink
I invite you to read the first sentence on that page.
I had never heard of users being annoyed by this before.
For this intent it seems to make more sense to make it a global user setting rather than a input flag flag, so I have added a io.OptCursorBlink to save you from that torture :)
@datgame FYI in the latest version I have renamed io.OptCursorBlink to io.ConfigCursorBlink for consistency with other options.
(Even though there is a io.ConfigFlags thing it is more forward thinking to keep them separate so different types than bool can be used).
Most helpful comment
I had never heard of users being annoyed by this before.
For this intent it seems to make more sense to make it a global user setting rather than a input flag flag, so I have added a
io.OptCursorBlinkto save you from that torture :)