FrameWindow or TitleBar hover state

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
Treize
Just popping in
Just popping in
Posts: 5
Joined: Wed Jan 12, 2005 12:06

FrameWindow or TitleBar hover state

Postby Treize » Sat Jun 07, 2008 19:13

I was just wondering why there doesn't seem to be a "hover" state for the stateimagery of the framewindow and the titlebar widget in falagard?
I just wanted to make the titlebar light up a little when the mouse hovers over it but now i don't know how to pull that off..

Is there another way to do it maybe?

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

Postby CrazyEddie » Sun Jun 08, 2008 08:48

Hi,

There is currently no separate states in the Titlebar for imagery purposes - I agree this would be a useful thing to have :)

You may be able to achieve the effect you want in a few ways. Obviously you could create a new Titlebar class that can expose some new state, and then optionally (if you did not embed the behaviour in the new Titlebar class) add a new WindowRenderer class that can select different imagery based on the new states. That probably sounds quite complicated (although it's really not), so I will offer a 'work-around' solution as well...

The work around solution would be to have a property in the titlebar skin that holds some colour, which can be applied to the imagery when rendering. What you could then do is subscribe to the events on the titlebar that tells when the mouse enters/leaves, and update the colour property value to give the highlight effect. It would also be possible to have properties that specify images - enabling changing the actual imagery too.

If you need elaboration on either solution, please ask and someone will be able to assist further :)

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 14 guests