fixed an error in logic when it comes to changing scenes: now instead of changing scene as soon as it is requested the engine will wait until the start of the next loop
changed logic so that member for checking if button was clicked is cleared next frame, rather than when a check is made which allows checking for clicks to propagate down through functions
updated onclick logic for items in line with guibutton changes