|
@@ -5230,7 +5230,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding);
|
|
RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding);
|
|
}
|
|
}
|
|
|
|
|
|
- const ImVec4 clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + inner_size.x, frame_bb.Min.y + inner_size.y); // Not using frame_bb.Max because we have adjusted size
|
|
|
|
|
|
+ const ImRect clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + inner_size.x, frame_bb.Min.y + inner_size.y); // Not using frame_bb.Max because we have adjusted size
|
|
ImVec2 draw_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding;
|
|
ImVec2 draw_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding;
|
|
ImVec2 text_size(0.0f, 0.0f);
|
|
ImVec2 text_size(0.0f, 0.0f);
|
|
|
|
|
|
@@ -5362,9 +5362,9 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
ImVec2 rect_pos = draw_pos + select_start_offset - draw_scroll;
|
|
ImVec2 rect_pos = draw_pos + select_start_offset - draw_scroll;
|
|
for (const char* p = text_selected_begin; p < text_selected_end; )
|
|
for (const char* p = text_selected_begin; p < text_selected_end; )
|
|
{
|
|
{
|
|
- if (rect_pos.y > clip_rect.w + g.FontSize)
|
|
|
|
|
|
+ if (rect_pos.y > clip_rect.Max.y + g.FontSize)
|
|
break;
|
|
break;
|
|
- if (rect_pos.y < clip_rect.y)
|
|
|
|
|
|
+ if (rect_pos.y < clip_rect.Min.y)
|
|
{
|
|
{
|
|
p = (const char*)ImMemchr((void*)p, '\n', text_selected_end - p);
|
|
p = (const char*)ImMemchr((void*)p, '\n', text_selected_end - p);
|
|
p = p ? p + 1 : text_selected_end;
|
|
p = p ? p + 1 : text_selected_end;
|
|
@@ -5388,7 +5388,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
if (is_multiline || (buf_display_end - buf_display) < buf_display_max_length)
|
|
if (is_multiline || (buf_display_end - buf_display) < buf_display_max_length)
|
|
{
|
|
{
|
|
ImU32 col = GetColorU32(is_displaying_hint ? ImGuiCol_TextDisabled : ImGuiCol_Text);
|
|
ImU32 col = GetColorU32(is_displaying_hint ? ImGuiCol_TextDisabled : ImGuiCol_Text);
|
|
- draw_window->DrawList->AddText(g.Font, g.FontSize, draw_pos - draw_scroll, col, buf_display, buf_display_end, 0.0f, is_multiline ? NULL : &clip_rect);
|
|
|
|
|
|
+ draw_window->DrawList->AddText(g.Font, g.FontSize, draw_pos - draw_scroll, col, buf_display, buf_display_end, 0.0f, is_multiline ? NULL : &clip_rect.AsVec4());
|
|
}
|
|
}
|
|
|
|
|
|
// Draw blinking cursor
|
|
// Draw blinking cursor
|
|
@@ -5433,7 +5433,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
|
|
|
|
|
const ImVec2 draw_scroll = /*state ? ImVec2(state->Scroll.x, 0.0f) :*/ ImVec2(0.0f, 0.0f); // Preserve scroll when inactive?
|
|
const ImVec2 draw_scroll = /*state ? ImVec2(state->Scroll.x, 0.0f) :*/ ImVec2(0.0f, 0.0f); // Preserve scroll when inactive?
|
|
ImU32 col = GetColorU32(is_displaying_hint ? ImGuiCol_TextDisabled : ImGuiCol_Text);
|
|
ImU32 col = GetColorU32(is_displaying_hint ? ImGuiCol_TextDisabled : ImGuiCol_Text);
|
|
- draw_window->DrawList->AddText(g.Font, g.FontSize, draw_pos - draw_scroll, col, buf_display, buf_display_end, 0.0f, is_multiline ? NULL : &clip_rect);
|
|
|
|
|
|
+ draw_window->DrawList->AddText(g.Font, g.FontSize, draw_pos - draw_scroll, col, buf_display, buf_display_end, 0.0f, is_multiline ? NULL : &clip_rect.AsVec4());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|