GUI fixes; Mesh loader WIP
This commit is contained in:
@@ -29,7 +29,7 @@ function render.drawWedge(x, y, w, h, angle, mouthSize, fidelity)
|
||||
end
|
||||
end
|
||||
|
||||
function render.drawArc(x, y, ang, p, rad, color, seg)
|
||||
function render.drawArc(x, y, ang, p, rad, seg)
|
||||
seg = seg || 80
|
||||
ang = (-ang) + 180
|
||||
local vertices = {}
|
||||
@@ -41,4 +41,19 @@ function render.drawArc(x, y, ang, p, rad, color, seg)
|
||||
end
|
||||
|
||||
render.drawPoly(vertices)
|
||||
end
|
||||
|
||||
function render.drawFilledCircle(x, y, radius, seg)
|
||||
local cir = {}
|
||||
|
||||
table.insert(cir, { x = x, y = y, u = 0.5, v = 0.5 })
|
||||
for i = 0, seg do
|
||||
local a = math.rad(( i / seg ) * -360)
|
||||
table.insert(cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 })
|
||||
end
|
||||
|
||||
local a = math.rad(0)
|
||||
table.insert(cir, { x = x + math.sin( a ) * radius, y = y + math.cos( a ) * radius, u = math.sin( a ) / 2 + 0.5, v = math.cos( a ) / 2 + 0.5 })
|
||||
|
||||
render.drawPoly(cir)
|
||||
end
|
||||
Reference in New Issue
Block a user