Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Type: Difference between revisions

Template page
PenguinEncounter (talk | contribs)
m generic Vector, Matrix
Tag: 2017 source edit
m depluralize example Vector and Matrix plus suggestion
Line 52: Line 52:
* {{type|function}}
* {{type|function}}
* {{type|table}}
* {{type|table}}
* {{type|Vectors}} ({{type|Vector2}}, {{type|Vector3}}, {{type|Vector4}})
* {{type|Vector}} ({{type|Vector2}}, {{type|Vector3}}, {{type|Vector4}})
* {{type|Matrices}} ({{type|Matrix2}}, {{type|Matrix3}}, {{type|Matrix4}})
* {{type|Matrix}} ({{type|Matrix2}}, {{type|Matrix3}}, {{type|Matrix4}})
* {{type|Event}} (custom type that exists)
* {{type|Event}} (custom type that exists)
* {{type|CrashAPI}} (custom type that doesn't exist)
* {{type|CrashAPI}} (custom type that doesn't exist)
Line 70: Line 70:
"string",
"string",
"function",
"function",
"table"
"table",
                "Vector",
                "Matrix"
],
],
"required": true
"required": true

Revision as of 19:30, 28 September 2024

Displays a type widget.

Stylesheet: Template:Type/style.css (edit to add colors and decorations for custom types)

Examples

  • Template:Type/builtin {{type|nil}}
  • Template:Type/builtin
  • Template:Type/builtin (optional number)
  • Template:Type/builtin
  • Template:Type/builtin
  • Template:Type/builtin
  • Template:Type/builtin
  • Template:Type/vector (Template:Type/vector, Template:Type/vector, Template:Type/vector)
  • Template:Type/vector (Template:Type/vector, Template:Type/vector, Template:Type/vector)
  • Template:Type/custom (custom type that exists)
  • Template:Type/custom (custom type that doesn't exist)
  • Template:Type/link (links to the Main Page) {{type|Main Page|link=Main Page}}

Testcases page.

Displays and links to types.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type name1

no description

Suggested values
nil boolean integer number string function table Vector Matrix
Unknownrequired
Type modifiersmod 2

Modifiers to the type, like array / optional

Suggested values
[] ? []?
Contentoptional
Custom link targetlink 3

no description

Page nameoptional
Contents