Difference between revisions of "Template:Asfunction"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Copied from Template:Dafunction but with formatting changes for the ActionScript format... hopefully it works right...)
 
m (Remarks)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{{brief}}}
+
<includeonly>{{{brief}}}
  
 
<div class="dascript" style="font-family:monospace; background-color:#F9F9F9; border: 1px dashed #2F6FAB; line-height: 1.1em; padding: 1em;">
 
<div class="dascript" style="font-family:monospace; background-color:#F9F9F9; border: 1px dashed #2F6FAB; line-height: 1.1em; padding: 1em;">
Line 20: Line 20:
 
<dd>
 
<dd>
 
<dl>
 
<dl>
{{#if:{{{param1name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param1name}}}<dd>{{{param1desc|}}}|}}<!--
+
{{#if:{{{param1name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param1name}}}<dd>{{{param1desc|}}}|<b><i>None</i></b>}}<!--
 
-->{{#if:{{{param2name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param2name}}}<dd>{{{param2desc|}}}|}}<!--
 
-->{{#if:{{{param2name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param2name}}}<dd>{{{param2desc|}}}|}}<!--
 
-->{{#if:{{{param3name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param3name}}}<dd>{{{param3desc|}}}|}}<!--
 
-->{{#if:{{{param3name|}}}|<dt style="font-weight:normal; font-style:italic;">{{{param3name}}}<dd>{{{param3desc|}}}|}}<!--
Line 32: Line 32:
 
</dl>
 
</dl>
 
<dt>Returns:
 
<dt>Returns:
<dd>{{{returndesc}}}}}
+
<dd>{{#if:{{{returndesc|}}}|{{{returndesc}}}|<b><i>Nothing</i></b>}}
 
</dl>
 
</dl>
<noinclude>
+
</includeonly><noinclude>
 
+
The '''asfunction''' template is for documenting ActionScript functions used in the GUI.
----
+
== Usage ==
 
+
Usage:
+
  
 
<pre>
 
<pre>
Line 53: Line 51:
 
</pre>
 
</pre>
  
This template is for ActionScript functions used in the GUI, similar to JavaScript.  
+
== Remarks ==
 +
 
 +
ActionScript functions are similar to JavaScript ones.  
 +
 
 
A standard asfunction page will have a number of other headers below this template where more detailed and free-form information will be added by editors.
 
A standard asfunction page will have a number of other headers below this template where more detailed and free-form information will be added by editors.
  
 
Suggested standard headers include:
 
Suggested standard headers include:
__NOTOC__
+
<pre>__NOTOC__
 
== Description ==
 
== Description ==
 
== Known issues ==
 
== Known issues ==
 
== Examples ==
 
== Examples ==
== See also ==
+
== See also ==</pre>
  
 
With others added when and where needed.
 
With others added when and where needed.

Latest revision as of 23:57, 6 June 2011

The asfunction template is for documenting ActionScript functions used in the GUI.

Usage

{{asfunction
|name = GetValue
|brief = Returns the value with the specified attribute name from the engine
|param1name = a_sAttributeName
|param1desc = The hierarchical attribute name, the meaning of which is defined by the game engine.
.
.
.
|returndesc = The specified value from the game engine, dependent on the specified attribute name.
}}

Remarks

ActionScript functions are similar to JavaScript ones.

A standard asfunction page will have a number of other headers below this template where more detailed and free-form information will be added by editors.

Suggested standard headers include:

__NOTOC__
== Description ==
== Known issues ==
== Examples ==
== See also ==

With others added when and where needed.