Touch / Mouse tracing

So i and a few friends are currently working on a game that records where a mouse or finger goes and then uses it later.

Example would be in paint, the mouse moves around (while clicked) and a line following the mouse is created, i want something like that, but rather than creating any line or anything, it simply stores the entire movement for later.

Make a class that consists of a Vector2 and a float. Then make a List of this class, and every frame you would add the current mouse/touch position (the Vector2) and the time (the float). You may also want to add a check to see if the mouse position has changed since the last frame, and if not, don’t bother storing it.