-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
AddonCompartment.lua
25 lines (24 loc) · 945 Bytes
/
AddonCompartment.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
local ADDON_NAME, ADDON = ...
AddonCompartmentFrame:RegisterAddon({
text = C_AddOns.GetAddOnMetadata(ADDON_NAME, "Title"),
icon = C_AddOns.GetAddOnMetadata(ADDON_NAME, "IconTexture"),
registerForAnyClick = true,
notCheckable = true,
func = function(_, inputData)
if inputData.buttonName == "RightButton" then
ADDON:OpenSettings()
elseif not InCombatLockdown() then
ToggleCollectionsJournal(COLLECTIONS_JOURNAL_TAB_INDEX_TOYS)
end
end,
funcOnEnter = function(menuItem)
GameTooltip:SetOwner(menuItem, "ANCHOR_CURSOR")
GameTooltip:SetText("|T" .. C_AddOns.GetAddOnMetadata(ADDON_NAME, "IconTexture") .. ":0|t " .. C_AddOns.GetAddOnMetadata(ADDON_NAME, "Title"))
GameTooltip:AddLine(" ")
GameTooltip:AddLine(ADDON.L.COMPARTMENT_TOOLTIP)
GameTooltip:Show()
end,
funcOnLeave = function()
GameTooltip:Hide()
end,
})