DPropertySheet.Paint

From GMod Wiki

Jump to: navigation, search
Function
Syntax DPropertySheet.Paint( )
Description:
Adds color to your PropertySheets.
Returns: PropertySheet
In Object: DPropertySheet
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DPropertySheet.Paint]DPropertySheet.Paint [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionAdds color to your PropertySheets.
Used onNewerClient.png
Code
SheetItemOne = vgui.Create("DCollapsibleCategory", DermaPanel) -- Create's a drop down
SheetItemOne:SetPos( 25,50 ) -- Set the drop down's position on the sheet
SheetItemOne:SetSize( 200, 50 ) -- Size of the drop down
SheetItemOne:SetExpanded( 1 ) -- Start expanded?
SheetItemOne:SetLabel( "Build Servers" ) -- Title the drop down
SheetItemOne.Paint = function() -- The paint function
    surface.SetDrawColor( 24, 37, 49, 255 ) -- What color ( R, B, G, A )
    surface.DrawRect( 0, 0, 200, 50 ) -- How big is it (cords)
end
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox