Fixed Texture::copyToImage()

It had three mistakes.
Merge branch 'master' into gui
Implemented onPaint event
Button widget is paintable
The user_interface example displays a painted button