MultiColumnList Drag & Drop

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

MultiColumnList Drag & Drop

Postby Tiresias » Sun Nov 01, 2009 19:22

Hello

I would like to implement a simple drag & drop (one item in a list dragged and dropped in the very same list, but at another position), if y could have some help to start because i have no idea ,

thanks

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: MultiColumnList Drag & Drop

Postby Jamarr » Mon Nov 02, 2009 20:40

Hi. What search terms did you try?

I am not familiar with the Drag & Drop feature, however from searching the forum and searching the wiki it sounds like Drag & Drop is only supported for window-based elements. Since MultiColumnList uses ListboxItem which is not window-based (as mentioned in those links) it appears that the MultiColumnList does not support Drag & Drop by default.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

Re: MultiColumnList Drag & Drop

Postby Tiresias » Tue Nov 03, 2009 17:01

Hello

yes i found the topics and i wanted to be sure it was not really possible, thinking that i may have missed something,

actuallymulticolumnlist is window based, so maybe creating dragcontainer for each item something like this?

dont know maybe someone managed to build a custom class?

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: MultiColumnList Drag & Drop

Postby Jamarr » Tue Nov 03, 2009 19:25

Tiresias wrote:actuallymulticolumnlist is window based


Jamarr wrote:Since MultiColumnList uses ListboxItem which is not window-based
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

Tiresias
Quite a regular
Quite a regular
Posts: 74
Joined: Thu May 22, 2008 10:20

Re: MultiColumnList Drag & Drop

Postby Tiresias » Wed Nov 04, 2009 08:01

Actually maybe i have an idea, why not doing something like:

get the event click on the list,
if this is on listitem , store "a drag flag", store list position , and change MouseCursor to listitem image (i am associating image with each listitem),
then capture event click release (would have to check if there is such event),
if drag flag was on then find new position, delete item from list and reinsert it new position?

of course if mouse move outside list maybe clear drag flag etc, need to think about this,

if someone did it this way it would be nice to hear from him,

dont know if cegui handle mousemove need to check this, not sure at all actually,

(edit: i checked and all events are there (EventMouseMove, MouseLeave, etc), so i believe it *should* work , i will try and let you know, if someone (jamar yes i know its not supported :lol: ) please let me know)

cheers

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: MultiColumnList Drag & Drop

Postby Jamarr » Wed Nov 04, 2009 17:19

It's not supported by default. I never said you couldn't do it yourself. Had you actually searched the forum you would see that others have implemented it themselves. It's obvious you do not understand English that well. Anyway, your approach sounds reasonable, good luck.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 5 guests