D3d.DrawRect
From Nomad DB
Revision as of 21:21, 2 August 2020 by Jan (talk | contribs) (Created page with "Draws a rectangle on the screen. The color is set using d3d.SetColor. {{Warning|This function can only be called from inside OnRender event!}}...")
Draws a rectangle on the screen. The color is set using d3d.SetColor.
This function can only be called from inside OnRender event!
Syntax
d3d.DrawRect(x, y, w, h)
- x, y: number (Position)
- w, h: width (number), height (number)
Example
Draws a red square at 50x50.
function script:OnRender()
d3d.SetColor(255, 0, 0) --red
d3d.DrawRect(50, 50, 50, 50)
end