Template:ApiReference: Difference between revisions

From Pico-8 Wiki
Jump to navigation Jump to search
imported>Dddaaannn
(Created page with "<noinclude> Use this template at the top of every API reference page: <nowiki> {{ApiReference | name=spr | shortdesc=Draws a sprite, or sprite range, on the screen. | n || Th...")
 
imported>Dddaaannn
No edit summary
Line 25: Line 25:
</noinclude>
</noinclude>


<div style="font-weight: bold">
<div style="font-weight: bold">{{{name}}} ({{
{{{name}}} (
#if:{{{1|}}}
 
{{#if:{{{1|}}}
| {{#if:{{{2|}}}| [ |}} {{{1}}} {{#if:{{{4|}}}|,|}} {{#if:{{{2|}}}| ] |}}
| {{#if:{{{2|}}}| [ |}} {{{1}}} {{#if:{{{4|}}}|,|}} {{#if:{{{2|}}}| ] |}}
|}}
|}}{{
{{#if:{{{4|}}}
#if:{{{4|}}}
| {{#if:{{{5|}}}| [ |}} {{{4}}} {{#if:{{{7|}}}|,|}} {{#if:{{{5|}}}| ] |}}
| {{#if:{{{5|}}}| [ |}} {{{4}}} {{#if:{{{7|}}}|,|}} {{#if:{{{5|}}}| ] |}}
|}}
|}}{{
{{#if:{{{7|}}}
#if:{{{7|}}}
| {{#if:{{{8|}}}| [ |}} {{{7}}} {{#if:{{{10|}}}|,|}} {{#if:{{{8|}}}| ] |}}
| {{#if:{{{8|}}}| [ |}} {{{7}}} {{#if:{{{10|}}}|,|}} {{#if:{{{8|}}}| ] |}}
|}}
|}}{{
{{#if:{{{10|}}}
#if:{{{10|}}}
| {{#if:{{{11|}}}| [ |}} {{{10}}} {{#if:{{{13|}}}|,|}} {{#if:{{{11|}}}| ] |}}
| {{#if:{{{11|}}}| [ |}} {{{10}}} {{#if:{{{13|}}}|,|}} {{#if:{{{11|}}}| ] |}}
|}}
|}}{{
{{#if:{{{13|}}}
#if:{{{13|}}}
| {{#if:{{{14|}}}| [ |}} {{{13}}} {{#if:{{{16|}}}|,|}} {{#if:{{{14|}}}| ] |}}
| {{#if:{{{14|}}}| [ |}} {{{13}}} {{#if:{{{16|}}}|,|}} {{#if:{{{14|}}}| ] |}}
|}}
|}}{{
{{#if:{{{16|}}}
#if:{{{16|}}}
| {{#if:{{{17|}}}| [ |}} {{{16}}} {{#if:{{{19|}}}|,|}} {{#if:{{{17|}}}| ] |}}
| {{#if:{{{17|}}}| [ |}} {{{16}}} {{#if:{{{19|}}}|,|}} {{#if:{{{17|}}}| ] |}}
|}}
|}}{{
{{#if:{{{19|}}}
#if:{{{19|}}}
| {{#if:{{{20|}}}| [ |}} {{{19}}} {{#if:{{{22|}}}|,|}} {{#if:{{{20|}}}| ] |}}
| {{#if:{{{20|}}}| [ |}} {{{19}}} {{#if:{{{22|}}}|,|}} {{#if:{{{20|}}}| ] |}}
|}}
|}}{{
{{#if:{{{22|}}}
#if:{{{22|}}}
| {{#if:{{{23|}}}| [ |}} {{{22}}} {{#if:{{{25|}}}|,|}} {{#if:{{{23|}}}| ] |}}
| {{#if:{{{23|}}}| [ |}} {{{22}}} {{#if:{{{25|}}}|,|}} {{#if:{{{23|}}}| ] |}}
|}}
|}}{{
{{#if:{{{25|}}}
#if:{{{25|}}}
| {{#if:{{{26|}}}| [ |}} {{{15}}} {{#if:{{{28|}}}|,|}} {{#if:{{{26|}}}| ] |}}
| {{#if:{{{26|}}}| [ |}} {{{15}}} {{#if:{{{28|}}}|,|}} {{#if:{{{26|}}}| ] |}}
|}}
|}}{{
{{#if:{{{28|}}}
#if:{{{28|}}}
| {{#if:{{{29|}}}| [ |}} {{{18}}} {{#if:{{{29|}}}| ] |}}
| {{#if:{{{29|}}}| [ |}} {{{18}}} {{#if:{{{29|}}}| ] |}}
|}}
|}})</div>
 
)
</div>


{{{shortdesc}}}
{{{shortdesc}}}

Revision as of 07:49, 4 June 2016

Use this template at the top of every API reference page:

{{ApiReference | name=spr | shortdesc=Draws a sprite, or sprite range, on the screen. | n || The sprite number. | x || The x coordinate. | y || The y coordinate. | flip_x | optional | If true, flips horizontally. | flip_y | optional | If true, flips vertically. }}

name=... is the name of the function.

shortdesc=... is a short description, where the first sentence is a verb phrase with an implied noun (e.g. "Draws a sprite, or sprite range, on the screen."), followed by an optional second (full) sentence.

The subsequent template parameters describe the function arguments. Each argument has three template parameters: the argument name, "optional" if the argument is optional, and a short description.

As a matter of style, function and argument short descriptions begin with a capital letter and end with a period.

This template supports up to 10 function arguments. Extend the template if more are needed.


{{{name}}} ()

{{{shortdesc}}}