Template:Event: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mattchewy
No edit summary
>JulienDethurens
Categorizing pages with errors.
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div style="float:left; padding:2px; width:600px; height:120px; overflow:auto; margin:2px;">
{{if|1={{{name<includeonly>|</includeonly>}}}|2={{if|1={{{description<includeonly>|</includeonly>}}}|2=<div style="float:left; max-width:600px; width: 50%">
{| cellspacing="0" cellpadding="4" style="-webkit-border-radius: 6px; -moz-border-radius: 6px; background: #ffdddd; margin:0; width: 100%; font-size: 90%; text-align: left; align: center; padding: 4px; border: solid 4px #dbd517;"
{{{!}} cellspacing="0" cellpadding="4" style="margin: 2px; display: block; {{border-radius|6px}}; background: {{color|yellow}}; font-size: 90%; text-align: left; border: 4px solid {{color|yellow|dark}};"
|style="padding: 0;font-size:120%; font-weight:bold;" colspan="2"|[[Image:{{if|{{{protected|}}}|Protected}}Event Icon.png]] [[{{{name}}} (Event)|{{{name}}}]] ( {{{arguments|}}} )
{{!}}style="font-size:120%; font-weight:bold;" colspan="2"{{!}}[[File:{{if|{{{protected|}}}|Protected}}Event Icon.png]] [[{{{name}}} (Event){{!}}{{{name}}}]] ( {{{arguments|}}} )
|-style="background: #FFFFFF;"
{{!}}-style="background: {{color|yellow|light}}"
|style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|Description
!style="border-top: 1px solid {{color|yellow|dark}}; width: 10%; border-right: solid 1px {{color|yellow|dark}}"{{!}}Description
|style="border-top: solid 1px black;"|{{{description}}}
{{!}}style="border-top: 1px solid {{color|yellow|dark}}"{{!}}{{{description}}}
|-style="background: #ffdddd;"
{{!}}-
|style="width: 10%; border-top: solid 1px black; border-right: solid 1px black; font-weight:bold;"|In Object{{if|{{{object2|}}}|s}}:
!style="border-top: 1px solid {{color|yellow|dark}}; width: 10%; border-right: solid 1px {{color|yellow|dark}}"{{!}}Member of{{if|{{{object2|}}}|s}}:
|style="border-top: solid 1px black;"|{{if|{{{object|}}}|[[{{{object|}}}]]}}{{if|{{{objects|}}}|{{{objects|}}}}}
{{!}}style="border-top: 1px solid {{color|yellow|dark}}"{{!}}{{if|{{{object|}}}|[[RBX.lua.{{{object|}}} (Object)|{{{object|}}}]]}}{{if|{{{objects|}}}|{{{objects|}}}}}
|}</div><noinclude>
{{!}}}</div>|3=<p class="error">The description must be specified.</p>[[Category:Pages with template errors]]}}|3=<p class="error">The name must be specified.</p>[[Category:Pages with template errors]]}}<noinclude>{{documentation}}[[Category:Object Documentation Templates]]</noinclude>
 
{{clear floats}}
 
== Example Usage ==
 
<pre>
{{Event
|name        = ChildAdded
|arguments  = [[Instance]] Child
|description = Fired after a child is added.
|object      = Instance
}}
</pre>
 
{{Event
|name        = ChildAdded
|arguments  = [[Instance]] Child
|description = Fired after a child is added.
|object      = Instance
}}
{{Event
|name        = ProtectedEvent
|arguments  = [[Boolean]] ''playingRoblox''
|description = Fired when somethings happens
|object      = nil
|protected  = Yes}}
 
[[Category:Object Documentation Templates]]
</noinclude>

Latest revision as of 07:15, 10 April 2012

[[{{{name}}} (Event)|{{{name}}}]] ( )
Description {{{description}}}
Member of:
[purge] Template documentation

Documentation subpage icon

This is a documentation subpage for Template:Event.
It contains usage information, categories and other content that is not part of the original template page.

This template is used to document events. It should only be used to document events that are part of the ROBLOX API.

Usage

<onlyinclude>{{Event
|name=name
|description=description
[|arguments=arguments]
[|protected=bool]
[|object=object]
[|objects=objects]
}}</onlyinclude>

Note: text between brackets ([ and ]) is optional, text in bold represents a certain value (something you must replace) and the rest represents things that must be present as-is.

Parameters

name
The name of the event.
arguments
The arguments given by the event. See the section on arguments for more info on arguments.
description
A description of the event.
protected
If specified, the icon of the event will indicate that the event is protected.
object
The name of the object this event belongs to, if there is only one. Otherwise, use the objects argument.
objects
Links to the objects this event belongs to, if there are more than one. Otherwise, use the object argument.

Arguments

Arguments should be separated by commas. Their type should always be written before their name and should always be identical to the one written in the object browser. The type should either be in raw text, either be a link to the page of the type or either be displayed with the {{Type}} template. The name should always either be contained in a <var> tag, which is preferrable, either be italicized with wiki markup.

Default values for arguments should be indicated outside of the <var> or outside of the italicization and be indicated the same way as they are in the object browser.

Notes

  • The event should always be at the top of the page.
  • If you need to put things after the event, make sure to use the {{Clear floats}} template between the event and the rest of the page.
  • All events should be categorized under the Events category.