Verified Commit 03fcaf47 authored by Repooc's avatar Repooc
Browse files

Make it so S&L Currencies updates when ElvUI Currency options change in...

Make it so S&L Currencies updates when ElvUI Currency options change in Datatext Customizations (why reinvent the options when they are there already)
parent 82143127
......@@ -289,3 +289,17 @@ local function OnEnter()
end
DT:RegisterDatatext('S&L Currencies', nil, {'PLAYER_MONEY', 'SEND_MAIL_MONEY_CHANGED', 'SEND_MAIL_COD_CHANGED', 'PLAYER_TRADE_MONEY', 'TRADE_MONEY_CHANGED', 'CHAT_MSG_CURRENCY', 'CURRENCY_DISPLAY_UPDATE'}, OnEvent, nil, OnClick, OnEnter, nil, "S&L ".._G.CURRENCY)
hooksecurefunc(DT, 'ForceUpdate_DataText', function(_, name)
if name and name == 'Currencies' then
for dtSlot, dtName in pairs(DT.AssignedDatatexts) do
if dtName.name == 'S&L Currencies' then
if dtName.colorUpdate then
dtName.colorUpdate(E.media.hexvaluecolor)
end
if dtName.eventFunc then
dtName.eventFunc(dtSlot, 'ELVUI_FORCE_UPDATE')
end
end
end
end
end)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment