Found a way to propagate mouse events.
Implemented propagation of mouse move event manually.
Implemented propagation of mouse button events manually.
Labels, buttons and text boxes now also receive mouse events.
Removed propagation of left mouse button events from button, because they interfere with button clicks.
You can now get the state of the mouse using gui.mouse.
Merge branch 'feature/mouse' into develop