surface.DrawRect
From GMod Wiki
Function | |
Syntax |
surface.DrawRect( Number x, Number y, Number width, Number height ) Where is this used? |
Description: | |
Draws a colored Rect, assuming the rest of its required data has been set. | |
Returns: | nil |
Part of Library: | surface |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Surface.DrawRect]Surface.DrawRect [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Additional Notes
- x - The X position on the user's screen to draw the rect. Note that to make sure the rect draws the same on all resolutions you need to use a fraction of the user's screen width/height.
- y - The Y position on the user's screen to draw the rect.
- Width - How wide the rect is.
- Height - How tall the rect is.
Note that the origin of the Rect is the (x,y), not the center. Also note that all these values are PIXELS, not a scale. (Unlike Gmod9 lua)