Merge branch 'textedit-drag-while-typing' of https://github.com/ocornut/stb
This commit is contained in:
commit
d514035d70
@ -451,6 +451,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…
Reference in New Issue
Block a user