Garry's Mod Wiki

Revision Difference

ControlPanel:MatSelect#517585

<function name="MatSelect" parent="ControlPanel" type="panelfunc"> <ispanel>yes</ispanel> <description>Creates a <page>MatSelect</page> panel and adds it as an [item](/gmod/ControlPanel/AddPanel).</description> <description>Creates a <page>MatSelect</page> panel and adds it as an <page text="item">ControlPanel:AddPanel</page>.</description> <file line="51-L73">gamemodes/sandbox/gamemode/spawnmenu/controlpanel.lua</file> <realm>Client</realm> <args> <arg name="convar" type="string">Calls &lt;page&gt;MatSelect&lt;/page&gt;:[SetConVar](/gmod/ContextBase/SetConVar) with this value.</arg> <arg name="convar" type="string">Calls &lt;page&gt;MatSelect&lt;/page&gt;:<page text="SetConVar">ContextBase:SetConVar</page> with this value.</arg> <arg name="options" type="table" default="nil">If specified, calls &lt;page&gt;MatSelect:AddMaterial&lt;/page&gt;(key, value) for each table entry. If the table key is a number, the function will instead be called with the value as both arguments.</arg> <arg name="autostretch" type="boolean" default="nil">If specified, calls &lt;page&gt;MatSelect:SetAutoHeight&lt;/page&gt; with this value.</arg> <arg name="width" type="number" default="nil">If specified, calls &lt;page&gt;MatSelect:SetItemWidth&lt;/page&gt; with this value.</arg> <arg name="height" type="number" default="nil">If specified, calls &lt;page&gt;MatSelect:SetItemHeight&lt;/page&gt; with this value.</arg> </args> <rets> <ret name="" type="MatSelect">The created MatSelect panel.</ret> </rets> </function>