Drags, Sliders: store initial value on activation, as a convenience for some mods. (#8223)

This commit is contained in:
ocornut
2024-12-12 18:52:07 +01:00
parent 4ad5496474
commit 8237ab450e
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -2109,6 +2109,7 @@ struct ImGuiContext
bool ActiveIdPreviousFrameIsAlive;
bool ActiveIdPreviousFrameHasBeenEditedBefore;
ImGuiWindow* ActiveIdPreviousFrameWindow;
ImGuiDataTypeStorage ActiveIdValueOnActivation; // Backup of initial value at the time of activation. ONLY SET BY SPECIFIC WIDGETS: DragXXX and SliderXXX.
ImGuiID LastActiveId; // Store the last non-zero ActiveId, useful for animation.
float LastActiveIdTimer; // Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.