Template Wiki Style Guide - LiruJ/GuiCookie GitHub Wiki
The purpose of a template wiki page is to describe how someone would use a template within a layout sheet of a UI, as well as explain the attributes and children of the template.
The layout of a template wiki page is as follows, in this order:
- Overview
- Definition
- Usage
- Attributes
The overview section should explain what the template is and what it is used for. The user should be able to only read the overview for a given template and know if it suits their needs.
The definition should show the XML of the template's definition within GuiCookie's Templates.xml file. If the template has many variations then they should all be listed under the same XML code block.
A brief listing of the components, children, and controllers involved should be under the code block, with links to any relevant pages.
The usage should show an example of the template as it would be used in a layout sheet. This section should show the user how they could include it in their layout with minimal effort so that they may test its behaviour. Any important behaviours or interactions can also be shown here, such as a Panel's usage of its children.
If multiple template variations are being discussed on the one page, each variation should get its own h3 section.
This section should list every value that is read from the element's attributes, with the type of the attribute being immediately under each header in italics, linking to the relevant page if it is a GuiCookie type.
As well as this, a code example of the xml should be given with an example value, like so:
string
<ExampleElement ExampleAttribute="ExampleValue"/>Like attributes may be grouped together if they are used in roughly the same way, an example of this can be seen in the minimum and maximum values for ProgressBars.