DMultiChoice.PaintOver

From GMod Wiki

Jump to: navigation, search
Function
Syntax DMultiChoice.PaintOver( )
Description:
Similar to DPanel.Paint, but draws over the initial menu.
Returns: nil
In Object: DMultiChoice
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DMultiChoice.PaintOver]DMultiChoice.PaintOver [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSimilar to DPanel.Paint, but draws over the initial menu.
Used onNewerClient.png
Code
local List= vgui.Create( "DMultiChoice", DermaPanel)
	List:SetPos(5,28)
	List:SetSize( 100, 20 )
	List:AddChoice("Option 1")
	List:AddChoice("Option 2")
	List:AddChoice("Option 3")
	List.PaintOver = function() -- The paint function
	   -- What color do You want to paint the menu (R, B, G, A)
	    surface.SetDrawColor( 68, 87, 101, 255 )
	   -- Draws A Outlined Box Around The Menu
	    surface.DrawOutlinedRect( 0, 0, 100, 20)
	end
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox