## Add-ons

The add-on system allows the aggregation of new functions to the application, in an organized way.

## Code structure

To create an add-on, you must implement the methods `load(ctrl)` and `unload`.

The `load(ctrl)` is responsible to load the add-on (i.e: add a button to the interface, etc), and receives the application controller (`core.MainController`).

The `unload` is called only one time, when the main application is closing, and it's intended to release resources (that needs special care, like files) used by the add-on.

You also need to create an info table with the following members:

- name
- description
- authors
- version

The file `addons/Sample.lua` implements a very simple add-on, and can be used as base for new add-ons.

## Activating the add-on

You can select which add-ons (and their order) that will be loaded when the application starts by editing the list in `addons/List.lua`.