Computer Science Canada Highlighting Text |
Author: | Malazan [ Tue May 31, 2005 8:23 pm ] | ||
Post subject: | Highlighting Text | ||
Is there any way to highlight these boxes if you're mouse scrolls over it?
Thanks ![]() |
Author: | Cervantes [ Wed Jun 01, 2005 3:13 pm ] | ||
Post subject: | |||
If your mouse is over it, alter the value of the the variable that stores the colour of the box. Here's the function I used for checking this in my button class:
This works such that the function returns true when the button is released. It also adjusts the colours of the edges of the button so that it looks like it's being depressed. Edit: oh, and the xDraw and yDraw are where the label will be drawn. It changes when the button is pressed to make it look more realistic. |
Author: | Malazan [ Wed Jun 01, 2005 11:26 pm ] |
Post subject: | |
Eek. It gives me an error saying "button cannot be followed by a '.' ![]() |
Author: | Cervantes [ Thu Jun 02, 2005 5:52 pm ] |
Post subject: | |
Yeah, I'm using records. Check the tutorial section for a nice read. ![]() Also, that was meant as an example of how to check if your mouse is over it and how to change the colours. I don't expect you to copy and paste that code into your program. |