mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
io.OptNoCursorBlink -> io.OptCursorBlink (#1427)
This commit is contained in:
@ -780,7 +780,7 @@ ImGuiIO::ImGuiIO()
|
||||
#else
|
||||
OptMacOSXBehaviors = false;
|
||||
#endif
|
||||
OptNoCursorBlink = false;
|
||||
OptCursorBlink = true;
|
||||
|
||||
// Settings (User Functions)
|
||||
RenderDrawListsFn = NULL;
|
||||
@ -8494,7 +8494,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos - render_scroll, GetColorU32(ImGuiCol_Text), buf_display, buf_display + edit_state.CurLenA, 0.0f, is_multiline ? NULL : &clip_rect);
|
||||
|
||||
// Draw blinking cursor
|
||||
bool cursor_is_visible = (g.IO.OptNoCursorBlink) || (g.InputTextState.CursorAnim <= 0.0f) || fmodf(g.InputTextState.CursorAnim, 1.20f) <= 0.80f;
|
||||
bool cursor_is_visible = (!g.IO.OptCursorBlink) || (g.InputTextState.CursorAnim <= 0.0f) || fmodf(g.InputTextState.CursorAnim, 1.20f) <= 0.80f;
|
||||
ImVec2 cursor_screen_pos = render_pos + cursor_offset - render_scroll;
|
||||
ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y-g.FontSize+0.5f, cursor_screen_pos.x+1.0f, cursor_screen_pos.y-1.5f);
|
||||
if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect))
|
||||
|
Reference in New Issue
Block a user