Module:Pet/UI/doc

This module is used to create the UI which is found at Pets/UI.

Loading the module
To load this module and make its method available for use, Add this line of code to the start of your module:

The methods documented below will be available for use under the variable name you loaded this module in.

Alternatively, you can use this module using the code below by using Module:LoadLib.

Depending on the settings you used in, the methods of this module may be available under their respective variables in the module this module was loaded in.

Methods
The methods documented below will be available for use under the variable name you loaded this module in.

This method returns the entire UI (all three pages) that can be found at Pets/UI. The two arguments that are respected from are wrapper and hide. wrapper defaults to true if excluded, and specifies whether the UIs should be wrapped with a sbw-ui-tabber div. hide defaults to false if excluded, and specifies whether or not the first UI page should be shown.

This method returns a pet slot as seen in Pets/UI. The argument petName must be the name of a pet defined in Module:Pet/Data or Module:Pet/Aliases. The argument rarity must be a valid rarity for that pet in lowercase. The argument maxLevel must be a valid level for that pet.

This method returns singular UI page. The argument page must be the page number. The argument maxPage must be the total number of pages in the UI. The argument pets must be an array of tables in slot format, with a limit of 28 values. The argument petScore must be a number which represents the pet score that will be displayed in the UI. The argument hide must be nil, or a boolean. If it is nil, the UI will automatically be hidden unless the page number is 1, otherwise the UI will be hidden according to the argument.