#include "Panel.h" void TPanel::Init(int aX, int aY, int aW, int aH, int OwnerX, int OwnerY, u32 aColor, TBvStyle aBevelOuter){ unsigned short Left,Right,Top,Bottom; Bound.SetBySize(aX+OwnerX, aY+OwnerY, aW, aH); OwnerLeftTop.x = OwnerX; OwnerLeftTop.y = OwnerY; BorderWidth = 2; Color = aColor; BevelOuter = aBevelOuter; if(BevelOuter == bvRaised){ Left = Bound.Left + 1; Right = Bound.Right - 2; Top = Bound.Top + 1; Bottom = Bound.Bottom - 2; }else{ Left = Bound.Left + 2; Right = Bound.Right - 2; Top = Bound.Top + 2; Bottom = Bound.Bottom - 2; } Content.Set(Left,Top,Right,Bottom); } void TPanel::DrawSelf(void) { /*unsigned int r,g,b, h,l; h = Color & 0x00FFFFFF; r = h / 0x10000; g = (h / 256) % 256; b = h % 256; h = r * 3 / 2; if(h > 255)h=255; r = h; h = g * 3 / 2; if(h > 255)h=255; g = h; h = b * 3 / 2; if(h > 255)h=255; b = h; h = (r<<16) + (g<<8) + b; l = r * 2 / 3; r = l; l = g * 2 / 3; g = l; l = b * 2 / 3; b = l; l = (r<<16) + (g<<8) + b; //Draw Border g = Bound.Right; b = Bound.Bottom; //Draw Right & Bottom for(r=0; r