mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-14 00:34:18 +00:00
merge v1.92.4
This commit is contained in:
parent
c425843be3
commit
44cff4493c
64 changed files with 1674 additions and 514 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// dear imgui, v1.92.3
|
||||
// dear imgui, v1.92.4
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
|
|
@ -3941,6 +3941,7 @@ static ImVec2 InputTextCalcTextSize(ImGuiContext* ctx, const char* text_begin, c
|
|||
{
|
||||
ImGuiContext& g = *ctx;
|
||||
ImGuiInputTextState* obj = &g.InputTextState;
|
||||
IM_ASSERT(text_end_display >= text_begin && text_end_display <= text_end);
|
||||
return ImFontCalcTextSizeEx(g.Font, g.FontSize, FLT_MAX, obj->WrapWidth, text_begin, text_end_display, text_end, out_remaining, out_offset, flags);
|
||||
}
|
||||
|
||||
|
|
@ -4321,11 +4322,12 @@ void ImGuiInputTextCallbackData::InsertChars(int pos, const char* new_text, cons
|
|||
memcpy(Buf + pos, new_text, (size_t)new_text_len * sizeof(char));
|
||||
Buf[BufTextLen + new_text_len] = '\0';
|
||||
|
||||
if (CursorPos >= pos)
|
||||
CursorPos += new_text_len;
|
||||
SelectionStart = SelectionEnd = CursorPos;
|
||||
BufDirty = true;
|
||||
BufTextLen += new_text_len;
|
||||
if (CursorPos >= pos)
|
||||
CursorPos += new_text_len;
|
||||
CursorPos = ImClamp(CursorPos, 0, BufTextLen);
|
||||
SelectionStart = SelectionEnd = CursorPos;
|
||||
}
|
||||
|
||||
void ImGui::PushPasswordFont()
|
||||
|
|
@ -5525,7 +5527,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|||
text_col, clip_rect.AsVec4(),
|
||||
line_index->get_line_begin(buf_display, line_visible_n0),
|
||||
line_index->get_line_end(buf_display, line_visible_n1 - 1),
|
||||
wrap_width, ImDrawTextFlags_WrapKeepBlanks);
|
||||
wrap_width, ImDrawTextFlags_WrapKeepBlanks | ImDrawTextFlags_CpuFineClip);
|
||||
|
||||
// Render blinking cursor
|
||||
if (render_cursor)
|
||||
|
|
@ -10716,8 +10718,8 @@ void ImGui::TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb,
|
|||
const bool unsaved_marker_visible = (flags & ImGuiTabItemFlags_UnsavedDocument) != 0 && (button_pos.x + button_sz <= bb.Max.x) && (!close_button_visible || !is_hovered);
|
||||
if (unsaved_marker_visible)
|
||||
{
|
||||
const ImRect bullet_bb(button_pos, button_pos + ImVec2(button_sz, button_sz));
|
||||
RenderBullet(draw_list, bullet_bb.GetCenter(), GetColorU32(ImGuiCol_Text));
|
||||
ImVec2 bullet_pos = button_pos + ImVec2(button_sz, button_sz) * 0.5f;
|
||||
RenderBullet(draw_list, bullet_pos, GetColorU32(ImGuiCol_UnsavedMarker));
|
||||
}
|
||||
else if (close_button_visible)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue