Hello, I'm tinkering with this code to make a clickable "Great Vault" text that opens the Weekly Vault
However, when I click the text, the OnMouseDown script doesn't happen. What am I doing wrong?
Lua Code:
local f = CreateFrame("Frame", nil, UIParent)
f:SetWidth(1)
f:SetHeight(1)
f:SetPoint("CENTER", 0, 0)
local t = f:CreateFontString(f, "OVERLAY", "GameTooltipText")
t:SetPoint("CENTER", 0, 0)
t:SetText("Great Vault")
f:SetScript("OnMouseDown", function (self, button)
if button=='LeftButton' then
LoadAddOn("Blizzard_WeeklyRewards");
WeeklyRewardsFrame:Show()
end
end)
Also, there's a XIV_Databar frame. I'd like to make that "Great Vault" frame's position relative to the XIV_Databar's position. How do I do it?