[SOLVED] Custom Event sending...

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Handy
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 09, 2009 17:02
Location: Sterling Heights, MI

[SOLVED] Custom Event sending...

Postby Handy » Wed Jul 28, 2010 15:04

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
Last edited by Handy on Wed Jul 28, 2010 20:47, edited 1 time in total.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Custom Event sending....

Postby Jamarr » Wed Jul 28, 2010 19:16

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.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

Handy
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 09, 2009 17:02
Location: Sterling Heights, MI

Re: [SOLVED] Custom Event sending...

Postby Handy » Wed Jul 28, 2010 20:48

Thanks, this worked perfectly. :D


Return to “Help”

Who is online

Users browsing this forum: No registered users and 33 guests