Garry's Mod Wiki

DPanelOverlay

Description

Adds curved corners.

Parent

Derives from DPanel.

Example

Creates a DPanel with a DPanelOverlay and adds a DLabel to it

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

Page Links


Special Pages


Wikis

?

Render Time: 31ms

DB GetPage 3
Generate Html 3
SaveChanges (1) 9
Render Body 0
Render Sidebar 12