Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no blink cursor in InputText #1427

Closed
datgame opened this issue Nov 11, 2017 · 4 comments
Closed

no blink cursor in InputText #1427

datgame opened this issue Nov 11, 2017 · 4 comments

Comments

@datgame
Copy link

datgame commented Nov 11, 2017

I currently do:
#include <imgui_internal.h>
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.

@ocornut
Copy link
Owner

ocornut commented Nov 11, 2017 via email

@datgame
Copy link
Author

datgame commented Nov 12, 2017

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.

ocornut added a commit that referenced this issue Nov 12, 2017
… Renamed io.OSXBehaviors to io.OptMacOSXBehaviors. Should affect users as the compile-time default is usually enough. (#473, #650)
@ocornut
Copy link
Owner

ocornut commented Nov 12, 2017

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

@ocornut ocornut closed this as completed Nov 12, 2017
ocornut added a commit that referenced this issue Aug 1, 2018
… io.OptCursorBlink to io.ConfigCursorBlink, io.OptMacOSXBehaviors to ConfigMacOSXBehaviors for consistency. (#1427, #1495, #822, #473, #650)

Demo: Exposed flags in Demo.
@ocornut
Copy link
Owner

ocornut commented Aug 1, 2018

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

ocornut added a commit that referenced this issue Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants