Skip to content

Commit

Permalink
InputText: leave state->Flags uncleared for the purpose of backends e…
Browse files Browse the repository at this point in the history
…mitting an on-screen keyboard for passwords. (ocornut#5724)
  • Loading branch information
ocornut committed Sep 28, 2022
1 parent 0a7054c commit d17627b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
#define IMGUI_VERSION "1.89 WIP"
#define IMGUI_VERSION_NUM 18824
#define IMGUI_VERSION_NUM 18825
#define IMGUI_HAS_TABLE

/*
Expand Down
2 changes: 1 addition & 1 deletion imgui_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ struct IMGUI_API ImGuiInputTextState
bool CursorFollow; // set when we want scrolling to follow the current cursor position (not always!)
bool SelectedAllMouseLock; // after a double-click to select all, we ignore further mouse drags to update selection
bool Edited; // edited this frame
ImGuiInputTextFlags Flags; // copy of InputText() flags
ImGuiInputTextFlags Flags; // copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.

ImGuiInputTextState() { memset(this, 0, sizeof(*this)); }
void ClearText() { CurLenW = CurLenA = 0; TextW[0] = 0; TextA[0] = 0; CursorClamp(); }
Expand Down
3 changes: 0 additions & 3 deletions imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4590,9 +4590,6 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
apply_new_text_length = state->CurLenA;
}
}

// Clear temporary user storage
state->Flags = ImGuiInputTextFlags_None;
}

// Copy result to user buffer. This can currently only happen when (g.ActiveId == id)
Expand Down

0 comments on commit d17627b

Please sign in to comment.