Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Menu highlighting

Author
Message
spine
16
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 2nd Jan 2010 01:44
I'm trying to find a proper way to highlight a button (which, in this case, is switching a sprite) and, of course, remove the highlight depending on the positionof the mouse pointer.

I'm not exactly sure how to do this; I've run into a dead end trying to base this directly on position, so I assigned values based on the positions, and it still won't change back. I think I just need to reorganize my code a little, but it'd really drop my morale if that failed.

So does anyone know how I should tackle this problem?
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 2nd Jan 2010 02:07
Loop through each menu item, check if the mouse is over it. If not, render the original image. If so, render the highlighted one.

Login to post a reply

Server time is: 2024-10-01 20:28:49
Your offset time is: 2024-10-01 20:28:49