- Sleak Look
- Curved Edges
- Easy coloring
Hi everybody Hidden here, I was making a canvas window design for my game, and when I made it, I just had to share it Don't worry, the screenshot isn't my game xD Anyways, take a look and if you want to use it, it's simple Copy and paste the code you see below into Global Code and your pretty much set! To use this function, type DRAWWIN(Border_red,Border_green,Boreder_blue, background_red, background_green, background_blue);
well, obviously you don't type all of that, you replace the "red green and blue' such as "border_red" and what not with a number. Example:
DRAWWIN(0, 177, 255, 0, 0, 70);
Code:
- Code: Select all
void DRAWWIN(int BR, int BG, int BB, int FR, int FG, int FB) {
int i;
erase(0, 0, 0, 1);
setpen(BR, BG, BB, 0, 1);
moveto(3, 0);
lineto(width-6, 0);
putpixel(2, 1);
putpixel(1, 2);
moveto(0, 3);
lineto(0, height-5);
putpixel(1, height-4);
putpixel(2, height-3);
moveto(3, height-2);
lineto(width-5, height-2);
putpixel(width-4, height-3);
putpixel(width-3, height-4);
moveto(width-3, height-5);
lineto(width-3, 3);
putpixel(width-4, 2);
putpixel(width-5, 1);
setpen(BR-155, BG-155, BB-155, 0, 1);
moveto(4, 1);
lineto(width-7, 1);
putpixel(3, 2);
putpixel(2, 3);
moveto(1, 4);
lineto(1, height-6);
putpixel(2, height-5);
putpixel(3, height-4);
moveto(4, height-3);
lineto(width-6, height-3);
putpixel(width-5, height-4);
putpixel(width-4, height-5);
moveto(width-4, height-6);
lineto(width-4, 4);
putpixel(width-5, 3);
putpixel(width-6, 2);
setpen(FR, FG, FB, .70, 1);
for (i=3;i<height-3;i++) {
moveto(3, i);
lineto(width-6, i);
}
setpen(BR, BG, BB, 0, 16);
putpixel(0, 0);
}