Game Development Community

Pass-through function calls

by Jason McIntosh · in Torque Game Builder · 11/01/2005 (10:21 am) · 2 replies

Is it possible to do "pass through" calls in event callbacks? For example, I have functionality in mySceneWindow::onMouseDown() that may or may not need to execute. If it isn't handled here, I'd like to pass the event on to the fxSceneWindow2D::onMouseDown() to be handled there. Calling this directly is not working.

Does this mean you can only handle an event like this in one place (requiring a monolithic even handler for each callback)? If so, could this be changed for a future release so there's more flexibility in code structure?

Any ideas?

#1
11/02/2005 (9:59 pm)
@Jason, do you have more than 1 scene window? Not sure what kind of event passing you are trying to do? But your basic conclusion is right- there is only one onMouseDown callback.

However I think I read in one of Melv's posts that the 1.1 release is going to have some new event handling features where callbacks can be registered per object so you won't have to have a monolithic handler with a big switch statement or whatever. I am really looking forward to that!
#2
11/02/2005 (10:48 pm)
I have several scene windows. What I wanted to do was test for a condition in one window, and pass the event on to all the other windows if I don't want to consume the event. I'm probably just not understanding all the inner workings of the black box. I worked around it, though.

Thanks for replying. :)