Seperating a function from mousePressed function?

This post was flagged by the community and is temporarily hidden.