surface.DrawOutlinedRect

From GMod Wiki

Jump to: navigation, search
Function
Syntax surface.DrawOutlinedRect( Number x, Number y, Number width, Number height )
Where is this used?
Description:
Draws a colored outline in a rectangular form.
Returns: nil
Part of Library: surface
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Surface.DrawOutlinedRect]Surface.DrawOutlinedRect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionDraws a the outline of a white box.
Used onNewerClient.png
Code
function whiteSquare()
    surface.SetDrawColor( 255, 255, 255, 255 )
    surface.DrawOutlinedRect( ScrW() / 2 - 20, ScrH() / 2 - 20, 40, 40)
end
 
hook.Add("HUDPaint", "aWhiteSquare", whiteSquare)
OutputDraws the outline of a white box on the center of the screen.


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox