Page 1 of 1

problem with drag & drop

Posted: Tue Oct 09, 2007 18:11
by Durin
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.

Posted: Wed Oct 17, 2007 19:54
by daves
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.

Posted: Thu Oct 18, 2007 14:29
by Durin
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?