Drag & drop items collide..

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

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Drag & drop items collide..

Postby cCj » Mon May 16, 2011 04:11

Hi
have this problem with drag & Drop that if i drop item to another item then OnDropped event wont be called as the item drops off the drag container.

i tried to solve this by setting all the drag items to pass through mouse clicks but then they cannot be dragged.


i think CEGUI needs improvement in this regards. Because now u can basically only drag & drop items to drag containers wich dont already have D&D item in them.

this problem is in v 0.7.4

Maybe some one knows the best way to get around this?

thx

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

Re: Drag & drop items collide..

Postby CrazyEddie » Mon May 16, 2011 07:28

Well the issue is, what do you do if a person wants to be able to drag & drop to another drag container? We can't just blithely ignore the fact there is some other window in the middle there, nor is it correct to always propagate back to the parent if the child returns false for isDragDropTarget. Adding a setting for every conceivable combination is also not something that we really want to be doing, since it soon gets out of hand (indeed, we may already go too far in this department).

In my opinion, the correct solution is to have your DragContainer handle the 'collision', in the simplest case you can just forward notifications to the parent.

CE

cCj
Not too shy to talk
Not too shy to talk
Posts: 38
Joined: Fri Jul 23, 2010 04:36

Re: Drag & drop items collide..

Postby cCj » Wed May 18, 2011 17:23

CrazyEddie wrote:Well the issue is, what do you do if a person wants to be able to drag & drop to another drag container? We can't just blithely ignore the fact there is some other window in the middle there, nor is it correct to always propagate back to the parent if the child returns false for isDragDropTarget. Adding a setting for every conceivable combination is also not something that we really want to be doing, since it soon gets out of hand (indeed, we may already go too far in this department).

In my opinion, the correct solution is to have your DragContainer handle the 'collision', in the simplest case you can just forward notifications to the parent.

CE


Thx CE. Im not sure if I understand but I just set DragContainer::setDragDropTarget to false on all the dragable items (DragContainer) and now the drops go to the parent..


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests