local CONTROL = {}
CONTROL.Icon = "dframe_32"
CONTROL.BackColor = color.transparent
function CONTROL.Paint(w, h)
DrawTexturedRectangle(0, 0, 6, 26, "dframe_upperleft")
DrawTexturedRectangle(w - 6, 0, 6, 26, "dframe_upperright")
DrawTexturedRectangle(6, 0, w - 12, 26, "dframe_topfiller")
DrawTexturedRectangle(0, h - 6, 6, 6, "dframe_lowerleft")
DrawTexturedRectangle(w - 6, h - 6, 6, 6, "dframe_lowerright")
DrawTexturedRectangle(w - 18, 7, 11, 11, "dframe_close")
DrawFilledRectangle(0,26, w, h - 32, Color(100,100,100))
DrawFilledRectangle(6,h - 6, w - 12, 6, Color(100,100,100))
DrawText(30, 5, "Arial", GetProperty("Caption"), color.white, 1)
--This function is required, not supplying this will cause an infinite loop
EndGraphics()
end
control.Add("DFrame", CONTROL)
CreateImage("dframe_lowerleft", "dframe_lowerleft.png")
CreateImage("dframe_lowerright", "dframe_lowerright.png")
CreateImage("dframe_upperright", "dframe_upperright.png")
CreateImage("dframe_upperleft", "dframe_upperleft.png")
CreateImage("dframe_topfiller", "dframe_topfiller.png")
CreateImage("dframe_close", "dframe_x.png")