mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-14 00:34:18 +00:00
Internal: Tabbing/Focus: Tidying up old code, moved some state to context instead of window. Storing new data will allow us to fix the bug mentioned in #2215 (probably in next commit).
This commit is contained in:
parent
9c45072cb0
commit
26328fc9fe
3 changed files with 65 additions and 42 deletions
|
|
@ -3275,7 +3275,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
|||
state = &g.InputTextState;
|
||||
|
||||
const bool focus_requested = FocusableItemRegister(window, id);
|
||||
const bool focus_requested_by_code = focus_requested && (window->FocusIdxAllCounter == window->FocusIdxAllRequestCurrent);
|
||||
const bool focus_requested_by_code = focus_requested && (g.FocusRequestCurrWindow == window && g.FocusRequestCurrCounterAll == window->DC.FocusCounterAll);
|
||||
const bool focus_requested_by_tab = focus_requested && !focus_requested_by_code;
|
||||
|
||||
const bool user_clicked = hovered && io.MouseClicked[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue