Difference between revisions of "Template:API table"

From ComputerCraft Wiki
Jump to: navigation, search
m (Un-breaking, you forgot colspan= items.)
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
+
<includeonly><table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
 
<tr><th colspan="3" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px; text-align: left">
 
<tr><th colspan="3" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px; text-align: left">
 
[[File:{{{image}}}|24px]]&nbsp;&nbsp;{{{1}}} (API)</th></tr>
 
[[File:{{{image}}}|24px]]&nbsp;&nbsp;{{{1}}} (API)</th></tr>
 
<tr>
 
<tr>
 
<td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Function</td>
 
<td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Function</td>
<td style="width: 250px; background: #E0E0E0; padding: .4em; font-weight:bold;">Return values</td>
+
<td style="width: 150px; background: #E0E0E0; padding: .4em; font-weight:bold;">Return values</td>
 
<td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr>
 
<td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr>
 
{{{2}}}
 
{{{2}}}
</table>
+
</table></includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 10:08, 2 August 2020

[ view | edit | history ] Documentation

Example API table

This code:


{{API table|Term|image=Grid disk.png|2=

{{API table/row|[[term.write]]({{type|string}} text)|{{type|nil}}|Writes ''text'' to the screen.|odd}}

{{API table/row|[[term.clear]]()|{{type|nil}}|Clears the entire screen}}

}}

produces this table:

Grid disk.png  Term (API)
Function Return values Description
term.write(string text) nil Writes text to the screen.
term.clear() nil Clears the entire screen