mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 15:50:25 +01:00
Nav: InputTextMultiline: Fixed navigation/selection. Disabled selecting all when activating a multi-line text editor. (#787)
This commit is contained in:
parent
82a27fd3aa
commit
7ea52ac1e4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user