Garry's Mod Wiki

Revision Difference

draw.WordBox#515415

<function name="WordBox" parent="draw" type="libraryfunc">⤶ <description>⤶ Draws a rounded box with text in it.⤶ ⤶ <rendercontext hook="false" type="2D"/>⤶ </description>⤶ <realm>Client and Menu</realm>⤶ <file line="235-L253">lua/includes/modules/draw.lua</file>⤶ <args>⤶ <arg name="bordersize" type="number">Size of border, should be multiple of 2. Ideally this will be 8 or 16.</arg>⤶ <arg name="x" type="number">The X Coordinate.</arg>⤶ <arg name="y" type="number">The Y Coordinate.</arg>⤶ <arg name="text" type="string">Text to draw.</arg>⤶ <arg name="font" type="string">Font to draw in. See &lt;page&gt;surface.CreateFont&lt;/page&gt; to create your own, or [here](/gmod/Default_Fonts) for a list of default fonts.</arg>⤶ <arg name="boxcolor" type="table">The box color. Uses the &lt;page&gt;Color&lt;/page&gt;.</arg>⤶ <arg name="textcolor" type="table">The text color. Uses the &lt;page&gt;Color&lt;/page&gt;.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="number">The width of the word box.</ret>⤶ <ret name="" type="number">The height of the word box.</ret>⤶ </rets>⤶ </function>⤶ ⤶