Imgui: no blink cursor in InputText

Created on 11 Nov 2017  路  4Comments  路  Source: ocornut/imgui

I currently do:

include

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.

inputtext

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.OptCursorBlink to save you from that torture :)

All 4 comments

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).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noche-x picture noche-x  路  3Comments

mkanakis picture mkanakis  路  3Comments

SlNPacifist picture SlNPacifist  路  3Comments

bizehao picture bizehao  路  3Comments

mnemode2 picture mnemode2  路  3Comments