Hello.
I want to get my roundedRectangle to show smoother like this:
Mines looking like this at the moment:
Code is looking like this at the moment:
function renderInfobox()
dxDrawRoundedRectangles(sX/2 - width / 2 - 24, startY + 1, width - 2 + 25, height +20, tocolor ( 0,0,0,180 ), 8 )
dxDrawText(text, sX/2 - width / 2 + width / 2, startY+20 + height / 2, _, _, tocolor(200, 200, 200, a), 1, font, "center", "center", false, false, false, true)
end
addEventHandler("onClientRender", root, renderInfobox)
function dxDrawRoundedRectangles(x, y, rx, ry, color, radius)
rx = rx - radius * 2
ry = ry - radius * 2
x = x + radius
y = y + radius
if (rx >= 0) and (ry >= 0) then
dxDrawRectangle(x, y, rx, ry, color)
dxDrawRectangle(x, y - radius, rx, radius, color)
dxDrawRectangle(x, y + ry, rx, radius, color)
dxDrawRectangle(x - radius, y, radius, ry, color)
dxDrawRectangle(x + rx, y, radius, ry, color)
dxDrawCircle(x, y, radius, 180, 270, color, color, 7)
dxDrawCircle(x + rx, y, radius, 270, 360, color, color, 7)
dxDrawCircle(x + rx, y + ry, radius, 0, 90, color, color, 7)
dxDrawCircle(x, y + ry, radius, 90, 180, color, color, 7)
end
end