Verified Commit 3169eb4e authored by Repooc's avatar Repooc
Browse files

mera test

parent 63d26f14
...@@ -6,7 +6,9 @@ local _G = _G ...@@ -6,7 +6,9 @@ local _G = _G
local GetContainerNumSlots = GetContainerNumSlots local GetContainerNumSlots = GetContainerNumSlots
local CUSTOM = CUSTOM local CUSTOM = CUSTOM
local EQUIPMENT_SETS = EQUIPMENT_SETS local EQUIPMENT_SETS = EQUIPMENT_SETS
EQUIPMENT_SETS = E:StripString(EQUIPMENT_SETS)
EQUIPMENT_SETS = EQUIPMENT_SETS:gsub('%%s', '')
EQUIPMENT_SETS = E:EscapeString(EQUIPMENT_SETS)
--* Used this to help translate known texcoords to a |T |t string --* Used this to help translate known texcoords to a |T |t string
-- CreateTextureMarkup('Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs', 64, 256, 0, 0, 0.01562500, 0.53125000, 0.46875000, 0.60546875, 0, 0) -- CreateTextureMarkup('Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs', 64, 256, 0, 0, 0.01562500, 0.53125000, 0.46875000, 0.60546875, 0, 0)
-- CreateTextureMarkup(file, fileWidth, fileHeight, width, height, left, right, top, bottom, xOffset, yOffset) -- CreateTextureMarkup(file, fileWidth, fileHeight, width, height, left, right, top, bottom, xOffset, yOffset)
...@@ -59,33 +61,6 @@ function BI:UpdateEquipment() ...@@ -59,33 +61,6 @@ function BI:UpdateEquipment()
end end
end end
function BI:CheckVisibility(bagFrame, bagID, slotID)
if not bagFrame or not bagID or not slotID then return end
local button = bagFrame.Bags[bagID][slotID]
local show = false
E.ScanTooltip:SetOwner(_G.UIParent, 'ANCHOR_NONE')
if button.GetInventorySlot then -- this fixes bank bagid -1
E.ScanTooltip:SetInventoryItem('player', button:GetInventorySlot())
else
E.ScanTooltip:SetBagItem(bagID, slotID)
end
E.ScanTooltip:Show()
for i = 3, E.ScanTooltip:NumLines() do
local str = _G['ElvUI_ScanTooltipTextLeft' .. i]
local text = str and str:GetText()
if not text or text == '' then return end
if text:find(EQUIPMENT_SETS:gsub('%%s','.-')) then
show = true
end
end
E.ScanTooltip:Hide()
return E.db.sle.bags.equipmentmanager.enable and show
end
-- function BI:CheckVisibility(bagFrame, bagID, slotID) -- function BI:CheckVisibility(bagFrame, bagID, slotID)
-- if not bagFrame or not bagID or not slotID then return end -- if not bagFrame or not bagID or not slotID then return end
-- local button = bagFrame.Bags[bagID][slotID] -- local button = bagFrame.Bags[bagID][slotID]
...@@ -105,19 +80,42 @@ end ...@@ -105,19 +80,42 @@ end
-- if not text or text == '' then return end -- if not text or text == '' then return end
-- EQUIPMENT_SETS = E:StripString(EQUIPMENT_SETS) -- if text:find(EQUIPMENT_SETS:gsub('%%s','.-')) then
-- EQUIPMENT_SETS = EQUIPMENT_SETS:gsub('%%s', '')
-- EQUIPMENT_SETS = E:EscapeString(EQUIPMENT_SETS)
-- if text:find(EQUIPMENT_SETS) then
-- show = true -- show = true
-- end -- end
-- end -- end
-- E.ScanTooltip:Hide() -- E.ScanTooltip:Hide()
-- return E.db.sle.bags.equipmentmanager.enable and show -- return E.db.sle.bags.equipmentmanager.enable and show
-- end -- end
function BI:CheckVisibility(bagFrame, bagID, slotID)
if not bagFrame or not bagID or not slotID then return end
local button = bagFrame.Bags[bagID][slotID]
local show = false
E.ScanTooltip:SetOwner(_G.UIParent, 'ANCHOR_NONE')
if button.GetInventorySlot then -- this fixes bank bagid -1
E.ScanTooltip:SetInventoryItem('player', button:GetInventorySlot())
else
E.ScanTooltip:SetBagItem(bagID, slotID)
end
E.ScanTooltip:Show()
for i = 3, E.ScanTooltip:NumLines() do
local str = _G['ElvUI_ScanTooltipTextLeft' .. i]
local text = str and str:GetText()
if not text or text == '' then return end
if text:find(EQUIPMENT_SETS) then
show = true
end
end
E.ScanTooltip:Hide()
return E.db.sle.bags.equipmentmanager.enable and show
end
function BI:ToggleSettings() function BI:ToggleSettings()
if E.db.sle.bags.equipmentmanager.enable then if E.db.sle.bags.equipmentmanager.enable then
BI:RegisterEvent('EQUIPMENT_SETS_CHANGED', BI.UpdateEquipment) BI:RegisterEvent('EQUIPMENT_SETS_CHANGED', BI.UpdateEquipment)
......
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