Get an Epic Experience with Premium

AddonManager

Map & Minimap Login to Add Favorites
  • 5 Likes
  • Runes of Magic
  • 1,723 Monthly Downloads
  • Supports: 5.0.1
  • 142,774 Total Downloads
  • Updated 11/27/2012
  • Created 03/06/2009
  • 363 Favorites
  • Project Site
  • Comments
  • Release Type: Release
  • License: Creative Commons License By-Nc-Sa 3.0
  • Newest File: v5.0.5
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 = {
        name = "MyAddonName",
        version = "v0.01",
        author = "Me",
        description = "My addon makes you awesome",
        icon = "Interface/Addons/MyAddon/myAddon32.tga",
        category = "Other",
        configFrame = MyAddonConfigFrame, 
        slashCommand = "/myaddon",
        miniButton = MyAddonMiniButton,
        disableScript = MyAddon_Disable,
        enableScript = MyAddon_Enable,
    }
    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

  • To use a mini-button, you need to first have one created in your xml
  • 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

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

Comments

First Previous Page 2 of 5 Next Last
  • #53
    Got a question for you. RoMRollbarHook uses left, shift-left, ctrl-left clicks on the minimapbutton as well as slash commands to show/hide lock/unlock and reset a movable hook for the party need/greed panel. It doesn't use a config frame since there is really no need for one. Will it show up as an active addon in your list/window and can all 3 click commands be available via the addonmanager window? If so, I will modify it to work with addonmanager.
  • #54
    nevermind, i played around a bit. will have addon manager support in the next release.
  • #56
    Glad you got it working and sorry I couldn't be of help when you needed it =b
  • #51
    Your Addon uses the sol lib addon, please remove it from your zip and add it to your project's dependencies so that the curse client will auto download sol, then only one version of sol will be on our computers.
  • #52
    Sol's actually included in the .pkgmeta; the Curse client automatically installs the latest version when the packager runs.

    LibStub ensures that only the latest version of Sol is actually loaded.
  • #48
    It didn't work for me. Got an error message at the onset and a huge black unmovable and unworkable square in the middle of the screen.
  • #49
    What's the error message?
  • #46
    Excuse my ignorance.. but what exactly does this do? I get the screenshots. It shows things I've already installed. Beyond telling a user what they SHOULD already know, what does it do? Allow configuration of addons from that window, or is it merely a list?
  • #47
    Depends on the Addon dev. If the addon dev fully supports the Addonmanager, then you can config the addon from the addonmanager, else it's merely a list. The most addons I use are either passive (no need to config) or can be setup within the addonmanager or it's mini bar. It saves space and you don't have to remember every single slash command. =)
  • #50
    Well said =)
  • #44
    Addoon manager minibar now falls behind some of my UI elements like Xbar
  • #45
    Mk. Next version will have an option to choose frame strata.
  • #42
    Alleris, I only wanted to let you know that using VARIABLES_LOADED event won't allow to register addons loaded before addonmanager.

    For some reason I cannot open tickets on your project.
    If you want to reproduce what I mean, simply rename your addonmanager folder to zAddonManager. No addons will register. You should try to find the magic symbol what will load your addon above all. (Underscore doesn't work)
  • #43
    Thanks for pointing that out! v1.13 fixes it.
  • #40
    man what a great idea! thnaks and now wouldnt it be icing on the cake to view outdated addons, and with aclick of a button DL the newest version to replace the old, then have it possiblly do a /script ReloadUI(); or something to that effect to get the updated version working asap? Possibilitys when youre having fun with technology!

    lol, great work man keep it up and to all authors you guys really rock and hopefully we will see a lot of your hard work finally be a feature in RoM and not just a addon!
  • 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 »

Infinite Crisis NA

Get Your Preferred Access Code!