the function 'onTick' is added
the code to determine the position of the mouse is added
the method 'up' is added
the method 'up' is completed