Template:UI/doc
Template:Documentation subpage Template:Lua
{{UI}} is a template used to create a generic UI.
{{UIPage}} is a template used to transclude another UI page to your page with custom settings. Template:Tc
UI Syntax
{{[[Template:UI |UI ]]|<title >|<... >|<arrow=arrow >|<close=close >|<id=id >|<return_id/goback_id=return_id >|<return_text/goback_text/goback=return_text >|<return_link/goback_link=return_link >|<hide=hide >|<fill=fill >|<defaultnolink/dnl=defaultnolink >}}
Parameters
- Template:S - The UI title. This can be any form of text.
- Template:S - The UI Slots. This can be a unnamed argument list, where each parameter can be a slot item, or custom html, or a comma-separated list of options.
- You can use Template:Code to force a new UI row. This will make all remaining slots in the row blanks. If the amount of slots on the row exceeds 9, it will automatically go to a new line.
- The first comma-separated item is the slot item, the second is the slot's optional Go-To id, the third is the custom slot title, the fourth is the custom slot text.
- You can leave a list argument to be empty, it will not be interpreted.
- The syntax for a list entry would be Template:Code.
- An example list entry where you wanted to a link to another UI called Template:Code, where the display item would be an Enchanted Diamond, and it would have custom Text.
Enchanted Diamond; 32, diamond, &aCustom Title, &cCustom Text
- Produces:Template:Slot
Enchanted Emerald; 32, custom-id; none, &aCustom Title, &cCustom Text
- Produces:Template:Slot
- To manually set by coordinates, you can supply a parameter like Template:Code at the beginning. The format for such an argument is Template:Code.
- Source code example: Template:Code
- You can also supply a parameter like Template:Code or Template:Code to set an entire UI row to the value provided. This argument will represent Template:G slots, and is an iteration. The max number for an argument like this is Template:G.
- You can do the same thing for columns by using parameters like Template:Code or Template:Code. The maximum number to start/end is Template:G.
- You can insert Template:Code into the argument to repersent the current iteration number.
- This subsitution can be escaped with Template:Code.
- An option for this argument delimited by a semicolon at the end of the input is the starting/ending number for the iteration. The format for such an argument is Template:Code, which would start the iteration at Template:G and end at Template:G, and set row 1 to the values provided. Template:G defaults to the end of row and can be omitted.
- Source code example: Template:Code
- If instead written in the format of Template:Code, the corresponding columns denoted by each Template:G of row 1 will be set to the values provided.
- Source code example: Template:Code
- Template:S - Repositions the automatic "Go Back" Arrow in the UI, with the format of Template:Code. Setting this to "none" disables the automatic "Go Back" Arrow in the UI. Template:S can also be used to disable it.
- Template:S - Repositions the automatic "Close" Barrier in the UI, with the format of Template:Code. Setting this to "none" disables the automatic "Close" Barrier in the UI. Template:S can also be used to disable it.
- Template:S - The ID of the UI (without the Template:Code prefix). This is needed for when UI Tabbers are used.
- Template:S - The ID of the UI to return to (without the Template:Code prefix) when the "Go Back" Arrow is clicked. This is needed for when UI Tabbers are used and if this UI is a child UI.
- Template:S - The text of the "Go Back" Arrow in the UI.
- Template:S - The link of the "Go Back" Arrow in the UI.
- Template:S - Hides the UI. This is needed for when UI Tabbers are used and if this UI is a child UI. Default off.
- Template:S - The fill mode. Defualts true. Setting to Template:Code will default all slots to "Blank". Setting to Template:Code will default all slots to an "Empty" slot. Setting to Template:Code will default border slots to be "Blank" and all other slots "Empty".
- Template:S - The maximum number of rows for the UI. This may be any number, but it UI's are traditionally 6 rows tall. Defaults to 6.
- Template:S - The maximum number of columns for the UI. This may be any number, but it UI's are traditionally 9 columns tall. Defaults to 9.
- Template:S - Whether Template:Codes unspecified should be set to none automatically, instead of linking to the page name of slot item. Default off.
UIPage Syntax
{{[[Template:UIPage |UIPage ]]|<page name >|<custom option 1=value >|<custom option 2=value >|<... >}}
Only the first UI will be substituted with the custom options. Templates that do not start with Template:Code will NOT be transcluded.
Parameters
- Template:S - The page name that contains the UI(s) you want to transclude. This can be any page that exists on the (main) namespace.
- Template:S - Any optional parameters that can be used with {{UI}}. This will replace/add to the options of the first transcluded UI.
Examples
Note: All examples have Template:Code set to Template:Code.
Skills UI
Template:Collapsible Section Button Template:Collapsible Section
Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found.
Storage
Template:Collapsible Section Button Template:Collapsible Section
Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found.
Heart of the Mountain
Template:Collapsible Section Button Template:Collapsible Section
Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found. Lua error in package.lua at line 80: module 'mw.ext.LuaCache' not found.
See Also