DPanelOverlay
Methods
table DPanelOverlay:GetColor()
Returns the border color of the DPanelOverlay set by DPanelOverlay:SetColor.
DPanelOverlay:PaintDifferentColours( table cola, table colb, table colc, table cold, number size )
This is used internally - although you're able to use it you probably shouldn't.
Used internally by the panel for type 3.
DPanelOverlay:PaintInnerCorners( number size )
This is used internally - although you're able to use it you probably shouldn't.
Used internally by the panel for types 1 and 2.
Example
local DFrame = vgui.Create( "DFrame" )
DFrame:SetSize( 350, 200 ) -- Set the size of the panel
DFrame:Center()
DFrame:MakePopup()
local DPanel = vgui.Create( "Panel", DFrame )
DPanel:Dock( FILL )
local DLabel = vgui.Create( "DLabel", DPanel )
DLabel:SetPos( 10, 10 ) -- Set the position of the label
DLabel:SetText( "I'm a DLabel inside a DPanel that has a DPanelOverlay border!" ) -- Set the text of the label
DLabel:SizeToContents() -- Size the label to fit the text in it
local DPanelOverlay = vgui.Create( "DPanelOverlay", DPanel )
DPanelOverlay:SetType( 1 ) -- Sets the type of overlay to add to the DPanel
DPanelOverlay:SetColor( Color( 255, 0, 0 ) ) -- Sets the colour of the borders