- Documentation
- Client functions
- dxDrawRoundedRectangle
Function
dxDrawRoundedRectangle
Draws a rectangle with rounded corners. The radius is in pixels and never exceeds half of the shorter side.
Syntax
bool dxDrawRoundedRectangle(float x, float y, float width, float height [, float radius = 6, int color = tocolor(255, 255, 255), bool postGUI = false])Arguments
xfloat- Left edge.
yfloat- Top edge.
widthfloat- Width.
heightfloat- Height.
radiusfloat, optional = 6- Corner radius.
colorint, optional = tocolor(255, 255, 255)- Colour.
postGUIbool, optional = false- Above GUI.
Returns
true if drawn.
Example
addEventHandler("onClientRender", root, function()
dxDrawRoundedRectangle(40, 200, 260, 60, 12, tocolor(15, 13, 12, 220))
dxDrawText("Trilogy Hub", 40, 200, 300, 260, tocolor(255, 122, 34), 1.4, "default-bold", "center", "center")
end)