ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. dxDrawBorderedRectangle

Function

dxDrawBorderedRectangle

ClientDrawing (dx)Trilogy Hub only

Draws a rectangle with a fill and a border of a given thickness in one call.

Syntax

bool dxDrawBorderedRectangle(float x, float y, float width, float height [, int fillColor, int borderColor, float thickness = 1, bool postGUI = false])

Arguments

xfloat
Left edge.
yfloat
Top edge.
widthfloat
Width.
heightfloat
Height.
fillColorint, optional
Fill colour.
borderColorint, optional
Border colour.
thicknessfloat, optional = 1
Border thickness.
postGUIbool, optional = false
Above GUI.

Returns

true.

Example

addEventHandler("onClientRender", root, function()
    dxDrawBorderedRectangle(50, 50, 220, 120, tocolor(0, 0, 0, 150), tocolor(255, 122, 34), 2)
end)

See also