Commit 63e0d933 authored by Merathilis's avatar Merathilis
Browse files

Remove the newItem flash. Since Simpy made the ElvUI one so powerful <3

parent 6992980a
......@@ -75,7 +75,6 @@ P["sle"] = {
},
--Bags
["bags"] = {
["lootflash"] = true,
["artifactPower"] = {
["enable"] = false,
["color"] = {r = 230, g = 204, b = 128},
......
......@@ -265,8 +265,6 @@ L["Hide in Pet Battle"] = true
L["Show/Hide this frame during Pet Battles."] = true
--Bags
L["New Item Flash"] = true
L["Use the Shadow & Light New Item Flash instead of the default ElvUI flash"] = true
L["Transparent Slots"] = true
L["Apply transparent template on bag and bank slots."] = true
......
......@@ -256,8 +256,6 @@ L["Hide in Pet Battle"] = "Verstecke in Haustierkämpfen"
L["Show/Hide this frame during Pet Battles."] = "Zeige/Verstecke dieses Frame in Haustierkämpfen."
--Bags
L["New Item Flash"] = "Neues Gegenstand Leuchten"
L["Use the Shadow & Light New Item Flash instead of the default ElvUI flash"] = "Benutze das Shadow & Light Gegenstand Leuchten anstelle vom standard ElvUI."
L["Transparent Slots"] = "Transparente Flächen"
L["Apply transparent template on bag and bank slots."] = "Wendet die Transparente Vorlage für Taschen und Bank Flächen an."
......
......@@ -253,8 +253,6 @@ L["Hide in Pet Battle"] = "Прятать в битвах питомцев"
L["Show/Hide this frame during Pet Battles."] = "Показать/скрыть этот фрейм в битвах питомцев"
--Bags
L["New Item Flash"] = "Мерцание новых предметов"
L["Use the Shadow & Light New Item Flash instead of the default ElvUI flash"] = "Использовать полное мерцание Shadow & Light вместо обычного из ElvUI."
L["Transparent Slots"] = "Прозрачные слоты"
L["Apply transparent template on bag and bank slots."] = "Использовать прозрачный фон для слотов в сумках и банке."
......
......@@ -5,21 +5,13 @@ local B = E:GetModule('Bags')
--GLOBALS: hooksecurefunc
local _G = _G
local REAGENTBANK_CONTAINER = REAGENTBANK_CONTAINER
local C_NewItems = C_NewItems
function SB:UpdateSlot(bagID, slotID)
if (self.Bags[bagID] and self.Bags[bagID].numSlots ~= T.GetContainerNumSlots(bagID)) or not self.Bags[bagID] or not self.Bags[bagID][slotID] then
return;
return;
end
local slot = self.Bags[bagID][slotID];
slot.shadow:Hide();
E:StopFlash(slot.shadow);
if (slot:IsShown() and C_NewItems.IsNewItem(bagID, slotID)) then
SB:StartAnim(slot);
end
if not Pr then Pr = SLE:GetModule("Professions") end
if not Pr.DeconstructionReal then return end
if Pr.DeconstructionReal:IsShown() and not slot.hasItem then
......@@ -32,27 +24,6 @@ function SB:UpdateReagentSlot(slotID)
local bagID = REAGENTBANK_CONTAINER;
local slot = _G["ElvUIReagentBankFrameItem"..slotID];
if not slot then return end;
slot.shadow:Hide();
E:StopFlash(slot.shadow);
if (slot:IsShown() and C_NewItems.IsNewItem(bagID, slotID)) then
SB:StartAnim(slot);
end
end
function SB:StartAnim(slot)
if not slot.flashTex then
SB:HookBags(nil, slot)
end
slot.flashTex:Show();
slot.flashAnim:Play();
slot.glowAnim:Play();
end
function SB:StopAnim(slot)
slot.flashTex:Hide();
slot.flashAnim:Stop();
slot.glowAnim:Stop();
end
function SB:HookSlot(slot, bagID, slotID)
......@@ -60,71 +31,6 @@ function SB:HookSlot(slot, bagID, slotID)
slot.SLErarity = true
B:UpdateReagentSlot(slotID)
end
slot:HookScript('OnEnter', function()
if (SB.db.lootflash) then
C_NewItems.RemoveNewItem(bagID, slotID);
SB:StopAnim(slot);
end
end);
slot:HookScript('OnShow', function()
if (SB.db.lootflash) then
if (C_NewItems.IsNewItem(bagID, slotID)) then
SB:StartAnim(slot);
else
SB:StopAnim(slot);
end
end
end);
slot:HookScript('OnHide', function()
if (SB.db.lootflash) then
C_NewItems.RemoveNewItem(bagID, slotID);
SB:StopAnim(slot);
end
end);
slot.flashTex = slot:CreateTexture('flashTex', 'OVERLAY', 1);
slot.flashTex:SetBlendMode("ADD");
slot.flashTex:SetColorTexture(.7, .7, .7);
slot.flashTex:SetInside();
slot.flashTex:SetAlpha(0);
slot.shadow:SetAlpha(0);
local flashAnimGroup = slot:CreateAnimationGroup("flashAnim");
local flashAnim1 = flashAnimGroup:CreateAnimation("Alpha");
flashAnim1:SetChildKey("flashTex");
flashAnim1:SetFromAlpha(0);
flashAnim1:SetToAlpha(1);
flashAnim1:SetDuration(0.2);
flashAnim1:SetOrder(1);
local flashAnim2 = flashAnimGroup:CreateAnimation("Alpha");
flashAnim2:SetChildKey("flashTex");
flashAnim2:SetFromAlpha(1);
flashAnim2:SetToAlpha(0);
flashAnim2:SetDuration(0.2);
flashAnim2:SetOrder(2);
slot.flashAnim = flashAnimGroup;
local glowAnimGroup = slot:CreateAnimationGroup("NewItemGlow");
glowAnimGroup:SetLooping("REPEAT");
local glowFlash1 = glowAnimGroup:CreateAnimation("Alpha");
glowFlash1:SetChildKey("backdrop");
glowFlash1:SetDuration(0.8);
glowFlash1:SetOrder(1);
glowFlash1:SetFromAlpha(1);
glowFlash1:SetToAlpha(0.4);
local glowFlash2 = glowAnimGroup:CreateAnimation("Alpha");
glowFlash2:SetChildKey("backdrop");
glowFlash2:SetDuration(0.8);
glowFlash2:SetOrder(2);
glowFlash2:SetFromAlpha(0.4);
glowFlash2:SetToAlpha(1);
slot.glowAnim = glowAnimGroup;
end
function SB:HookBags(isBank, force)
......@@ -175,25 +81,6 @@ function SB:Initialize()
SB:ForUpdateAll()
local BUpdateSlot = B.UpdateSlot;
local SBUpdateSlot = SB.UpdateSlot;
for _, bagFrame in T.pairs(B.BagFrames) do
local UpdateSlot = function(self, bagID, slotID)
BUpdateSlot(bagFrame, bagID, slotID);
if (SB.db.lootflash) then
SBUpdateSlot(bagFrame, bagID, slotID);
end
end
bagFrame.UpdateSlot = UpdateSlot;
local BUpdateReagentSlot = B.UpdateReagentSlot;
local SBUpdateReagentSlot = SB.UpdateReagentSlot;
local UpdateReagentSlot = function(self, slotID)
BUpdateReagentSlot(bagFrame, slotID);
if (SB.db.lootflash) then
SBUpdateReagentSlot(bagFrame, slotID);
end
end
bagFrame.UpdateReagentSlot = UpdateReagentSlot;
end
self:HookBags();
hooksecurefunc(B, "Layout", function()
self:HookBags()
......
......@@ -23,14 +23,6 @@ local function configTable()
get = function(info) return E.private.sle.bags.transparentSlots end,
set = function(info, value) E.private.sle.bags.transparentSlots = value; E:StaticPopup_Show('PRIVATE_RL') end,
},
lootflash = {
order = 5,
type = "toggle",
name = L["New Item Flash"],
desc = L["Use the Shadow & Light New Item Flash instead of the default ElvUI flash"],
get = function(info) return E.db.sle.bags.lootflash end,
set = function(info, value) E.db.sle.bags.lootflash = value end,
},
artefact = {
order = 20,
type = "group",
......
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