surface.DrawTexturedRect
From GMod Wiki
Function | |
Syntax |
surface.DrawTexturedRect( Number x, Number y, Number width, Number height ) Where is this used? |
Description: | |
Draws a textured rect, assuming that the required values have been set. The texture is set by Surface.SetTexture. | |
Returns: | nil |
Part of Library: | surface |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect]Surface.DrawTexturedRect [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 left upper corner (x,y), not the center.
Also note that all these values are PIXELS, not a scale. (Unlike Gmod9 lua)
If you are unable to modify the color of this texture with Surface.SetDrawColor, please see this post.