mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
update
This commit is contained in:
@@ -10,7 +10,7 @@ local type = type
|
|||||||
local unpack = unpack
|
local unpack = unpack
|
||||||
local abs, ceil, exp, floor = math.abs, math.ceil, math.exp, math.floor
|
local abs, ceil, exp, floor = math.abs, math.ceil, math.exp, math.floor
|
||||||
local find, format, gfind, gsub, len, sub = string.find, string.format, string.gfind, string.gsub, string.len, string.sub
|
local find, format, gfind, gsub, len, sub = string.find, string.format, string.gfind, string.gsub, string.len, string.sub
|
||||||
local concat, getn, setn = table.concat, table.getn, table.setn
|
local concat, tinsert, getn, setn = table.concat, table.insert, table.getn, table.setn
|
||||||
|
|
||||||
math.fmod = math.mod
|
math.fmod = math.mod
|
||||||
math.huge = 1/0
|
math.huge = 1/0
|
||||||
@@ -32,14 +32,14 @@ function select(n, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if n == "#" then
|
if n == "#" then
|
||||||
return getn(arg)
|
return arg.n
|
||||||
elseif n == 1 then
|
elseif n == 1 then
|
||||||
return unpack(arg)
|
return unpack(arg)
|
||||||
end
|
end
|
||||||
|
|
||||||
local args = {}
|
local args = {}
|
||||||
|
|
||||||
for i = n, getn(arg) do
|
for i = n, arg.n do
|
||||||
args[i-n+1] = arg[i]
|
args[i-n+1] = arg[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ function string.join(delimiter, ...)
|
|||||||
error(format("bad argument #1 to 'join' (string expected, got %s)", delimiter and type(delimiter) or "no value"), 2)
|
error(format("bad argument #1 to 'join' (string expected, got %s)", delimiter and type(delimiter) or "no value"), 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
if getn(arg) == 0 then
|
if arg.n == 0 then
|
||||||
return ""
|
return ""
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ function string.split(delimiter, str)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local fields = {}
|
local fields = {}
|
||||||
gsub(str, format("([^%s]+)", delimiter), function(c) fields[getn(fields) + 1] = c end)
|
gsub(str, format("([^%s]+)", delimiter), function(c) tinsert(fields, c) end)
|
||||||
|
|
||||||
return unpack(fields)
|
return unpack(fields)
|
||||||
end
|
end
|
||||||
@@ -339,7 +339,7 @@ wipe = table.wipe
|
|||||||
|
|
||||||
local LOCAL_ToStringAllTemp = {}
|
local LOCAL_ToStringAllTemp = {}
|
||||||
function tostringall(...)
|
function tostringall(...)
|
||||||
local n = getn(arg)
|
local n = arg.n
|
||||||
-- Simple versions for common argument counts
|
-- Simple versions for common argument counts
|
||||||
if (n == 1) then
|
if (n == 1) then
|
||||||
return tostring(arg[1])
|
return tostring(arg[1])
|
||||||
|
|||||||
@@ -1182,7 +1182,7 @@ function B:Initialize()
|
|||||||
E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", -(E.Border*2), 22 + E.Border*4 - E.Spacing*2)
|
E:Point(BagFrameHolder, "BOTTOMRIGHT", RightChatPanel, "BOTTOMRIGHT", -(E.Border*2), 22 + E.Border*4 - E.Spacing*2)
|
||||||
E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover"], nil, nil, B.PostBagMove)
|
E:CreateMover(BagFrameHolder, "ElvUIBagMover", L["Bag Mover"], nil, nil, B.PostBagMove)
|
||||||
|
|
||||||
self:SecureHook("UpdateContainerFrameAnchors")
|
--self:SecureHook("UpdateContainerFrameAnchors")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ function DT:Initialize()
|
|||||||
self.tooltip = CreateFrame("GameTooltip", "DatatextTooltip", E.UIParent, "GameTooltipTemplate")
|
self.tooltip = CreateFrame("GameTooltip", "DatatextTooltip", E.UIParent, "GameTooltipTemplate")
|
||||||
DatatextTooltipTextLeft1:SetFontObject(GameTooltipText)
|
DatatextTooltipTextLeft1:SetFontObject(GameTooltipText)
|
||||||
DatatextTooltipTextRight1:SetFontObject(GameTooltipText)
|
DatatextTooltipTextRight1:SetFontObject(GameTooltipText)
|
||||||
TT:HookScript(self.tooltip, "OnShow", "SetStyle")
|
TT:SetStyle(self.tooltip)
|
||||||
|
TT:HookScript(self.tooltip, "OnShow", "CheckBackdropColor")
|
||||||
|
|
||||||
self:RegisterLDB()
|
self:RegisterLDB()
|
||||||
LDB.RegisterCallback(E, "LibDataBroker_DataObjectCreated", DT.SetupObjectLDB)
|
LDB.RegisterCallback(E, "LibDataBroker_DataObjectCreated", DT.SetupObjectLDB)
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ local function LoadSkin()
|
|||||||
WorldMapCompareTooltip3
|
WorldMapCompareTooltip3
|
||||||
}
|
}
|
||||||
for _, tt in pairs(tooltips) do
|
for _, tt in pairs(tooltips) do
|
||||||
TT:SecureHookScript(tt, "OnShow", "SetStyle")
|
TT:SetStyle(tt)
|
||||||
|
TT:SecureHookScript(tt, "OnShow", "CheckBackdropColor")
|
||||||
end
|
end
|
||||||
|
|
||||||
GameTooltipStatusBar:SetStatusBarTexture(E["media"].normTex)
|
GameTooltipStatusBar:SetStatusBarTexture(E["media"].normTex)
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ function TT:GameTooltip_SetDefaultAnchor(tt, parent)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function TT:SetStyle(tt)
|
function TT:SetStyle(tt)
|
||||||
E:SetTemplate(this, "Transparent", nil, true)
|
E:SetTemplate(tt, "Transparent", nil, true)
|
||||||
local r, g, b = this:GetBackdropColor()
|
local r, g, b = tt:GetBackdropColor()
|
||||||
this:SetBackdropColor(r, g, b, self.db.colorAlpha)
|
tt:SetBackdropColor(r, g, b, self.db.colorAlpha)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TT:RemoveTrashLines(tt)
|
function TT:RemoveTrashLines(tt)
|
||||||
@@ -245,6 +245,22 @@ function TT:SetItemRef(link)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TT:CheckBackdropColor()
|
||||||
|
if not this:IsShown() then return end
|
||||||
|
|
||||||
|
local r, g, b = this:GetBackdropColor()
|
||||||
|
if r and g and b then
|
||||||
|
r = E:Round(r, 1)
|
||||||
|
g = E:Round(g, 1)
|
||||||
|
b = E:Round(b, 1)
|
||||||
|
local red, green, blue = unpack(E.media.backdropfadecolor)
|
||||||
|
if r ~= red or g ~= green or b ~= blue then
|
||||||
|
this:SetBackdropColor(red, green, blue, self.db.colorAlpha)
|
||||||
|
this:SetBackdropBorderColor(unpack(E.media.bordercolor))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function TT:SetTooltipFonts()
|
function TT:SetTooltipFonts()
|
||||||
local font = E.LSM:Fetch("font", E.db.tooltip.font)
|
local font = E.LSM:Fetch("font", E.db.tooltip.font)
|
||||||
local fontOutline = E.db.tooltip.fontOutline
|
local fontOutline = E.db.tooltip.fontOutline
|
||||||
|
|||||||
Reference in New Issue
Block a user