Skip to content

Commit

Permalink
Add AddonCompartment integration
Browse files Browse the repository at this point in the history
This fixes #8
  • Loading branch information
GurliGebis committed Sep 10, 2024
1 parent 2853dcb commit f4339d8
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -760,4 +760,22 @@ function PT:OpenOptions()

PT.OpenOptions = nil; -- this function is needed once and gets deleted
return options;
end
end

local addonCompartmentTooltip = "Pokemon Trainer NG\n|cffffff00Click|r to open the options dialog."
AddonCompartmentFrame:RegisterAddon({
text = "Pokemon Trainer NG",
icon = "Interface/Icons/petjournalportrait.blp",
notCheckable = true,
func = function(button, menuInputData, menu)
Settings.OpenToCategory(AddonName)
end,
funcOnEnter = function(button)
MenuUtil.ShowTooltip(button, function(tooltip)
tooltip:SetText(addonCompartmentTooltip)
end)
end,
funcOnLeave = function(button)
MenuUtil.HideTooltip(button)
end,
})

0 comments on commit f4339d8

Please sign in to comment.