Nav: InputTextMultiline: Fixed navigation/selection. Disabled selecting all when activating a multi-line text editor. (#787)

This commit is contained in:
omar 2017-10-16 02:30:59 +02:00
parent 82a27fd3aa
commit 7ea52ac1e4

View File

@ -4686,6 +4686,7 @@ void ImGui::EndChild()
}
else
{
// Not navigable into
ItemAdd(bb, 0);
}
}
@ -8974,6 +8975,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
ImGuiWindow* draw_window = window;
if (is_multiline)
{
ItemAdd(total_bb, id, &frame_bb);
if (!BeginChildFrame(id, frame_bb.GetSize()))
{
EndChildFrame();
@ -9022,7 +9024,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
bool clear_active_id = false;
bool select_all = (g.ActiveId != id) && (((flags & ImGuiInputTextFlags_AutoSelectAll) != 0) || (g.NavInputId == id));
bool select_all = (g.ActiveId != id) && (((flags & ImGuiInputTextFlags_AutoSelectAll) != 0) || (g.NavInputId == id)) && (!is_multiline);
if (focus_requested || user_clicked || user_scrolled || g.NavInputId == id)
{
if (g.ActiveId != id)