injectTimePulse and "Updated" event

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

gjaegy
Just popping in
Just popping in
Posts: 14
Joined: Thu Mar 04, 2010 12:18

injectTimePulse and "Updated" event

Postby gjaegy » Tue Sep 04, 2012 07:50

Hi,

I guess I am doing something wrong, however, I am not sure what. I am working with the latest 1.0 source code from the Mercurial repository.

Basically, I have subscribed to the "Updated" event, however, the handler never gets called. I am calling the following method in my code, each frame:

Code: Select all

CEGUI::System::getSingleton().injectTimePulse(fElapsed);


However, I have noticed that the Window::update() doesn't get called, so, no "Updated" event gets triggered.

I have found out I have to call the following method too:

Code: Select all

CEGUI::System::getSingleton().getDefaultGUIContext().injectTimePulse(fElapsed);


Should I really call both methods ?

Thanks !

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: injectTimePulse and "Updated" event

Postby CrazyEddie » Mon Sep 10, 2012 07:36

Hi,

Yes, you do need to call both of those - at least for the moment. Basically the GUIContext one is the main one now (the input injection interface moved there as you have seen). The lingering API on CEGUI::System effectively just serves the Animation system, and I would like to clean that up so the two calls are not needed (though I'm currently undecided on how to go about that).

Hope this reassures you that you're not doing something unnecessary.

CE.

gjaegy
Just popping in
Just popping in
Posts: 14
Joined: Thu Mar 04, 2010 12:18

Re: injectTimePulse and "Updated" event

Postby gjaegy » Mon Sep 10, 2012 09:40

yes, that's great, thanks for answering.

BTW you convinced me to switch to dynamic linking - to be honnest I didn't have much choice, because Lua is used by both my engine and Cegui, and I wanted to share the LuaState object. So, it took me two days, but now all the dependencies are linked dynamically :)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 2 guests