MultiColumnList double click on empty space

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

saejox
Just popping in
Just popping in
Posts: 8
Joined: Sun Nov 20, 2011 18:17

MultiColumnList double click on empty space

Postby saejox » Sun Nov 20, 2011 18:22

Hi,

I want double click to work only on items in the list. Since list items are not windows i cant get their location.

Do you know how to accomplish this?

thanks.

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

Re: MultiColumnList double click on empty space

Postby CrazyEddie » Mon Nov 21, 2011 09:04

You'd have to take the mouse location at the time of the double-click event and calculate which item (if any) it was over, and ignore it if it was none.

There is a function defined for MultiColumnList that returns the item given a (window local) point. Unfortunately this function is currently protected :roll: So, you have some options: i) write custom code based on the protected member function, ii) make the function public and recompile CEGUI, iii) create a MCL subclass with a function that exposes the required behaviour (likely by calling the protected function), then register and use that MCL subclass in place of the stock MCL (this wiki article shows the technique I mean, though it does not specifically provide the behaviour you need: http://www.cegui.org.uk/wiki/index.php/ ... andard_one).

You should probably add a request to the CEGUI project on our mantis tracker (http://mantis.cegui.org.uk) asking for this functionality to be exposed for users ;)

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 8 guests