Sending alternative input device signals through the screen event hierarchy

Hi! I have an oddball input device source, let’s say it’s coming in over a websocket, and I’d really like to pipe messages from it through my game’s UI the same way that mouse events work, i.e. I’d like to take advantage of the visual hierarchy to prioritize who receives the inputs, and who blocks it from going further back. Is there a mechanism to traverse the same tree with the same rules as the mouse events? Thanks!

Had a quick look and unfortunately, the mouse/touch events are pretty integrated with the element input system that you can’t really piggy back on it

Assuming this is 2D UI, off hand you can implements a similar system.

What you could do is get the element components you are interested in (eg using entity.findComponents) and sort them in an array by drawOrder. The drawOrder is the order that the elements are rendered and therefore represents the ‘visual hierarchy’ of the UI.

Thanks! Already started down that road for a quick proof of concept. Appreciate the confirmation.