problem with drag & drop

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

Durin
Just popping in
Just popping in
Posts: 17
Joined: Tue May 15, 2007 10:15

problem with drag & drop

Postby Durin » Tue Oct 09, 2007 18:11

I created a slot, which can handle drag and drop events and i´m working together with Ogre 1.4.2
creating the slot:

Code: Select all

CEGUI::Window* slot;

slot = CEGUI::WindowManager::getSingleton().createWindow(_lookName + "/StaticImage", name);
      parent->addChildWindow(slot);
      slot->setPosition(position);
      slot->setSize(size);
      slot->subscribeEvent(CEGUI::Window::EventDragDropItemEnters, CEGUI::Event::Subscriber(&handleDragEnter, this));
      slot->subscribeEvent(CEGUI::Window::EventDragDropItemLeaves, CEGUI::Event::Subscriber(&handleDragLeaveInventory, this));
      slot->subscribeEvent(CEGUI::Window::EventDragDropItemDropped, CEGUI::Event::Subscriber(&handleDragDroppedInventory, this));


And it works really fine, but when the framerate of Ogre3D falls down or the user moves the Item to fast which is in the slot the methods handleDragLeaveInventory and handleDragDroppedInventory will not be called and it breaks the system.

Have someone made similar experiences?

How do you solve the problem?

Thanks for helping.
Sorry my bad english.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Wed Oct 17, 2007 19:54

What kind of framerate are you talking about? My guess is that this kind of problem is not a problem with the CEGUI drag&drop event handling architecture, but rather a problem with the way you are detecting IO events and then passing them on to CEGUI.

Particularly if your IO event detection is coupled with your Ogre3D renderer you may find that a drop in frame rate also results in a drop in the ability to detect specific IO events.

Durin
Just popping in
Just popping in
Posts: 17
Joined: Tue May 15, 2007 10:15

Postby Durin » Thu Oct 18, 2007 14:29

If the framerate goes down to 40 frames per second it is quite a problem. And my detection of IO events is handled by the Ogre3D framelistener, thats the way it is done in the tutorials. Is there another way to do it, which will solve the problem?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests