Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

Difference between revisions of "Template:Infobox class"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (added support for custom parent classes, within class and implemented interfaces)
 
(64 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{{classpage|{{classpage|c={{{class|{{classname}}}}}}}}}}}}
+
{{Infobox class/core
{{DEFAULTSORT:{{PAGENAME}} {{{game|{{gamename}}}}} {{{engine|{{ARTICLESPACE}}}}}}}
+
| c = {{{class|{{classname}}}}}
{| class="infobox infobox-class"
+
| e = {{{engine|{{ARTICLESPACE}}}}}
! Class:
+
| g = {{{game|{{gamename}}}}}
| {{{package}}}.{{{class|{{classname}}}}} {{#if:{{{custom|}}}|(custom)}}
+
| ge = {{#if:{{{game|{{gamename}}}}}|{{{game|{{gamename}}}}}|{{{engine|{{ARTICLESPACE}}}}}}}
|{{#if: {{{within|}}}
+
| p = {{{package|}}}
|-
+
| w = {{{within|}}}
! Within:
+
| a = {{{abstract|}}}
{{!}} [[{{classpage|c={{{within}}}}}|{{{within}}}]] <includeonly>{{#if: {{{game|{{gamename}}}}}
+
| n = {{{nativeonly|}}}
  | [[Category:Classes within {{{within}}} ({{{game|{{gamename}}}}})]]
+
| p1 = {{{parent1|{{{parent|}}}}}}
  | {{#if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
+
| p2 = {{{parent2|}}}
    | [[Category:Classes within {{{within}}} ({{{engine|{{ARTICLESPACE}}}}})}]]
+
| p3 = {{{parent3|}}}
    | [[Category:Classes within {{{within}}}]]
+
| p4 = {{{parent4|}}}
    }}
+
| p5 = {{{parent5|}}}
  }}</includeonly>
+
| p6 = {{{parent6|}}}
{{!}}}}{{#if: {{{interfaces|}}}
+
| p7 = {{{parent7|}}}
|-
+
| p8 = {{{parent8|}}}
! [[Interface]]s
+
| p9 = {{{parent9|}}}
{{!}} {{{interfaces}}}
+
| p10= {{{parent10|}}}
{{!}}}}{{#if: {{{game|{{gamename}}}}}
+
| i1 = {{{interface1|{{{interface|}}}}}}
|-
+
| i2 = {{{interface2|}}}
! Game:
+
| i3 = {{{interface3|}}}
{{!}} [[{{{game|{{gamename}}}}}]] <includeonly>[[Category:{{#if:{{{custom|}}}|Custom }}{{{game|{{gamename}}}}}-specific classes]]</includeonly>
+
| i4 = {{{interface4|}}}
{{!}}|{{#if: {{#pos: UE1UE2UE3 | {{{engine|{{ARTICLESPACE}}}}}}}
+
| i5 = {{{interface5|}}}
|-
+
| i6 = {{{interface6|}}}
! Engine:
+
| i7 = {{{interface7|}}}
{{!}} [[{{{engine|{{ARTICLESPACE}}}}}]] <includeonly>[[Category:{{#if:{{{custom|}}}|Custom }}{{{engine|{{ARTICLESPACE}}}}}-specific classes]]</includeonly>
+
| custom = {{{custom|}}}
{{!}}|- style="display:none"
+
| cw = {{{customwithin|}}}
{{!}}<includeonly>{{#if:{{{custom|}}}|[[Category:Custom classes]]|[[Category:Classes]]}}</includeonly>
+
| cp1 = {{{customparent1|{{{customparent|}}}}}}
{{!}}}}}}{{#if: {{{tree|}}}
+
| cp2 = {{{customparent2|}}}
|-
+
| cp3 = {{{customparent3|}}}
! colspan="2" {{!}} Class tree:
+
| cp4 = {{{customparent4|}}}
{{!}}-
+
| cp5 = {{{customparent5|}}}
{{!}} colspan="2" {{!}}
+
| cp6 = {{{customparent6|}}}
{{{tree}}}
+
| cp7 = {{{customparent7|}}}
{{!}}}}}<noinclude>
+
| cp8 = {{{customparent8|}}}
 +
| cp9 = {{{customparent9|}}}
 +
| cp10= {{{customparent10|}}}
 +
| ci1 = {{{custominterface1|{{{custominterface|}}}}}}
 +
| ci2 = {{{custominterface2|}}}
 +
| ci3 = {{{custominterface3|}}}
 +
| ci4 = {{{custominterface4|}}}
 +
| ci5 = {{{custominterface5|}}}
 +
| ci6 = {{{custominterface6|}}}
 +
| ci7 = {{{custominterface7|}}}
 +
| notoc = {{{notoc|}}}
 +
| nocat = {{#ifeq:{{ARTICLESPACE}}|Template|1|{{{nocat|}}}}}
 +
| inline = {{#ifeq:{{ARTICLESPACE}}|Template|1|{{{class|}}}}}
 +
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 06:31, 17 March 2010

Template:Template Infobox_class

Contents

[edit] Documentation

This template provides an info box for a class. The info box can contain relevant information like parent classes, implemented interfaces or the within class.

Usage

Example:

{{Infobox class
| class   = UTCheatManager
| package = UTGame
| within  = PlayerController
| game    = UT3
| engine  = UE3
| parent1 = CheatManager
| parent2 = Object
}}
UT3 Object >> CheatManager >> UTCheatManager
Package: 
UTGame
Within class: 
PlayerController
This class in other games:
UT3, UDK

If class, game or engine are missing, they are derived from the current page name. (You can see this effect in the default output on the template page.) Engine and game are only used for linking pages and categories.

The classes and interfaces in the within, parentx and interfacex parameters are automatically linked. The list of parent classes should always be given as complete as possible. For Actor-derived classes the list should start with the Actor class, otherwise it should start with the Object class. Up to ten parent classes can be specified, but if the list gets too long, consider cutting it off at a "well-known" class, like in the following example:

{{infobox class
| class      = UIComp_DrawImage
| package    = Engine
| within     = UIObject
| interface1 = UIStyleResolver
| interface2 = CustomPropertyItemHandler
| game       = UT3
| engine     = UE3
| parent1    = UIComp_DrawComponents
| parent2    = UIComponent
| parent3    = Component
}}
UT3 Component >> UIComponent >> UIComp_DrawComponents >> UIComp_DrawImage
Package: 
Engine
Within class: 
UIObject
Implemented interfaces
UIStyleResolver, CustomPropertyItemHandler
Direct subclasses:
UIComp_DrawTeamColoredImage, UIComp_UTDrawStateImage
This class in other games:
UT3, UDK

Classes implementing one or more interfaces will automatically be added to relevant categories, which are also linked from the corresponding interface page if it contains an interface infobox.

You can also specify custom parent classes via customparentx instead of parentx, which will create the link based on the current page name and namespace instead of the engine and game name:

{{infobox class
| class = CustomClass
| customparent1 = CustomParent
| parent2 = Actor
| parent3 = Object
| engine =
| custom = yes
}}
Object >> Actor >> CustomParent >> CustomClass (custom)

Note how CustomParent links to the Template: namespace in this example, even though "engine=" makes the regular parent classes link to the main namespace. If the class description resides in a subpage, custom parents link to subpages of the same base page. (You can see this behavior by viewing this page, Template:Infobox class/doc, directly.)

See also