mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Internals: Added GetInputTextState() + comments.
This commit is contained in:
@ -3516,10 +3516,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
if (hovered)
|
||||
g.MouseCursor = ImGuiMouseCursor_TextInput;
|
||||
|
||||
// NB: we are only allowed to access 'edit_state' if we are the active widget.
|
||||
ImGuiInputTextState* state = NULL;
|
||||
if (g.InputTextState.ID == id)
|
||||
state = &g.InputTextState;
|
||||
// We are only allowed to access the state if we are already the active widget.
|
||||
ImGuiInputTextState* state = GetInputTextState(id);
|
||||
|
||||
const bool focus_requested = FocusableItemRegister(window, id);
|
||||
const bool focus_requested_by_code = focus_requested && (g.FocusRequestCurrWindow == window && g.FocusRequestCurrCounterRegular == window->DC.FocusCounterRegular);
|
||||
|
Reference in New Issue
Block a user