Enhancement Request: Use Blizzard AddOns Compartment to Access Options
JPEscher opened this issue ยท 2 comments
Enhancement Request: Use Blizzard AddOns Compartment to Access Options
more details here: https://warcraft.wiki.gg/wiki/Addon_compartment
attempted adjustment that gets the first load (not sure what i'm doing wrong to get the further loads)
For: PokemonTrainer NG
FilePath: Interface/AddOns/PokemonTrainer_Loader/Loader.lua
Code Placement: End of File
Code:
--[[
This section added to get the mod to have access to options aside form slash commands.
ToDo:
add option that disables Blizzard AddOns Compartment (BAOC) for those who don't want this mod there
add to norganna slidebar (auctioneer suite) for those who use that
]]--
local AddonName = "Pokemon Trainer NG";
local version = tostring(C_AddOns.GetAddOnMetadata(AddonName, "Version"));
local mouseButtonNote = "\nThe pet battle addon with many helpers!";
AddonCompartmentFrame:RegisterAddon({
text = AddonName,
icon = "Interface/AddOns/PokemonTrainer/Images/Ramping.tga",
notCheckable = true,
func = function(button, menuInputData, menu)
LoadWithOptions = true
LoadPokemonTrainer()
end,
funcOnEnter = function(button)
MenuUtil.ShowTooltip(button, function(tooltip)
tooltip:SetText(AddonName .. ": " .. version .. mouseButtonNote)
end)
end,
funcOnLeave = function(button)
MenuUtil.HideTooltip(button)
end,
})
