Enhancement Request: Plug Into Blizzard UI Add-Ons Button
JPEscher opened this issue · 9 comments
notice this in discussion with another add on i use. hope it is helpful
https://warcraft.wiki.gg/wiki/Addon_compartment
looks like a toc change. going unfortunately i haven't really worked with LUA. (i have PowerShell, Perl, Python, Bash, Java, C, and LISP, experience.) maybe if i look and things i can propose changes that help?
attempt with manual registration style from https://warcraft.wiki.gg/wiki/Addon_compartment
i think this would be added anywhere in addon/addon.lua
AddonCompartmentFrame:RegisterAddon({
text = "Prat: Chat Enhancements",
icon = "Interface/AddOns/Prat-3.0/textures/prat-logo-dark-small.tga",
notCheckable = true,
func = function(button, menuInputData, menu)
-- local buttonName = menuInputData.buttonName; -- for debugging
-- print("Hello from the addon compartment! You clicked " .. buttonName .. "!"); -- for debugging
Prat.ToggleOptionsWindow()
end,
funcOnEnter = function(button)
MenuUtil.ShowTooltip(button, function(tooltip)
tooltip:SetText(Prat.Version)
end)
end,
funcOnLeave = function(button)
MenuUtil.HideTooltip(button)
end,
})
a quick test with that att the end of addonlua shows some success.
@plusmouse you look to be the one behind commits. would you kindly review this? if you'd like i'll make a local clone and branch from here; and then upload a pull request for you to review/edit & approve/commit
i got funny tonight. i have a branch locally if you'd like i can push here for you to review.
used code
local aboutText = "Prat: Publications Refinement And Transmission";
AddonCompartmentFrame:RegisterAddon({
text = aboutText,
icon = "Interface/AddOns/Prat-3.0/textures/prat-logo-dark-small.tga",
notCheckable = true,
func = function(button, menuInputData, menu)
Prat.ToggleOptionsWindow()
end,
funcOnEnter = function(button)
MenuUtil.ShowTooltip(button, function(tooltip)
tooltip:SetText(aboutText .. "\n" .. Prat.Version)
end)
end,
funcOnLeave = function(button)
MenuUtil.HideTooltip(button)
end,
})
shows as
not sure where "@Project-Version@" is stored to add one to for my branch
@plusmouse you look to be the one behind commits. would you kindly review this? if you'd like i'll make a local clone and branch from here; and then upload a pull request for you to review/edit & approve/commit
noticed the contributing.md created this as a result. i do not have classic nor cata-classic installed. would you like me to get those and then add and test those?
#199