Computer Science Canada [Module] Button Class |
Author: | Raknarg [ Tue Jan 24, 2012 3:57 pm ] | ||
Post subject: | [Module] Button Class | ||
Hey guys. I made a button class for a certain game, and I decided I'd share it with everyone. If you know how to use classes, it should be pretty straightforward. Here's an example program I made to go along with it. If you click the button, the number in the top right goes up by one:
Some notes here: -the first four parameters are like the first four in Draw.Box -If you make the y2 smaller than y1 or x2 smaller than x1, it wont ever detect anything -Those three colours there are respectively fill colour, border colour and font colour -The last number is the size of the font -when you use the colour, the button pressed will be the colour you entered, hovering will be darker and not touching it will be darkest Also, I forgot that when I made this topic, it's not actually a module, its a class. Sorry. |
Author: | Raknarg [ Wed Jan 25, 2012 9:16 am ] |
Post subject: | RE:[Module] Button Class |
Actlually, I forgot that this was in the wrong section entirely. Could a mod move this to submissions? |
Author: | smool [ Wed Feb 15, 2012 9:17 pm ] |
Post subject: | RE:[Module] Button Class |
Looks nice, may I suggest a border around the edges? And perhaps the option of making the button a picture? |
Author: | Raknarg [ Thu Feb 16, 2012 11:32 am ] |
Post subject: | RE:[Module] Button Class |
There is a border, just the color i picked makes it less distinct and yeah, I was considering that. I'll try that. |