Draft: New HUD functions
Adds drawRectangle
, drawLine
, drawTriangle
, drawQuad
, and drawPolygon
to Lua.
Parameters:
drawRectangle(fixed x, fixed y, fixed w, fixed h, color+flags)
drawLine(fixed x1, fixed y1, fixed x2, fixed y2, color+flags)
drawTriangle(fixed x1, fixed y1, fixed x2, fixed y2, fixed x3, fixed y3, color+flags)
drawQuad(fixed x1, fixed y1, fixed x2, fixed y2, fixed x3, fixed y3, fixed x4, fixed y4, color+flags)
drawPolygon(table vertices, color+flags)
drawPolygon
table format:
-- x and y are fixed point coordinates
local vertices = {
{ x = num, y = num },
{ x = num, y = num },
-- (...)
{ x = num, y = num }
}
v.drawPolygon(vertices, 181)
-- or
vertices = {
{ num, num },
{ num, num },
-- (...)
{ num, num }
}
v.drawPolygon(vertices, 181)
Also adds vector2
and vector3
libraries
Examples:
Edited by Lactozilla
Merge request reports
Activity
Filter activity
added Lua OpenGL renderer Rendering Software renderer labels
added Feature label
added 468 commits
-
33d71a65...379cc420 - 466 commits from branch
STJr:next
- 8a828424 - Add vector2 and vector3 lib to Lua
- 31359941 - Merge remote-tracking branch 'stjr/next' into draw2d-functions
-
33d71a65...379cc420 - 466 commits from branch
added 156 commits
-
cb9ea12b...2c689bae - 155 commits from branch
STJr:next
- 09bfe4a7 - Merge branch 'next' into draw2d-functions
-
cb9ea12b...2c689bae - 155 commits from branch
Please register or sign in to reply