mirror of
https://github.com/ocornut/imgui.git
synced 2026-07-23 17:33:01 +00:00
InputText: tag InputTextDeactivatedState with an elapsing frame. Avoid unnecessary InputTextDeactivateHook() call on manual deactivation. InputTextDeactivateHook() only takes a record when Edited + callback marks edited. (#9476, #701)
for _NoLiveEdit it's easier than we don't use IsItemDeactivatedAfterEdit() in InputText()'s `if (g.InputTextDeactivatedState.ID == id)` block.
This commit is contained in:
@@ -5686,6 +5686,8 @@ void ImGui::NewFrame()
|
||||
if (g.DeactivatedItemData.ElapseFrame < g.FrameCount)
|
||||
g.DeactivatedItemData.ID = 0;
|
||||
g.DeactivatedItemData.IsAlive = false;
|
||||
if (g.InputTextDeactivatedState.ElapseFrame < g.FrameCount)
|
||||
g.InputTextDeactivatedState.ID = 0;
|
||||
|
||||
// Record when we have been stationary as this state is preserved while over same item.
|
||||
// FIXME: The way this is expressed means user cannot alter HoverStationaryDelay during the frame to use varying values.
|
||||
|
||||
Reference in New Issue
Block a user