Page 1 of 1

[SOLVED] Custom Event sending...

Posted: Wed Jul 28, 2010 15:04
by Handy
Hi,
is it possible to send custom events to a CEGUI event handler?
Currently, all of my event handlers are in lua.
My newest widget is a clock widget. So, I want to update the clock based on a timer.
The timer would then call an event handler so I could move the dial on the clock.
Would this be possible?
Or is their already a timer event that I can take advantage of?

Thanks in advance. :D
--Handy

Re: Custom Event sending....

Posted: Wed Jul 28, 2010 19:16
by Jamarr
I believe that EventWindowUpdated ("WindowUpdate" in Lua) is called whenever a time-pulse is injected into CEGUI; this should work fine as a timer event. As far as custom events go, you can use Window::addEvent to add a custom event, and then Window::fireEvent to notify subscribers.

Re: [SOLVED] Custom Event sending...

Posted: Wed Jul 28, 2010 20:48
by Handy
Thanks, this worked perfectly. :D