Lore archive · Warcraft Wiki, 2023 dump
Addon compartment
Last wiki revision 2023-06-08
Introduced in World of Warcraft: Dragonflight, the addon compartment is a dropdown menu accessible from the minimap that provides a list of clickable buttons registered by installed addons. This is intended to provide an alternative to minimap buttons, suitable for simple use cases such as toggling a UI panel related to an addon.
Addons can register entries into the addon compartment dropdown through the following methods.
Addons can define the following metadata fields within their TOC file to control the automatic registration of their addon into the compartment. If the addon is load-on-demand, it will be loaded automatically if any of the functions specified in metadata fields need to be called.
The example below demonstrates the use of these TOC fields.
<font color="#4ec9b0">MyAddOn.toc <font color="#ecbc2a">## AddonCompartmentFunc: MyAddOn_OnAddonCompartmentClick <font color="#ecbc2a">## AddonCompartmentFuncOnEnter: MyAddOn_OnAddonCompartmentEnter <font color="#ecbc2a">## AddonCompartmentFuncOnLeave: MyAddOn_OnAddonCompartmentLeave MyAddOn.lua
- 1) Interface:
- 2) Title: My Addon
- 3) Notes: Does something neat
- 4) Author: Your Name
- 1) IconTexture: Interface\Icons\TEMP.blp
<font color="#4ec9b0">MyAddOn.lua
Manual registration into the addon compartment can be performed by calling the AddonCompartmentFrame:RegisterAddon function, supplying it a table compatible for use with UIDropDownMenu button initialization.
<font color="#4ec9b0">MyAddOn.lua
Categories
- Interface customization
Source
https://warcraft.wiki.gg/wiki/Addon_compartment · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.