I am working on an editor. When editing a field I have two modes, Real Time (Drag), and Normal.
Using ImGui::DragInt gets me pretty close but not 100% there.
I need to know when the Drag begins, and when the Drag Ends. (When the Drag ends is when the undo state can be recorded). During the drag, the changes will be reported in real-time.
Similarly, for the Normal Mode, I need to know when the user presses the Return Key. So that I can update the real value and record the undo step.
What would be the best way to accomplish this in ImGui?