Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunny67 committed Oct 10, 2016
1 parent f406db7 commit a8341eb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
7 changes: 7 additions & 0 deletions ElvUI_CustomTweaks/Categories/chat/MaxLines.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,12 @@ function UpdateMaxLines()
local frame = _G[frameName]
frame:SetMaxLines(E.db.CustomTweaks.ChatMaxLines.MaxLines)
end

--Re-display chat history since it was all cleared when calling :SetMaxLines
if E.db.chat.chatHistory then
self.SoundPlayed = true;
self:DisplayChatHistory()
self.SoundPlayed = nil;
end
end
hooksecurefunc(CH, "Initialize", UpdateMaxLines)
8 changes: 4 additions & 4 deletions ElvUI_CustomTweaks/Categories/datatexts/BagsTextFormat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ end

local function ValueColorUpdate(hex, r, g, b)
local textFormat = E.db.CustomTweaks.BagsTextFormat.textFormat
if(not textFormat) then return; end

if textFormat == "FREE" or textFormat == "USED" then
displayString = join("", "%s", hex, "%d|r")
else
Expand All @@ -75,7 +73,6 @@ local function ValueColorUpdate(hex, r, g, b)
OnEvent(lastPanel)
end
end
E["valueColorUpdateFuncs"][ValueColorUpdate] = true

function CT:UpdateDatatext()
ValueColorUpdate(E["media"].hexvaluecolor, unpack(E["media"].rgbvaluecolor))
Expand All @@ -87,4 +84,7 @@ end

local f = CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", CT.UpdateDatatext)
f:SetScript("OnEvent", function()
E["valueColorUpdateFuncs"][ValueColorUpdate] = true
CT.UpdateDatatext()
end)
13 changes: 0 additions & 13 deletions ElvUI_CustomTweaks/Categories/unitframes/AuraIconSpacing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,32 +78,19 @@ end
CT.Configs["AuraIconSpacing"] = ConfigTable
if not isEnabled then return; end

local function OnPostUpdateAura(self, unit, button)
local size = button:GetParent().size
if size then
button:SetSize(size, size) --:Size() uses E:Scale() which causes overlapping borders
end
end
hooksecurefunc(UF, "PostUpdateAura", OnPostUpdateAura)

--Set spacing between individual aura icons and update PostUpdateIcon
local function SetAuraSpacingAndUpdate(unitframe, unitName, auraSpacing)
if not unitframe.Buffs and not unitframe.Debuffs then return; end

if unitframe.Buffs then
unitframe.Buffs.spacing = auraSpacing
--Reset PostUpdateIcon so it includes our hook
unitframe.Buffs.PostUpdateIcon = nil
unitframe.Buffs.PostUpdateIcon = UF.PostUpdateAura
--Update internal aura settings
if unitframe.db then
UF:Configure_Auras(unitframe, "Buffs")
end
end
if unitframe.Debuffs then
unitframe.Debuffs.spacing = auraSpacing
unitframe.Debuffs.PostUpdateIcon = nil
unitframe.Debuffs.PostUpdateIcon = UF.PostUpdateAura
if unitframe.db then
UF:Configure_Auras(unitframe, "Debuffs")
end
Expand Down
12 changes: 12 additions & 0 deletions ElvUI_CustomTweaks/Categories/unitframes/PowerBarTexture.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ function BuildTable()
local unitframe = _G["ElvUF_"..frameNameUnit]
if unitframe and unitframe.Power then powerbars[unitframe.Power] = true end
end

for _, header in pairs(UF.headers) do
for i = 1, header:GetNumChildren() do
local group = select(i, header:GetChildren())
--group is Tank/Assist Frames, but for Party/Raid we need to go deeper
for j = 1, group:GetNumChildren() do
--Party/Raid unitbutton
local unitbutton = select(j, group:GetChildren())
if unitbutton.Power then powerbars[unitbutton.Power] = true end
end
end
end
end
BuildTable()

Expand Down

0 comments on commit a8341eb

Please sign in to comment.