Canvas event handling: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
No edit summary
mNo edit summary
Line 19: Line 19:
For each placement of a Canvas handling events can be enabled or disabled. A Canvas placed in a PUI (old GUI) widget or as standalone GUI window receives events by default, whereas Canvases placed onto the aircraft model or in the scenery do not receive any events by default.
For each placement of a Canvas handling events can be enabled or disabled. A Canvas placed in a PUI (old GUI) widget or as standalone GUI window receives events by default, whereas Canvases placed onto the aircraft model or in the scenery do not receive any events by default.


{{Note|The old [[Howto:Adding_a_canvas_to_a_GUI_dialog|PUI/XML GUI]] does not trigger any mouseover/hover events. Mouse clicks/wheel/drag are working as expected. For all other placements like on standalone Canvas windows and [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft|3D models]] there is no such limitation.}}
{{Note|When using the old [[Howto:Adding_a_canvas_to_a_GUI_dialog|PUI/XML GUI]] with a '''<nowiki><canvas></nowiki>'''-widget placement, PUI does not trigger any mouseover/hover (mousemove) events. Mouse clicks/wheel/drag are working as expected. For all other placements like on standalone Canvas windows and [[Howto:Add_a_2D_canvas_instrument_to_your_aircraft|3D models]] there is no such limitation.}}


For standalone GUI windows setting '''capture-events''' to ''0'' or ''1'' enables or disables handling of events respectively. For a Canvas placed onto a 3d model, setting ''capture-events'' inside the placement can be used to activate event handling:
For standalone GUI windows setting '''capture-events''' to ''0'' or ''1'' enables or disables handling of events respectively. For a Canvas placed onto a 3d model, setting ''capture-events'' inside the placement can be used to activate event handling:

Navigation menu