mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
InputText: Cursor X position not lost when clicking outside on an item that's submitted after the InputText(). It was only noticeable when restoring focus programmatically. (#1418, #1554)
This commit is contained in:
parent
28a76af185
commit
7ccbb765e2
@ -8607,8 +8607,11 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
}
|
||||
else if (io.MouseClicked[0] && !edit_state.SelectedAllMouseLock)
|
||||
{
|
||||
stb_textedit_click(&edit_state, &edit_state.StbState, mouse_x, mouse_y);
|
||||
edit_state.CursorAnimReset();
|
||||
if (hovered)
|
||||
{
|
||||
stb_textedit_click(&edit_state, &edit_state.StbState, mouse_x, mouse_y);
|
||||
edit_state.CursorAnimReset();
|
||||
}
|
||||
}
|
||||
else if (io.MouseDown[0] && !edit_state.SelectedAllMouseLock && (io.MouseDelta.x != 0.0f || io.MouseDelta.y != 0.0f))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user