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.
MultiColumnList double click on empty space
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: MultiColumnList double click on empty space
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 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.
There is a function defined for MultiColumnList that returns the item given a (window local) point. Unfortunately this function is currently protected 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.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 8 guests