Difference between revisions of "Template:Type"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (+use Template:Type/Text;)
 
(10 intermediate revisions by 3 users not shown)
Line 12: Line 12:
 
|long
 
|long
 
|Int16
 
|Int16
 +
|bool
 +
|object
 +
|enum
 +
|void
 +
|constructor
 
|short={{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}
 
|short={{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}
|#default=[[API:{{{1|{{{type|}}}}}}|{{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}]]
+
|List={{Type/MSDN|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}|6sh2ey19}}
}}</includeonly><noinclude>Creates an API link. If won't link to the following values:
+
|#default={{{1|{{{type|}}}}}}|{{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}
 +
<!-- Modified previous line from
 +
|#default=[[API:{{{1|{{{type|}}}}}}|{{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}]] -Glyph -->
 +
}}</includeonly><noinclude>Creates an API link. The following values won't be linked:
 
*int
 
*int
 
*uint
 
*uint
Line 28: Line 36:
 
*Int16
 
*Int16
 
*short
 
*short
 +
*bool
 +
*object
 +
*enum
 +
*void
 +
*constructor
 +
 +
Those values will be linked to the MSDN:
 +
* List
 +
 +
== Parameters ==
 +
{{Parameter table|name=text|parameters=
 +
{{Parameter row|1|name2=type|Type of the, links to an API page with this name}}
 +
{{Parameter row|2|name2=desc|Description which shows as a tooltip.|The target page's name (<tt>API:{{{1}}}</tt>)}}
 +
}}
  
 
== Examples ==
 
== Examples ==
Line 41: Line 63:
 
|}
 
|}
  
[[Category:Templates|Type]]
+
[[Category:Templates]]
[[Category:API Templates|Type]]</noinclude>
+
[[Category:API Templates]]</noinclude>

Latest revision as of 01:54, 14 October 2015

Creates an API link. The following values won't be linked:

  • int
  • uint
  • double
  • float
  • string
  • String
  • byte
  • Byte
  • Int32
  • Int64
  • long
  • Int16
  • short
  • bool
  • object
  • enum
  • void
  • constructor

Those values will be linked to the MSDN:

  • List

Parameters

Name Optional Description Default
1 or type No Type of the, links to an API page with this name
2 or desc Yes Description which shows as a tooltip. The target page's name (API:{{{1}}})

Examples

Code Result
{{Type|Vessel}}
Vessel
{{Type|Vessel|A vessel}}
Vessel
{{Type|type=Vessel|desc=A vessel}}
Vessel