Commit 14077cff authored by Azilroka's avatar Azilroka

Revert when servers go down

parent 70aad493
......@@ -683,7 +683,7 @@ function B:UpdateCooldowns()
for _, bagID in ipairs(self.BagIDs) do
for slotID = 1, GetContainerNumSlots(bagID) do
local start, duration, enable = GetContainerItemCooldown(bagID, slotID)
CooldownFrame_Set(self.Bags[bagID][slotID].cooldown, start, duration, enable, _, _)
--CooldownFrame_Set(self.Bags[bagID][slotID].cooldown, start, duration, enable, _, _)
end
end
end
......@@ -931,6 +931,9 @@ function B:Layout(isBank)
local f = self:GetContainerFrame(isBank);
if not f then return end
local ButtonType = E.wowpatch == "8.1.0" and "CheckButton" or "ItemButton"
local buttonSize = isBank and self.db.bankSize or self.db.bagSize;
local buttonSpacing = E.Border*2;
local containerWidth = ((isBank and self.db.bankWidth) or self.db.bagWidth)
......@@ -965,7 +968,7 @@ function B:Layout(isBank)
if (not isBank) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots)) then
if not f.ContainerHolder[i] then
if isBank then
f.ContainerHolder[i] = CreateFrame("ItemButton", "ElvUIBankBag" .. (bagID-4), f.ContainerHolder, "BankItemButtonBagTemplate")
f.ContainerHolder[i] = CreateFrame(ButtonType, "ElvUIBankBag" .. (bagID-4), f.ContainerHolder, "BankItemButtonBagTemplate")
B:CreateFilterIcon(f.ContainerHolder[i])
f.ContainerHolder[i]:SetScript('OnClick', function(holder, button)
if button == "RightButton" and holder.id then
......@@ -978,7 +981,7 @@ function B:Layout(isBank)
end)
else
if bagID == 0 then --Backpack needs different setup
f.ContainerHolder[i] = CreateFrame("ItemButton", "ElvUIMainBagBackpack", f.ContainerHolder, "ItemAnimTemplate")
f.ContainerHolder[i] = CreateFrame(ButtonType, "ElvUIMainBagBackpack", f.ContainerHolder, "ItemAnimTemplate")
B:CreateFilterIcon(f.ContainerHolder[i])
f.ContainerHolder[i]:RegisterForClicks("LeftButtonUp", "RightButtonUp")
f.ContainerHolder[i]:SetScript('OnClick', function(holder, button)
......@@ -993,7 +996,7 @@ function B:Layout(isBank)
PutItemInBackpack();--Put bag on empty slot, or drop item in this bag
end)
else
f.ContainerHolder[i] = CreateFrame("ItemButton", "ElvUIMainBag" .. (bagID-1) .. "Slot", f.ContainerHolder, "BagSlotButtonTemplate")
f.ContainerHolder[i] = CreateFrame(ButtonType, "ElvUIMainBag" .. (bagID-1) .. "Slot", f.ContainerHolder, "BagSlotButtonTemplate")
B:CreateFilterIcon(f.ContainerHolder[i])
f.ContainerHolder[i]:SetScript('OnClick', function(holder, button)
if button == "RightButton" and holder.id then
......@@ -1009,7 +1012,7 @@ function B:Layout(isBank)
f.ContainerHolder[i]:SetTemplate(nil, true)
f.ContainerHolder[i]:StyleButton()
f.ContainerHolder[i].IconBorder:SetAlpha(0)
--f.ContainerHolder[i].IconBorder:SetAlpha(0)
f.ContainerHolder[i]:SetNormalTexture("")
f.ContainerHolder[i]:SetPushedTexture("")
f.ContainerHolder[i].id = bagID
......@@ -1023,11 +1026,13 @@ function B:Layout(isBank)
end
end
f.ContainerHolder[i].iconTexture = _G[f.ContainerHolder[i]:GetName()..'IconTexture'];
f.ContainerHolder[i].iconTexture:SetInside()
f.ContainerHolder[i].iconTexture:SetTexCoord(unpack(E.TexCoords))
if bagID == 0 then --backpack
f.ContainerHolder[i].iconTexture:SetTexture("Interface\\Buttons\\Button-Backpack-Up");
if _G[f.ContainerHolder[i]:GetName()..'IconTexture'] then
f.ContainerHolder[i].iconTexture = _G[f.ContainerHolder[i]:GetName()..'IconTexture'];
f.ContainerHolder[i].iconTexture:SetInside()
f.ContainerHolder[i].iconTexture:SetTexCoord(unpack(E.TexCoords))
if bagID == 0 then --backpack
f.ContainerHolder[i].iconTexture:SetTexture("Interface\\Buttons\\Button-Backpack-Up");
end
end
end
......@@ -1074,7 +1079,7 @@ function B:Layout(isBank)
for slotID = 1, numSlots do
f.totalSlots = f.totalSlots + 1;
if not f.Bags[bagID][slotID] then
f.Bags[bagID][slotID] = CreateFrame('ItemButton', f.Bags[bagID]:GetName()..'Slot'..slotID, f.Bags[bagID], bagID == -1 and 'BankItemButtonGenericTemplate' or 'ContainerFrameItemButtonTemplate');
f.Bags[bagID][slotID] = CreateFrame(ButtonType, f.Bags[bagID]:GetName()..'Slot'..slotID, f.Bags[bagID], bagID == -1 and 'BankItemButtonGenericTemplate' or 'ContainerFrameItemButtonTemplate');
f.Bags[bagID][slotID]:StyleButton();
f.Bags[bagID][slotID]:SetTemplate(nil, true);
f.Bags[bagID][slotID]:SetNormalTexture(nil);
......@@ -1240,7 +1245,7 @@ function B:Layout(isBank)
totalSlots = totalSlots + 1;
if(not f.reagentFrame.slots[i]) then
f.reagentFrame.slots[i] = CreateFrame("ItemButton", "ElvUIReagentBankFrameItem"..i, f.reagentFrame, "ReagentBankItemButtonGenericTemplate");
f.reagentFrame.slots[i] = CreateFrame(ButtonType, "ElvUIReagentBankFrameItem"..i, f.reagentFrame, "ReagentBankItemButtonGenericTemplate");
f.reagentFrame.slots[i]:SetID(i)
f.reagentFrame.slots[i]:StyleButton()
......
......@@ -28,19 +28,19 @@ local function LoadSkin()
local StoryTooltip = _G.QuestScrollFrame.StoryTooltip
StoryTooltip:SetFrameLevel(4)
GameTooltip.ItemTooltip.Icon:SetTexCoord(unpack(E.TexCoords))
GameTooltip.ItemTooltip.IconBorder:SetAlpha(0)
GameTooltip.ItemTooltip:CreateBackdrop("Default")
GameTooltip.ItemTooltip.backdrop:SetOutside(GameTooltip.ItemTooltip.Icon)
GameTooltip.ItemTooltip.Count:ClearAllPoints()
GameTooltip.ItemTooltip.Count:SetPoint('BOTTOMRIGHT', GameTooltip.ItemTooltip.Icon, 'BOTTOMRIGHT', 1, 0)
hooksecurefunc(GameTooltip.ItemTooltip.IconBorder, 'SetVertexColor', function(self, r, g, b)
self:GetParent().backdrop:SetBackdropBorderColor(r, g, b)
self:SetTexture()
end)
hooksecurefunc(GameTooltip.ItemTooltip.IconBorder, 'Hide', function(self)
self:GetParent().backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
end)
--GameTooltip.ItemTooltip.Icon:SetTexCoord(unpack(E.TexCoords))
--GameTooltip.ItemTooltip.IconBorder:SetAlpha(0)
--GameTooltip.ItemTooltip:CreateBackdrop("Default")
--GameTooltip.ItemTooltip.backdrop:SetOutside(GameTooltip.ItemTooltip.Icon)
--GameTooltip.ItemTooltip.Count:ClearAllPoints()
--GameTooltip.ItemTooltip.Count:SetPoint('BOTTOMRIGHT', GameTooltip.ItemTooltip.Icon, 'BOTTOMRIGHT', 1, 0)
--hooksecurefunc(GameTooltip.ItemTooltip.IconBorder, 'SetVertexColor', function(self, r, g, b)
-- self:GetParent().backdrop:SetBackdropBorderColor(r, g, b)
-- self:SetTexture()
--end)
--hooksecurefunc(GameTooltip.ItemTooltip.IconBorder, 'Hide', function(self)
-- self:GetParent().backdrop:SetBackdropBorderColor(unpack(E.media.bordercolor))
--end)
local WarCampaignTooltip = _G.QuestScrollFrame.WarCampaignTooltip
local tooltips = {
......
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