Template:GMfunc/Documentation

{| style="width:100%; background-color:transparent;padding:0px;" cellspacing="0" cellpadding="0"
 * style="width:50%; border-left: 2px solid; border-right: 2px solid; border-top: 0; border-bottom: 0; border-right-color: #A3BFB2; border-left-color: #A3BFB2; background:#F5FFFA; padding:1.2em;border-right:1px solid #A3BFB1;" valign="top" |

The GMfunc Template
The template is used in Game Maker Function Articles.

General Format
The template is inserted at the absolute beginning of the article as can be seen:

Arguments
Not all of the arguments included above need to be written and defined.

title
A required field. This includes the full name of the function, along with its variables. For example, for surface_getpixel, the name would be "surface_getpixel(id,x,y)". The title will edit the name of the article appearing in the header and the browser's titlebar.

description
An optional but very recommended field to use. Includes a short description of the function and what it does. If there is any further explanation of the function, this shouldn't belong to the description nor any part of the template, but instead is inserted after the template as described in YY:FUNC.

arguments
Arguments are optional and are only written when they exist for a given function. They are written in a bullet-style. The general format of a single argument is as follows: For example, the make_color_rgb function has the following arguments:
 * name (string/real): description of the argument.
 * arguments=*red (real): The amount of red to use, integer from 0-255
 * green (real): The amount of green to use, integer from 0-255
 * blue (real): The amount of blue to use, integer from 0-255

Normally, only the first reference to a term should be linked. But for a function's arguments all the argument's types should be linked.

return
The return is an optional variable in the template and is only written when it applies. Since only one value is returned, it is not in bullet style. A return value is written as follows: (string/real): description of the returned value.

For example, the abs function has the following written as its return value:
 * return=(real): absolute value of x

image
An absolute optional link to an image that might describe some information about a given function.
 * }

{| style="width:100%; background-color:transparent;padding:0px;" cellspacing="0" cellpadding="0"
 * style="width:100%;border:2px #A3BFB2 solid;background:#CEF2E1;padding:1.2em;border-right:1px solid #A3BFB1;" valign="top" |

Uses
The GMfunc template should be used in game maker function articles. For more information about formatting Game Maker function articles in general, see Project:Article Formatting/Functions.

Dependencies

 * Template:wrongtitle
 * }