BelegCufea / CompassHUD

A configurable compass strip showing player's heading along with questmarkers including distance and time to arive.
https://www.curseforge.com/wow/addons/compasshud
GNU General Public License v3.0
5 stars 0 forks source link

Suggestion: Support Addon Compartment #9

Closed raptormama closed 2 months ago

raptormama commented 2 months ago

The Addon Compartment is a great way to provide quick access to an addon's settings without requiring a minimap button.

I was able to add support for it to CompassHUD by adding the following to the bottom of CompassHUD.lua (the heading branch test version, but it should work in any version).

And the end result is seen below, along with a bunch of other installed addons that support it. Clicking the addon name will, in this case, open the settings page you've already created.

compasshud-in-compartment


local mouseButtonNote = "\n\nA compass tape for your UI.";
AddonCompartmentFrame:RegisterAddon({
    text = aboutText,
    icon = "Interface/AddOns/CompassHUD/textures/icon",
    notCheckable = true,
    func = function(button, menuInputData, menu)
        Settings.OpenToCategory("CompassHUD")
    end,
    funcOnEnter = function(button)
        MenuUtil.ShowTooltip(button, function(tooltip)
            tooltip:SetText(aboutText .. mouseButtonNote)
        end)
    end,
    funcOnLeave = function(button)
        MenuUtil.HideTooltip(button)
    end,
})
BelegCufea commented 2 months ago

Yup, it's about time I think. While testing I am still using my Pretty Reputation addon compartment entry to quickly get into options :-) I'm sooo lazy.

Minimap? Data broker?

raptormama commented 2 months ago

The mini map is the small map in the upper right corner of the screen; I don't know what it's called in other languages. (I think that's what you're asking?) And here's LibDataBroker.

I am now curious about Pretty Reputation and have installed it!

BelegCufea commented 2 months ago

OK, will do all three :-) On it right now.