Created page with "<onlyinclude><includeonly>{| class="wikitable mw-collapsible" |+ Methods ! Method ! Parameters ! Description {{#invoke:ComponentMethods|main}} |} {{#invoke:ComponentMethods|footnote}}</includeonly></onlyinclude> This template intends to replace Template:Table ComponentTriggers for displaying the table of methods on Component pages. It adds support for marking methods as hidden by the inspector, and simplifies the description of parameters in a way that would be..." |
mNo edit summary |
||
Line 32: | Line 32: | ||
* <code>params</code> is a <code>;</code> semicolon-separated list, | * <code>params</code> is a <code>;</code> semicolon-separated list, | ||
* each <code>param</code> is a <code>:</code> colon-separated group of <code>name</code>, <code>types</code> and <code>description</code>, | * each <code>param</code> is a <code>:</code> colon-separated group of <code>name</code>, <code>types</code> and <code>description</code>, | ||
* and <code>types</code> is a <code>,</code> comma-separated list (in case a method is overloaded with different types) of simple type names or explicit page links as required. | * and <code>types</code> is a <code>,</code> comma-separated list (in case a method is overloaded with different types) of simple type names or explicit page links as required. Simple type names will be rendered as a link to ''Type:<type name>''; explicit links (determined by double brackets) will be used as-is. | ||
<code>params</code> may also be left blank and will then be rendered as ''"none"''. | |||
A <code>method</code> that is (without the use of a modded client) not listed in the inspector should be marked as "invisible" with an <code>*</code> asterisk after the closing <code>)</code>. Marking any method as invisible will add a footnote below the table accordingly. | A <code>method</code> that is (without the use of a modded client) not listed in the inspector should be marked as "invisible" with an <code>*</code> asterisk after the closing <code>)</code>. Marking any method as invisible will add a footnote below the table accordingly. |
Latest revision as of 07:20, 15 July 2024
This template intends to replace Template:Table ComponentTriggers for displaying the table of methods on Component pages.
It adds support for marking methods as hidden by the inspector, and simplifies the description of parameters in a way that would be incompatible with the old template which required manual formatting.
Powered by Module:ComponentMethods.
Usage
Each row may be specified on a single or multiple lines:
{{Table ComponentMethods
|<method>|<params>|<description>
-- or
|<method>
|<param>
;<param>
;<param>
|<description>
}}
where
params
is a;
semicolon-separated list,- each
param
is a:
colon-separated group ofname
,types
anddescription
, - and
types
is a,
comma-separated list (in case a method is overloaded with different types) of simple type names or explicit page links as required. Simple type names will be rendered as a link to Type:<type name>; explicit links (determined by double brackets) will be used as-is.
params
may also be left blank and will then be rendered as "none".
A method
that is (without the use of a modded client) not listed in the inspector should be marked as "invisible" with an *
asterisk after the closing )
. Marking any method as invisible will add a footnote below the table accordingly.
Examples
{{Table ComponentMethods |Resize(size, filtering) |size:int,int2:Scaling factor. ;filtering:Filtering:Resampling method. |Replaces the 2D texture with a scaled copy, resampled using the given filtering method. Scales separately on the X and Y axes when an int2 is passed. }}
Method | Parameters | Description |
---|---|---|
Resize(size, filtering)
|
|
Replaces the 2D texture with a scaled copy, resampled using the given filtering method. Scales separately on the X and Y axes when an int2 is passed. |
{{Table ComponentMethods |BakeMesh()||Stores a snapshot of this procedural mesh and replaces this component with a [[Component:StaticMesh|StaticMesh]]. |SetupRenderer()*||Attaches components for a default [[PBS_Metallic]] material and [[Component:MeshRenderer|MeshRenderer]] referencing this mesh. }}
Method | Parameters | Description |
---|---|---|
BakeMesh()
|
none | Stores a snapshot of this procedural mesh and replaces this component with a StaticMesh. |
SetupRenderer() *
|
none | Attaches components for a default PBS_Metallic material and MeshRenderer referencing this mesh. |
* Methods marked with an asterisk are invisible in the inspector by default.