|
@ -4606,7 +4606,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ |
|
|
{ |
|
|
{ |
|
|
state->CursorAnim += io.DeltaTime; |
|
|
state->CursorAnim += io.DeltaTime; |
|
|
bool cursor_is_visible = (!g.IO.ConfigInputTextCursorBlink) || (state->CursorAnim <= 0.0f) || ImFmod(state->CursorAnim, 1.20f) <= 0.80f; |
|
|
bool cursor_is_visible = (!g.IO.ConfigInputTextCursorBlink) || (state->CursorAnim <= 0.0f) || ImFmod(state->CursorAnim, 1.20f) <= 0.80f; |
|
|
ImVec2 cursor_screen_pos = draw_pos + cursor_offset - draw_scroll; |
|
|
ImVec2 cursor_screen_pos = ImFloor(draw_pos + cursor_offset - draw_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); |
|
|
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)) |
|
|
if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect)) |
|
|
draw_window->DrawList->AddLine(cursor_screen_rect.Min, cursor_screen_rect.GetBL(), GetColorU32(ImGuiCol_Text)); |
|
|
draw_window->DrawList->AddLine(cursor_screen_rect.Min, cursor_screen_rect.GetBL(), GetColorU32(ImGuiCol_Text)); |
|
|