Page 1 of 1

Problems with Tooltips and injectTimePulse

Posted: Mon Aug 14, 2006 20:35
by Ludi
Hi,

I've ported the Sample_Demo8 to my own application, the sample with lua support. Well, it was really easy, so no problem with that.

So, I set up everything like in the demo and in the sample framework. But there's one problem: The tooltips don't show up.

I inject every frame the time delay in seconds, but nothing happens. So I tried to inject them by hand (a value of 0.01). It works without problems for the sample demo, but not in my appliciation. Using a value of 1.0, the tooltips show up immediately.

This is really crazy and I don't know, what could be wrong :(

Here's the code for every frame:

Code: Select all

   CEGUI::System& guiSystem = CEGUI::System::getSingleton();

   float delay = TheTimeMgr->GetFloatDeltaTime() * 0.001f;
   const Point m = TheInterfaceMgr->GetMousePosition();
   guiSystem.injectMousePosition(m.x, m.y);

   guiSystem.injectTimePulse(delay);
   guiSystem.renderGUI();

Posted: Tue Aug 15, 2006 07:04
by scriptkid
Hi Ludi,

maybe TheTimeMgr->GetFloatDeltaTime() * 0.001f gets really small? Or does this exact code work for the C++ demo?

Cause this line: "So I tried to inject them by hand (a value of 0.01)" makes me think you should call "guiSystem.injectTimePulse(0.01f)" for your test?

Posted: Tue Aug 15, 2006 08:36
by Ludi
scriptkid wrote:Cause this line: "So I tried to inject them by hand (a value of 0.01)" makes me think you should call "guiSystem.injectTimePulse(0.01f)" for your test?


I have done this, but it didn't work for me. But it worked without problems with the sample_demo8.