[SOLVED]Getting Combobox item under mouse cursor

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

User avatar
Tiblanc
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Sun Sep 13, 2009 01:27
Location: Quebec, Canada

[SOLVED]Getting Combobox item under mouse cursor

Postby Tiblanc » Wed Oct 07, 2009 01:11

Hi all!

I'm using CEGUI 0.7 with Ogre 1.6.3.

I have a series of Comboboxes which contain a list of available items. I also have a section in the UI where I want to display detailed information about the item when the player hovers the item with the mouse. I've subscribed to the ComboDropList::EventMouseMove, but can't seem to find a function to get the Item under the mouse cursor. There's a function named getItemAtPoint which seems like it would do what I want, but it's protected. Is there another way to get the item that I'm not seeing or will I need to create a ComboDropList child class to expose this function?

Thanks!
Last edited by Tiblanc on Fri Oct 09, 2009 02:20, edited 1 time in total.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: Getting Combobox item under mouse cursor

Postby scriptkid » Wed Oct 07, 2009 08:35

Hi,

My advise would be to subclass this class indeed. Although i don't see a problem with making this method public. I think there was just never the expectation for this method to be used from a client directly.

I'll ask CE's opinion on this.

HTH.
Check out my released snake game using Cegui!

User avatar
Tiblanc
Not too shy to talk
Not too shy to talk
Posts: 26
Joined: Sun Sep 13, 2009 01:27
Location: Quebec, Canada

Re: Getting Combobox item under mouse cursor

Postby Tiblanc » Fri Oct 09, 2009 02:20

I went that route and it's working nicely.

Thanks!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 12 guests