What it does is it collects data (window position, is it the current window, window size) and draw a simple window off that collected data.
the visual is pretty much simple, a blue color theme with a white border and a black one.
I made this for my oncoming project, and though I should share this with everyone :O
- Code: Select all
void DW_TLC(int W_Xo, int W_Yo, int W_Act) //Top Left Corner
{
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(4+W_Xo,1+W_Yo);
lineto(1+W_Xo,4+W_Yo);
if(W_Act)setpen(256,256,256,0,1);
else setpen(127,127,127,0,1);
moveto(4+W_Xo,2+W_Yo);
lineto(2+W_Xo,4+W_Yo);
setpen(0,0,255,0,1);
moveto(4+W_Xo,3+W_Yo);
lineto(3+W_Xo,4+W_Yo);
setpen(0,0,127,0,1);
putpixel(4+W_Xo,4+W_Yo);
putpixel(5+W_Xo,4+W_Yo);
}
void DW_TTB(int W_Xo, int W_Yo, int W_Act, int W_WWidth) //Top Title Bar
{
double i1;
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(5+W_Xo,1+W_Yo);
lineto(5+W_WWidth+W_Xo,1+W_Yo);
if(W_Act)setpen(256,256,256,0,1);
else setpen(127,127,127,0,1);
moveto(5+W_Xo,2+W_Yo);
lineto(5+W_WWidth+W_Xo,2+W_Yo);
setpen(0,0,255,0,1);
moveto(5+W_Xo,3+W_Yo);
lineto(5+W_WWidth+W_Xo,3+W_Yo);
for(i1=0; i1<W_WWidth; i1++)
{
if(W_Act)setpen((i1/W_WWidth)*255,(i1/W_WWidth)*255,(i1/W_WWidth)*255,0,1);
else setpen((i1/W_WWidth)*127,(i1/W_WWidth)*127,(i1/W_WWidth)*127,0,1);
moveto(5+W_Xo+(W_WWidth-i1),4+W_Yo);
lineto(5+W_Xo+(W_WWidth-i1),18+W_Yo);
}
}
void DW_TRC(int W_Xo, int W_Yo, int W_Act, int W_WWidth) //Top Right Corner
{
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(5+W_WWidth+W_Xo+1,1+W_Yo);
lineto(5+W_WWidth+W_Xo+4,4+W_Yo);
if(W_Act)setpen(256,256,256,0,1);
else setpen(127,127,127,0,1);
moveto(5+W_WWidth+W_Xo+1,2+W_Yo);
lineto(5+W_WWidth+W_Xo+3,4+W_Yo);
setpen(0,0,255,0,1);
moveto(5+W_WWidth+W_Xo+1,3+W_Yo);
lineto(5+W_WWidth+W_Xo+2,4+W_Yo);
setpen(0,0,127,0,1);
putpixel(5+W_WWidth+W_Xo+1,4+W_Yo);
putpixel(4+W_WWidth+W_Xo+1,4+W_Yo);
}
void DW_LSB(int W_Xo, int W_Yo, int W_Act, int W_WHeight) //Left Side Border
{
double i2;
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(1+W_Xo,5+W_Yo);
lineto(1+W_Xo,5+W_Yo+W_WHeight);
for(i2=0; i2<W_WHeight+1; i2++)
{
if(W_Act)setpen(127+(i2/W_WHeight)*127,127+(i2/W_WHeight)*127,127+(i2/W_WHeight)*127,0,1);
else setpen(64+(i2/W_WHeight)*64,64+(i2/W_WHeight)*64,64+(i2/W_WHeight)*64,0,1);
putpixel(2+W_Xo,5+W_Yo+(W_WHeight-i2));
}
setpen(0,0,255,0,1);
moveto(3+W_Xo,5+W_Yo);
lineto(3+W_Xo,5+W_Yo+W_WHeight);
setpen(0,0,127,0,1);
moveto(4+W_Xo,5+W_Yo);
lineto(4+W_Xo,5+W_Yo+W_WHeight);
moveto(5+W_Xo,5+W_Yo);
lineto(5+W_Xo,5+W_Yo+W_WHeight);
}
void DW_RSB(int W_Xo, int W_Yo, int W_Act, int W_WWidth, int W_WHeight) //Right Side Border
{
double i2;
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(9+W_Xo+W_WWidth,5+W_Yo);
lineto(9+W_Xo+W_WWidth,5+W_Yo+W_WHeight);
for(i2=0; i2<W_WHeight+1; i2++)
{
if(W_Act)setpen(127+(i2/W_WHeight)*127,127+(i2/W_WHeight)*127,127+(i2/W_WHeight)*127,0,1);
else setpen(64+(i2/W_WHeight)*64,64+(i2/W_WHeight)*64,64+(i2/W_WHeight)*64,0,1);
putpixel(8+W_Xo+W_WWidth,5+W_Yo+(W_WHeight-i2));
}
setpen(0,0,255,0,1);
moveto(7+W_Xo+W_WWidth,5+W_Yo);
lineto(7+W_Xo+W_WWidth,5+W_Yo+W_WHeight);
setpen(0,0,127,0,1);
moveto(6+W_Xo+W_WWidth,5+W_Yo);
lineto(6+W_Xo+W_WWidth,5+W_Yo+W_WHeight);
moveto(5+W_Xo+W_WWidth,5+W_Yo);
lineto(5+W_Xo+W_WWidth,5+W_Yo+W_WHeight);
}
void DW_BLC(int W_Xo, int W_Yo, int W_Act, int W_WHeight) //Bottom Left Corner
{
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(1+W_Xo,1+W_Yo+W_WHeight+5);
lineto(4+W_Xo,4+W_Yo+W_WHeight+5);
if(W_Act)setpen(127,127,127,0,1);
else setpen(64,64,64,0,1);
moveto(2+W_Xo,1+W_Yo+W_WHeight+5);
lineto(4+W_Xo,3+W_Yo+W_WHeight+5);
setpen(0,0,255,0,1);
moveto(3+W_Xo,1+W_Yo+W_WHeight+5);
lineto(4+W_Xo,2+W_Yo+W_WHeight+5);
setpen(0,0,127,0,1);
putpixel(4+W_Xo,1+W_Yo+W_WHeight+5);
}
void DW_BRC(int W_Xo, int W_Yo, int W_Act, int W_WWidth, int W_WHeight) //Bottom Right Corner
{
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(4+W_Xo+W_WWidth+5,1+W_Yo+W_WHeight+5);
lineto(1+W_Xo+W_WWidth+5,4+W_Yo+W_WHeight+5);
if(W_Act)setpen(127,127,127,0,1);
else setpen(64,64,64,0,1);
moveto(3+W_Xo+W_WWidth+5,1+W_Yo+W_WHeight+5);
lineto(1+W_Xo+W_WWidth+5,3+W_Yo+W_WHeight+5);
setpen(0,0,255,0,1);
moveto(2+W_Xo+W_WWidth+5,1+W_Yo+W_WHeight+5);
lineto(1+W_Xo+W_WWidth+5,2+W_Yo+W_WHeight+5);
setpen(0,0,127,0,1);
putpixel(1+W_Xo+W_WWidth+5,1+W_Yo+W_WHeight+5);
}
void DW_BBL(int W_Xo, int W_Yo, int W_Act, int W_WWidth, int W_WHeight) //Bottom Border Line
{
if(W_Act)setpen(0,0,0,0,1);
else setpen(64,64,64,0,1);
moveto(5+W_Xo,4+W_Yo+W_WHeight+5);
lineto(5+W_Xo+W_WWidth,4+W_Yo+W_WHeight+5);
if(W_Act)setpen(127,127,127,0,1);
else setpen(64,64,64,0,1);
moveto(5+W_Xo,3+W_Yo+W_WHeight+5);
lineto(5+W_Xo+W_WWidth,3+W_Yo+W_WHeight+5);
setpen(0,0,255,0,1);
moveto(5+W_Xo,2+W_Yo+W_WHeight+5);
lineto(5+W_Xo+W_WWidth,2+W_Yo+W_WHeight+5);
setpen(0,0,127,0,1);
moveto(5+W_Xo,1+W_Yo+W_WHeight+5);
lineto(5+W_Xo+W_WWidth,1+W_Yo+W_WHeight+5);
}
void DW_WA(int W_Xo, int W_Yo, int W_WWidth, int W_WHeight) //Working Area
{
int i3;
setpen(0,0,127,0,1);
for(i3=0; i3<W_WWidth; i3++)
{
moveto(5+W_Xo+i3,19+W_Yo);
lineto(5+W_Xo+i3,5+W_Yo+W_WHeight);
}
}
void DW_Main(int W_Xo, int W_Yo, int W_Act, int W_WWidth, int W_WHeight)
{
DW_TLC(W_Xo,W_Yo,W_Act);
DW_TTB(W_Xo,W_Yo,W_Act,W_WWidth);
DW_TRC(W_Xo,W_Yo,W_Act,W_WWidth);
DW_LSB(W_Xo,W_Yo,W_Act,W_WHeight);
DW_RSB(W_Xo,W_Yo,W_Act,W_WWidth,W_WHeight);
DW_BLC(W_Xo,W_Yo,W_Act,W_WHeight);
DW_BRC(W_Xo,W_Yo,W_Act,W_WWidth,W_WHeight);
DW_BBL(W_Xo,W_Yo,W_Act,W_WWidth,W_WHeight);
DW_WA(W_Xo,W_Yo,W_WWidth,W_WHeight);
}
place that code in a GLOBAL SCRIPT, then use the function DW_Main(X offset, Y offset, Active Window, Working Width, Working Height)
EDIT: Almost forgot to mention, use this only in a canvas actor!
I'm pretty sure anyone can fiddle with my code to change it's color/total look!
Anyhow, enjoy this rather small contribution of mine
