Adding cursor resize function. Not finished.