mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
ImGui::InputText: added support for shift+click style selection. (#5619)
(Amend, force-push: sorry wrong edit by omar)
This commit is contained in:
committed by
ocornut
parent
fe62927bd8
commit
b87e58fab3
@ -4251,10 +4251,12 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
}
|
||||
else if (io.MouseClicked[0] && !state->SelectedAllMouseLock)
|
||||
{
|
||||
// FIXME: unselect on late click could be done release?
|
||||
if (hovered)
|
||||
{
|
||||
stb_textedit_click(state, &state->Stb, mouse_x, mouse_y);
|
||||
if (io.KeyShift)
|
||||
stb_textedit_drag(state, &state->Stb, mouse_x, mouse_y);
|
||||
else
|
||||
stb_textedit_click(state, &state->Stb, mouse_x, mouse_y);
|
||||
state->CursorAnimReset();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user