Difference between revisions of "Template:Type"
From Kerbal Space Program Wiki
(adding bool and object to non-linked types) |
|||
Line 14: | Line 14: | ||
|bool | |bool | ||
|object | |object | ||
+ | |enum | ||
|short={{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}} | |short={{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}} | ||
|List={{Type/MSDN|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}|6sh2ey19}} | |List={{Type/MSDN|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}|6sh2ey19}} | ||
− | |#default=[[API:{{{1|{{{type|}}}}}}|{{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}]] | + | |#default={{#if: {{#pos:{{{type|}}}|<}}|{{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}|[[API:{{{1|{{{type|}}}}}}|{{Type/Text|{{{1|{{{type|}}}}}}|{{{2|{{{desc|}}}}}}}}]]}} |
}}</includeonly><noinclude>Creates an API link. The following values won't be linked: | }}</includeonly><noinclude>Creates an API link. The following values won't be linked: | ||
*int | *int | ||
Line 33: | Line 34: | ||
*bool | *bool | ||
*object | *object | ||
+ | *enum | ||
Those values will be linked to the MSDN: | Those values will be linked to the MSDN: |
Revision as of 16:48, 13 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
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 |