Garry's Mod Wiki

Revision Difference

draw.RoundedBoxEx#515400

<function name="RoundedBoxEx" parent="draw" type="libraryfunc">⤶ <description>⤶ Draws a rounded rectangle. This function also lets you specify which corners are drawn rounded.⤶ ⤶ <rendercontext hook="false" type="2D"/>⤶ </description>⤶ <realm>Client and Menu</realm>⤶ <file line="175-L233">lua/includes/modules/draw.lua</file>⤶ <args>⤶ <arg name="cornerRadius" type="number">Radius of the rounded corners, works best with a power of 2 number.</arg>⤶ <arg name="x" type="number">The x coordinate of the top left of the rectangle.</arg>⤶ <arg name="y" type="number">The y coordinate of the top left of the rectangle.</arg>⤶ <arg name="width" type="number">The width of the rectangle.</arg>⤶ <arg name="height" type="number">The height of the rectangle.</arg>⤶ <arg name="color" type="table">The color to fill the rectangle with. Uses the &lt;page&gt;Color&lt;/page&gt;.</arg>⤶ <arg name="roundTopLeft" type="boolean" default="false">Whether the top left corner should be rounded.</arg>⤶ <arg name="roundTopRight" type="boolean" default="false">Whether the top right corner should be rounded.</arg>⤶ <arg name="roundBottomLeft" type="boolean" default="false">Whether the bottom left corner should be rounded.</arg>⤶ <arg name="roundBottomRight" type="boolean" default="false">Whether the bottom right corner should be rounded.</arg>⤶ </args>⤶ </function>⤶ ⤶