Not sure if
RequiredDeps is the right tag to use when the target is a LoD addon. You should use
LoadWith instead.
Code:
## LoadOnDemand: 1
## LoadWith: Blizzard_Collections
Also, the specific way
CollectionsJournal_UpdateSelectedTab() is written, you don't need to replace it. You can secure hook it and add your own code to show your own tab.
Here's an example:
Lua Code:
local TabName="MyNewTab";
local TabID=CollectionsJournal.numTabs+1;
local Tab=CreateFrame("Button","$parentTab"..TabID,CollectionsJournal,"CollectionsJournalTab",TabID);
PanelTemplates_SetNumTabs(CollectionsJournal,TabID);
Tab:SetPoint("LEFT","$parentTab"..(TabID-1),"RIGHT",-16,0);
Tab:SetText(TabName);
local Panel=CreateFrame("Frame",nil,CollectionsJournal);
Panel:SetAllPoints(CollectionsJournal);
hooksecurefunc("CollectionsJournal_UpdateSelectedTab",function(self)
local selected=PanelTemplates_GetSelectedTab(self);
if selected==TabID then CollectionsJournalTitleText:SetText(TabName); end
Panel:SetShown(selected==TabID);
end);
Panel is the frame you'll want to build your UI on and it also plays nice with any other addon that wants to create their own tab on the
CollectionsJournal.