mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
InputText: update mouse drag on mouse move only & key input reposition selection bounds (better fix for #429)
This commit is contained in:
parent
4bfd5cd95f
commit
6c7f8efe1e
2 changed files with 3 additions and 2 deletions
|
|
@ -437,6 +437,8 @@ static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *stat
|
|||
static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
|
||||
{
|
||||
int p = stb_text_locate_coord(str, x, y);
|
||||
if (state->select_start == state->select_end)
|
||||
state->select_start = state->cursor;
|
||||
state->cursor = state->select_end = p;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue