mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update
This commit is contained in:
+22
-22
@@ -341,20 +341,24 @@ function E:UpdateFrameTemplates()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function E:UpdateBorderColors()
|
function E:UpdateBorderColors()
|
||||||
for frame in pairs(self["frames"]) do
|
for frame, _ in pairs(self["frames"]) do
|
||||||
if(frame) then
|
if frame and not frame.ignoreUpdates then
|
||||||
if(frame.template == "Default" or frame.template == "Transparent" or frame.template == nil) then
|
if not frame.ignoreBorderColors then
|
||||||
frame:SetBackdropBorderColor(unpack(self["media"].bordercolor))
|
if frame.template == "Default" or frame.template == "Transparent" or frame.template == nil then
|
||||||
|
frame:SetBackdropBorderColor(unpack(self["media"].bordercolor))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self["frames"][frame] = nil
|
self["frames"][frame] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for frame in pairs(self["unitFrameElements"]) do
|
for frame, _ in pairs(self["unitFrameElements"]) do
|
||||||
if frame and not frame.ignoreUpdates then
|
if frame and not frame.ignoreUpdates then
|
||||||
if frame.template == "Default" or frame.template == "Transparent" or frame.template == nil then
|
if not frame.ignoreBorderColors then
|
||||||
frame:SetBackdropBorderColor(unpack(self["media"].unitframeBorderColor))
|
if frame.template == "Default" or frame.template == "Transparent" or frame.template == nil then
|
||||||
|
frame:SetBackdropBorderColor(unpack(self["media"].unitframeBorderColor))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self["unitFrameElements"][frame] = nil
|
self["unitFrameElements"][frame] = nil
|
||||||
@@ -364,15 +368,13 @@ end
|
|||||||
|
|
||||||
function E:UpdateBackdropColors()
|
function E:UpdateBackdropColors()
|
||||||
for frame, _ in pairs(self["frames"]) do
|
for frame, _ in pairs(self["frames"]) do
|
||||||
if(frame) then
|
if frame then
|
||||||
if(frame.template == "Default" or frame.template == nil) then
|
if not frame.ignoreBackdropColors then
|
||||||
if(frame.backdropTexture) then
|
if frame.template == "Default" or frame.template == nil then
|
||||||
frame.backdropTexture:SetVertexColor(unpack(self["media"].backdropcolor))
|
|
||||||
else
|
|
||||||
frame:SetBackdropColor(unpack(self["media"].backdropcolor))
|
frame:SetBackdropColor(unpack(self["media"].backdropcolor))
|
||||||
|
elseif frame.template == "Transparent" then
|
||||||
|
frame:SetBackdropColor(unpack(self["media"].backdropfadecolor))
|
||||||
end
|
end
|
||||||
elseif(frame.template == "Transparent") then
|
|
||||||
frame:SetBackdropColor(unpack(self["media"].backdropfadecolor))
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self["frames"][frame] = nil
|
self["frames"][frame] = nil
|
||||||
@@ -381,14 +383,12 @@ function E:UpdateBackdropColors()
|
|||||||
|
|
||||||
for frame, _ in pairs(self["unitFrameElements"]) do
|
for frame, _ in pairs(self["unitFrameElements"]) do
|
||||||
if frame then
|
if frame then
|
||||||
if frame.template == "Default" or frame.template == nil then
|
if not frame.ignoreBackdropColors then
|
||||||
if frame.backdropTexture then
|
if frame.template == "Default" or frame.template == nil then
|
||||||
frame.backdropTexture:SetVertexColor(unpack(self["media"].backdropcolor))
|
|
||||||
else
|
|
||||||
frame:SetBackdropColor(unpack(self["media"].backdropcolor))
|
frame:SetBackdropColor(unpack(self["media"].backdropcolor))
|
||||||
|
elseif frame.template == "Transparent" then
|
||||||
|
frame:SetBackdropColor(unpack(self["media"].backdropfadecolor))
|
||||||
end
|
end
|
||||||
elseif frame.template == "Transparent" then
|
|
||||||
frame:SetBackdropColor(unpack(self["media"].backdropfadecolor))
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self["unitFrameElements"][frame] = nil
|
self["unitFrameElements"][frame] = nil
|
||||||
@@ -412,9 +412,9 @@ end
|
|||||||
|
|
||||||
function E:UpdateStatusBars()
|
function E:UpdateStatusBars()
|
||||||
for _, statusBar in pairs(self.statusBars) do
|
for _, statusBar in pairs(self.statusBars) do
|
||||||
if(statusBar and statusBar:GetObjectType() == "StatusBar") then
|
if (statusBar and statusBar:GetObjectType() == "StatusBar") then
|
||||||
statusBar:SetStatusBarTexture(self.media.normTex)
|
statusBar:SetStatusBarTexture(self.media.normTex)
|
||||||
elseif(statusBar and statusBar:GetObjectType() == "Texture") then
|
elseif (statusBar and statusBar:GetObjectType() == "Texture") then
|
||||||
statusBar:SetTexture(self.media.normTex)
|
statusBar:SetTexture(self.media.normTex)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+22
-15
@@ -247,6 +247,7 @@ function B:UpdateSlot(bagID, slotID)
|
|||||||
|
|
||||||
if B.ProfessionColors[bagType] then
|
if B.ProfessionColors[bagType] then
|
||||||
slot:SetBackdropBorderColor(unpack(B.ProfessionColors[bagType]))
|
slot:SetBackdropBorderColor(unpack(B.ProfessionColors[bagType]))
|
||||||
|
slot.ignoreBorderColors = true
|
||||||
elseif clink then
|
elseif clink then
|
||||||
local _, iLvl, itemEquipLoc
|
local _, iLvl, itemEquipLoc
|
||||||
slot.name, _, slot.rarity, iLvl, _, _, _, itemEquipLoc = GetItemInfo(match(clink, "item:(%d+)"))
|
slot.name, _, slot.rarity, iLvl, _, _, _, itemEquipLoc = GetItemInfo(match(clink, "item:(%d+)"))
|
||||||
@@ -266,13 +267,16 @@ function B:UpdateSlot(bagID, slotID)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- color slot according to item quality
|
-- color slot according to item quality
|
||||||
if slot.rarity then
|
if slot.rarity and slot.rarity > 1 then
|
||||||
slot:SetBackdropBorderColor(r, g, b)
|
slot:SetBackdropBorderColor(r, g, b)
|
||||||
|
slot.ignoreBorderColors = true
|
||||||
else
|
else
|
||||||
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
||||||
|
slot.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
||||||
|
slot.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if texture then
|
if texture then
|
||||||
@@ -674,11 +678,14 @@ function B:UpdateKeySlot(slotID)
|
|||||||
|
|
||||||
if slot.rarity and slot.rarity > 1 then
|
if slot.rarity and slot.rarity > 1 then
|
||||||
slot:SetBackdropBorderColor(r, g, b)
|
slot:SetBackdropBorderColor(r, g, b)
|
||||||
|
slot.ignoreBorderColors = true
|
||||||
else
|
else
|
||||||
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
||||||
|
slot.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
slot:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
||||||
|
slot.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if texture then
|
if texture then
|
||||||
@@ -709,15 +716,14 @@ function B:UpdateAll()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function B:OnEvent()
|
function B:OnEvent()
|
||||||
|
local bag, slot = arg1, arg2
|
||||||
if event == "ITEM_LOCK_CHANGED" or event == "ITEM_UNLOCKED" then
|
if event == "ITEM_LOCK_CHANGED" or event == "ITEM_UNLOCKED" then
|
||||||
local bag, slot = arg1, arg2
|
|
||||||
if bag == KEYRING_CONTAINER then
|
if bag == KEYRING_CONTAINER then
|
||||||
B:UpdateKeySlot(slot)
|
B:UpdateKeySlot(slot)
|
||||||
else
|
else
|
||||||
this:UpdateSlot(bag, slot)
|
this:UpdateSlot(bag, slot)
|
||||||
end
|
end
|
||||||
elseif event == "BAG_UPDATE" then
|
elseif event == "BAG_UPDATE" then
|
||||||
local bag = arg1
|
|
||||||
if bag == KEYRING_CONTAINER then
|
if bag == KEYRING_CONTAINER then
|
||||||
if not _G["ElvUIKeyFrameItem"..GetKeyRingSize()] then
|
if not _G["ElvUIKeyFrameItem"..GetKeyRingSize()] then
|
||||||
B:Layout(false)
|
B:Layout(false)
|
||||||
@@ -735,7 +741,9 @@ function B:OnEvent()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
this:UpdateBagSlots(arg1, arg2)
|
this:UpdateBagSlots(bag, slot)
|
||||||
|
|
||||||
|
--Refresh search in case we moved items around
|
||||||
if B:IsSearching() then
|
if B:IsSearching() then
|
||||||
B:SetSearch(SEARCH_STRING)
|
B:SetSearch(SEARCH_STRING)
|
||||||
end
|
end
|
||||||
@@ -915,13 +923,13 @@ function B:ContructContainerFrame(name, isBank)
|
|||||||
E:Size(f.sortButton, 16 + E.Border)
|
E:Size(f.sortButton, 16 + E.Border)
|
||||||
E:SetTemplate(f.sortButton)
|
E:SetTemplate(f.sortButton)
|
||||||
E:Point(f.sortButton, "RIGHT", f.bagText, "LEFT", -5, E.Border * 2)
|
E:Point(f.sortButton, "RIGHT", f.bagText, "LEFT", -5, E.Border * 2)
|
||||||
f.sortButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage")
|
f.sortButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_Broom")
|
||||||
f.sortButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
f.sortButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
E:SetInside(f.sortButton:GetNormalTexture())
|
E:SetInside(f.sortButton:GetNormalTexture())
|
||||||
f.sortButton:SetPushedTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage")
|
f.sortButton:SetPushedTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_Broom")
|
||||||
f.sortButton:GetPushedTexture():SetTexCoord(unpack(E.TexCoords))
|
f.sortButton:GetPushedTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
E:SetInside(f.sortButton:GetPushedTexture())
|
E:SetInside(f.sortButton:GetPushedTexture())
|
||||||
f.sortButton:SetDisabledTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage")
|
f.sortButton:SetDisabledTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_Broom")
|
||||||
f.sortButton:GetDisabledTexture():SetTexCoord(unpack(E.TexCoords))
|
f.sortButton:GetDisabledTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
E:SetInside(f.sortButton:GetDisabledTexture())
|
E:SetInside(f.sortButton:GetDisabledTexture())
|
||||||
f.sortButton:GetDisabledTexture():SetDesaturated(true)
|
f.sortButton:GetDisabledTexture():SetDesaturated(true)
|
||||||
@@ -1026,13 +1034,13 @@ function B:ContructContainerFrame(name, isBank)
|
|||||||
E:Size(f.sortButton, 16 + E.Border)
|
E:Size(f.sortButton, 16 + E.Border)
|
||||||
E:SetTemplate(f.sortButton)
|
E:SetTemplate(f.sortButton)
|
||||||
E:Point(f.sortButton, "RIGHT", f.goldText, "LEFT", -5, E.Border * 2)
|
E:Point(f.sortButton, "RIGHT", f.goldText, "LEFT", -5, E.Border * 2)
|
||||||
f.sortButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage")
|
f.sortButton:SetNormalTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_Broom")
|
||||||
f.sortButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
f.sortButton:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
E:SetInside(f.sortButton:GetNormalTexture())
|
E:SetInside(f.sortButton:GetNormalTexture())
|
||||||
f.sortButton:SetPushedTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage")
|
f.sortButton:SetPushedTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_Broom")
|
||||||
f.sortButton:GetPushedTexture():SetTexCoord(unpack(E.TexCoords))
|
f.sortButton:GetPushedTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
E:SetInside(f.sortButton:GetPushedTexture())
|
E:SetInside(f.sortButton:GetPushedTexture())
|
||||||
f.sortButton:SetDisabledTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_RatCage")
|
f.sortButton:SetDisabledTexture("Interface\\AddOns\\ElvUI\\media\\textures\\INV_Pet_Broom")
|
||||||
f.sortButton:GetDisabledTexture():SetTexCoord(unpack(E.TexCoords))
|
f.sortButton:GetDisabledTexture():SetTexCoord(unpack(E.TexCoords))
|
||||||
E:SetInside(f.sortButton:GetDisabledTexture())
|
E:SetInside(f.sortButton:GetDisabledTexture())
|
||||||
f.sortButton:GetDisabledTexture():SetDesaturated(true)
|
f.sortButton:GetDisabledTexture():SetDesaturated(true)
|
||||||
@@ -1371,11 +1379,10 @@ function B:Initialize()
|
|||||||
self.BagFrame = self:ContructContainerFrame("ElvUI_ContainerFrame")
|
self.BagFrame = self:ContructContainerFrame("ElvUI_ContainerFrame")
|
||||||
|
|
||||||
--Hook onto Blizzard Functions
|
--Hook onto Blizzard Functions
|
||||||
self:RawHook("ToggleBag", "ToggleBags")
|
self:RawHook("ToggleBag", "ToggleBags", true)
|
||||||
self:RawHook("OpenBackpack", "OpenBags")
|
self:RawHook("OpenBackpack", "OpenBags", true)
|
||||||
self:RawHook("CloseAllBags", "CloseBags")
|
self:RawHook("CloseAllBags", "CloseBags", true)
|
||||||
self:RawHook("CloseBackpack", "CloseBags")
|
self:RawHook("CloseBackpack", "CloseBags", true)
|
||||||
self:RawHook("ToggleBackpack", "ToggleBags")
|
|
||||||
self:RawHook("OpenAllBags", "OpenAllBags", true)
|
self:RawHook("OpenAllBags", "OpenAllBags", true)
|
||||||
|
|
||||||
self:Layout()
|
self:Layout()
|
||||||
|
|||||||
@@ -23,13 +23,16 @@ function S:ContainerFrame_Update()
|
|||||||
itemLink = GetContainerItemLink(id, itemButton:GetID())
|
itemLink = GetContainerItemLink(id, itemButton:GetID())
|
||||||
if itemLink then
|
if itemLink then
|
||||||
_, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
_, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
if quality then
|
if quality and quality > 1 then
|
||||||
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
itemButton:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
|
itemButton.ignoreBorderColors = true
|
||||||
else
|
else
|
||||||
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
|
itemButton.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
itemButton:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
|
itemButton.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -39,13 +42,16 @@ function S:BankFrameItemButton_OnUpdate()
|
|||||||
local itemLink = GetContainerItemLink(BANK_CONTAINER, this:GetID())
|
local itemLink = GetContainerItemLink(BANK_CONTAINER, this:GetID())
|
||||||
if itemLink then
|
if itemLink then
|
||||||
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
local _, _, quality = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
if quality then
|
if quality and quality > 1 then
|
||||||
this:SetBackdropBorderColor(GetItemQualityColor(quality))
|
this:SetBackdropBorderColor(GetItemQualityColor(quality))
|
||||||
|
this.ignoreBorderColors = true
|
||||||
else
|
else
|
||||||
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
|
this.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||||
|
this.ignoreBorderColors = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -97,7 +103,7 @@ local function LoadSkin()
|
|||||||
|
|
||||||
E:StripTextures(BankFrame, true)
|
E:StripTextures(BankFrame, true)
|
||||||
|
|
||||||
S:HandleCloseButton(BankCloseButton)
|
S:HandleCloseButton(BankCloseButton, BankFrame.backdrop)
|
||||||
|
|
||||||
local button, buttonIcon
|
local button, buttonIcon
|
||||||
for i = 1, NUM_BANKGENERIC_SLOTS, 1 do
|
for i = 1, NUM_BANKGENERIC_SLOTS, 1 do
|
||||||
|
|||||||
Reference in New Issue
Block a user