DFrame.Paint

From GMod Wiki

Jump to: navigation, search
Function
Syntax DFrame:Paint( )
Description:
Paints the frame.
Returns: nil
In Object: DFrame
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DFrame.Paint]DFrame.Paint [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a frame in the center of your screen and paints it black.
Used onNewerClient.png
Code
 
local DermaFrame = vgui.Create( "DFrame" )
DermaFrame:SetPos( ScrW()/2-150, ScrH()/2-150 )
DermaFrame:SetSize( 300, 300 )
DermaFrame:SetTitle( "Derma Paint" )
DermaFrame:SetVisible( true )
DermaFrame:MakePopup()
DermaFrame.Paint = function()
	draw.RoundedBox( 8, 0, 0, DermaFrame:GetWide(), DermaFrame:GetTall(), Color( 0, 0, 0, 150 ) )
end
 
 
OutputGmderma.png


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox