mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-28 04:03:28 +03:00
InputText: reworked so that io.ConfigInputTextEnterKeepActive reactivate in order for e.g. IsItemDeactivatedAfterEdit() to work. Amends. (#9001, #9115)
Rework. Fixes dangling InputTextReactivateId in case of field being hidden on activation.
This commit is contained in:
parent
03a9946a14
commit
5aa7d61139
5 changed files with 10 additions and 16 deletions
|
|
@ -4281,7 +4281,7 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
|
|||
MouseStationaryTimer = 0.0f;
|
||||
|
||||
InputTextPasswordFontBackupFlags = ImFontFlags_None;
|
||||
InputTextReactivateID = 0;
|
||||
InputTextReactivateId = 0;
|
||||
TempInputId = 0;
|
||||
memset(&DataTypeZeroValue, 0, sizeof(DataTypeZeroValue));
|
||||
BeginMenuDepth = BeginComboDepth = 0;
|
||||
|
|
@ -5573,6 +5573,8 @@ void ImGui::NewFrame()
|
|||
g.ActiveIdIsJustActivated = false;
|
||||
if (g.TempInputId != 0 && g.ActiveId != g.TempInputId)
|
||||
g.TempInputId = 0;
|
||||
if (g.InputTextReactivateId != 0 && g.InputTextReactivateId != g.DeactivatedItemData.ID)
|
||||
g.InputTextReactivateId = 0;
|
||||
if (g.ActiveId == 0)
|
||||
{
|
||||
g.ActiveIdUsingNavDirMask = 0x00;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue