Get an Epic Experience with Premium

AddonManager

Map & Minimap Login to Add Favorites
  • 7 Likes
  • Runes of Magic
  • 3,596 Monthly Downloads
  • Supports: 5.0.9
  • 173,454 Total Downloads
  • Updated 03/20/2014
  • Created 03/06/2009
  • 374 Favorites
  • Project Site
  • Comments
  • Release Type: Release
  • License: Creative Commons License By-Nc-Sa 3.0
  • Newest File: v6.0.7
or

About AddonManager

AddonManager helps you keep track of your addons and provides easy ways to access them.

It has a main window that lists all registered addons and their details, as well as a "Mini-Addon bar", where small addon icons can go.

The more addon developers that use it (and it's really easy to use!), the more addons will show up in the list. Give it time =)

For users

  • Type /addons to see all your registered addons
  • Alternatively, click on the AddonManager button in the "Mini Addons" bar

For addon developers

Registering your Addon

  • Add a call to AddonManager.RegisterAddon / RegisterAddonTable in your VARIABLES_LOADED event
  • Example1. At minimum, you can do this:
    if AddonManager then
        AddonManager.RegisterAddon("MyAddonName", "My addon makes you awesome")
    end
  • Example 2. Using a custom icon, a config frame, and a mini-addon button:
if AddonManager then
    local addon = {
        -- Information
        name = "MyAddonName",
        version = "v0.01",
        author = "Me",
        description = "My addon makes you awesome",
        icon = "Interface/Addons/MyAddon/myAddon32.tga",
        category = "Other",
        slashCommand = "/myaddon",

        -- Config-Frames
        configFrame = MyAddonConfigFrame, 
        disableScript = MyAddon_Disable,
        enableScript = MyAddon_Enable,

         -- Mini Button
         mini_icon = "Interface/Addons/MyAddon/myAddon32.tga",
         mini_icon_pushed = "Interface/Addons/MyAddon/myAddon32.tga",
         mini_onClickScript= MyAddon_Action,
         -- miniButton = MyAddonMiniButton, -- (obsolete but still valid - see below)
    }
    AddonManager.RegisterAddonTable(addon)
end
  • Of course, replace "my addon" with your addon
  • I recommend not printing out that your addon has loaded if you use AddonManager, since the user will be able to see it in the AddonManager list.
  • In the first example, your addon would be considered a "Passive" addon - its text would be colored green (like passive skills) and you can't click on it.

AddonManager.RegisterAddon

AddonManager.RegisterAddonTable = function(addon)  -- Since v1.042

AddonManager.RegisterAddon = function(name, description, icon, category, configFrame, slashCommands, miniButton, onClickScript, version, author, disableScript, enableScript)

Registers an addon with AddonManager. Adds the addon to the addons list and potentially also to the mini-addons-frame.

Parameters:

  • name - Your addon's name. Default is "[No Name]".
  • description - A brief (one or two sentence) description of your addon. Something that fits in a tooltip.
  • icon - Path to a 32x32 image icon (e.g., "Interface/Addons/AddonManager/Textures/addonManagerIcon32.tga"). If no icon is specified, will use default "recipe" icon.
  • category - One of AddonManager.Categories; will be used for filtering the addons list. Default is "Other". One of Development, Economy, Information, Interface, Inventory, Leveling, Map, PvP, Social, or Other.
  • configFrame - If your addon has a config frame or other frame you want to show when your addon is clicked, use this.
  • slashCommands - Specify any slash commands you've registered so that the user doesn't have to remember them.
  • miniButton - If you want to display a button on the "Mini-Addons" bar, specify it here.
  • onClickScript - If you need to special handling when your addon's button is clicked, you can specify a script for it. If this parameter is specified, configFrame is ignored.
  • version - what version this addon's in
  • author - who made this addon
  • disableScript - A script that can be used to disable your addon. Adds the disable option in the AddonManager list if both disableScript and enableScript are specified
  • enableScript - A script that can be used to re-enable your addon

The Mini-Addon Bar

  • the old extra XML Button definition is obsolete!
  • you may still use it if you require special button handling
  • Example:
    <Button name="MyAddonMiniButton" hidden="true" inherits="UIPanelButtonTemplate" parent="AddonManagerMiniFrame">
		<Size>
			<AbsDimension y="24" x="24"/>
		</Size>
		<Scripts>
			<OnClick>
				AddonManager.MiniButton_OnClick(this)
			</OnClick>
			<OnEnter>
				AddonManager.MiniButton_OnEnter(this)
			</OnEnter>
			<OnLeave>
				AddonManager.MiniButton_OnLeave(this)
			</OnLeave>
		</Scripts>
	    <NormalTexture file="Interface\AddOns\MyAddon\myAddonIconNormal.tga"/>
	    <PushedTexture file="Interface\AddOns\MyAddon\myAddonIconDown.tga"/>
	</Button>
  • The only things you should change here are the Button's name and the two textures.
  • Note that you can't have a MiniButton if your addon is passive (because what should happen when the user clicks on it?). A passive addon is one that has no config frame and no custom onClickScript.

List of sample Registrations

v6.0.7
- minimap-buttons hideable

v6.0.5.3
- rewrote minibar initialize
... this should finally fix the latest issues

v6.0.5.2
- fixed settings save
- fixed hiding minibar & border

v6.0.5.1
- fix MiniMap Button

v6.0.5
- better collapsed minibar
- store 'enable' flag based on character & class
   this means you can enable/disable addons based on character and/or class (req. supported by addon)
- fixed a typo in new script assignment format

v5.0.5
- localization
- improved collapsing
- added category 'carfting'
- added: possibility to show 'translators'
- added: dyn. minibar icon

Comments

First Previous Page 5 of 6 Next Last
  • #24
    That's fine. It should be the same Sol version in both. And v1.03 don't have the crashing bug anymore
  • #13
    I see. What a strange error. Working on it!

    Your syntax looks fine to me. Have you tried it without the icon? RoM has wierd issues with icons (esp. sizes - if it's not 32x32, 16x16 or something similar RoM doesn't seem to like it).

    Mini bar should be saving position unless you ReloadUI (and I don't know how to fix it so it does so on ReloadUI). If not, then maybe it has to do with that crash.
  • #16
    Uploaded a fix, but it likely won't be up on here for many hours (Curse is so slow around this time! Other times uploads get approved within minutes). It's a one-line fix:
    Deleted AddonManagerMini.lua, line 14 - miniButton:SetParent(AddonManagerMiniFrame)
  • #10
    really nice project, but one quick question, is there any sense in registering my auctionhouse addon with this? i mean it has no standalone config frame or slash commands, etc, everything is done in the auctionhouse itself which can only be opened if you are next to an auctioneer-npc.
  • #11
    Sure, if only just to remind the users they have AuctionHouse and what it is. It will have green text. And maybe later you'll want to add slash commands, and then the users will already know where to look for them. Or something =)

    I like seeing my passive addons, too, anyway.
  • #15
    okay, next version will have support even though it will only be passively displayed ;)
  • #9
    Still no dl link?
  • #6
    I would suggest that all addon developers immediately add support for this and upload the updated version, because everyone on the planet that uses multiple addons will use this now.

    Don't wait! "well I'm almost done with a new version of my addon which will be finished in a few days, I'll wait until my next release to add support for AddonManager" 't be this guy, do it NOW!
  • #8
    Hehe. Thanks for the support =)
  • #5
    download-link pls
  • #7
    *FROWN at Curse* I uploaded TWO links yesterday, and both got deleted for some reason. Uploading another one.
  • #4
    no link to downloade it ;(
  • #3
    Oh my god! that looks so awsome ... ive to test it right away

    thanks for your hard work
  • #2
    Really Nice. I'll probably add support for Inventory Viewer this weekend.
  • #14
    FYI, I have an InventoryViewer sample up on the wiki: http://theromwiki.com/index.php/AddonManager#Inventory_Viewer
  • To post a comment, please login or register a new account.
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Leaguepedia PAX Skin Giveaway