LCL:
So far, this new window system is looking awesome! I'll make a copy for buttons, too.
Hblade wrote:Hey cool test dude
DRAWWIN(x, y, width, height, borderR, borderG, borderB, bg_r, bg_g, bg_b);
//Example:
DRAWWIN(width/2, height/2, 500, 100, 255, 255, 255, 255, 255, 255);
Hblade wrote:Here you are, LCL! All done by canvas
Same function as before, the same commands. To make buttons, simply do the same thing as Drawwin but this time use DRAWBTN instead
void DRAWWIN(int BR, int BG, int BB, int FR, int FG, int FB, int TR, int TG, int TB) {
int i;
int i2;
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, 0, 1);
for (i=3;i<height-3;i++) {
moveto(3, i);
lineto(width-6, i);
}
for (i2=2;i2<24;i2++) {
setpen(TR-i2*3, TG-i2*3, TB-i2*3, .35, 1);
moveto(2, i2);
lineto(width-5, i2);
}
setpen(BR, BG, BB, 0, 16);
}
DRAWWIN(br, bg, bb, mr, mg, mb, tr, tg, tb);
Hblade wrote:to say the least xD Your function would come out something like this
- Code: Select all
DRAWWIN(x, y, width, height, borderR, borderG, borderB, bg_r, bg_g, bg_b);
//Example:
DRAWWIN(width/2, height/2, 500, 100, 255, 255, 255, 255, 255, 255);
Users browsing this forum: No registered users and 1 guest