Since I am utterly clueless as how to go about creating an addon, I wanted to ask for help here.
I simply want an addon that will number my mounts in the journal. Is there a way to do that?
Thanks for any help offered.
Since I am utterly clueless as how to go about creating an addon, I wanted to ask for help here.
I simply want an addon that will number my mounts in the journal. Is there a way to do that?
Thanks for any help offered.
What would the numbers correspond to? How would the numbers be effected if you were filtering the list?
Just a normal counting routine.
In perfect world, they would still just merely count the shown mounts.
You could paste the following into the website addon.bool.no
to create/download the code as an addon. It should do what you want.
local list
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addonname)
if addonname ~= "Blizzard_Collections" then return end
self:UnregisterAllEvents()
list = MountJournal.ListScrollFrame
for i=1, #list.buttons do
local f = list.buttons[i]
f.MountCount = f:CreateFontString()
f.MountCount:SetFontObject(GameFontNormalSmall)
f.MountCount:SetPoint("TOPRIGHT", -5, -5)
end
hooksecurefunc(list.buttons[1].name, "SetText", function(text)
local offset = HybridScrollFrame_GetOffset(list)
for i=1, #list.buttons do
list.buttons[i].MountCount:SetText(i + offset)
end
end)
end)
Thank you for the help.
It is numbering the mounts, however the numbers switch around once you start scrolling through the list.
Code should be fixed.
It is working great!
Thank you so much for the help!!