Highlight button using key input

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

hermit purple
Just popping in
Just popping in
Posts: 13
Joined: Wed Oct 21, 2009 20:21

Highlight button using key input

Postby hermit purple » Thu Nov 05, 2009 21:20

I know that you can highlight buttons using mouse hover, the button will change it's StateImagery to "Hover". Is this doable by using key input? For example, press right will highlight the button on the right. The button doesn't seem to go into "Hover" state and I'm not sure how to change it's state in code. I use button->activate() to make the button the focus but it seems that the imagery is still in "Normal".

I notice that FalagardToggleButton has a lot more states (selected push, etc). Is it better off to just use this class instead?

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

Re: Highlight button using key input

Postby Jamarr » Fri Nov 06, 2009 20:35

hermit purple wrote:I know that you can highlight buttons using mouse hover, the button will change it's StateImagery to "Hover". Is this doable by using key input? For example, press right will highlight the button on the right. The button doesn't seem to go into "Hover" state and I'm not sure how to change it's state in code. I use button->activate() to make the button the focus but it seems that the imagery is still in "Normal".

I think the only way to change to the hover state for this type, without re-writing some CEGUI code, is by physically moving the mouse over the button.

I notice that FalagardToggleButton has a lot more states (selected push, etc). Is it better off to just use this class instead?

I think this would be your best option. Here you can change to a selected/on state (that resembles hover) without actually requireing the mouse to be hovering the button.
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 8 guests