mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
3
This commit is contained in:
@@ -64,7 +64,6 @@ end
|
||||
|
||||
local function CreateDispatcher(argCount)
|
||||
local code = [[
|
||||
local xpcall, eh = arg1, arg2
|
||||
local method, ARGS
|
||||
local function call() return method(ARGS) end
|
||||
|
||||
@@ -72,7 +71,7 @@ local function CreateDispatcher(argCount)
|
||||
method = func
|
||||
if not method then return end
|
||||
ARGS = unpack(arg)
|
||||
return xpcall(call, eh)
|
||||
return xpcall(call, function(err) return geterrorhandler()(err) end)
|
||||
end
|
||||
|
||||
return dispatch
|
||||
@@ -536,7 +535,7 @@ function AceAddon:InitializeAddon(addon)
|
||||
local embeds = self.embeds[addon]
|
||||
for i = 1, getn(embeds) do
|
||||
local lib = LibStub:GetLibrary(embeds[i], true)
|
||||
--if lib then safecall(lib.OnEmbedInitialize, lib, addon) end
|
||||
if lib then safecall(lib.OnEmbedInitialize, lib, addon) end
|
||||
end
|
||||
|
||||
-- we don't call InitializeAddon on modules specifically, this is handled
|
||||
|
||||
@@ -11,14 +11,14 @@ local pairs = pairs
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
local RegisterAsWidget, RegisterAsContainer
|
||||
local function SetModifiedBackdrop()
|
||||
if this.backdrop then this = this.backdrop end
|
||||
this:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
||||
local function SetModifiedBackdrop(self)
|
||||
if self.backdrop then self = self.backdrop end
|
||||
self:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
||||
end
|
||||
|
||||
local function SetOriginalBackdrop()
|
||||
if this.backdrop then this = this.backdrop end
|
||||
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
local function SetOriginalBackdrop(self)
|
||||
if self.backdrop then self = self.backdrop end
|
||||
self:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
end
|
||||
|
||||
local function SkinScrollBar(frame, thumbTrim)
|
||||
@@ -36,7 +36,6 @@ local function SkinScrollBar(frame, thumbTrim)
|
||||
if not _G[frame:GetName().."ScrollUpButton"].icon then
|
||||
S:HandleNextPrevButton(_G[frame:GetName().."ScrollUpButton"])
|
||||
S:SquareButton_SetIcon(_G[frame:GetName().."ScrollUpButton"], "UP")
|
||||
-- _G[frame:GetName().."ScrollUpButton"]:Size(_G[frame:GetName().."ScrollUpButton"]:GetWidth() + 7, _G[frame:GetName().."ScrollUpButton"]:GetHeight() + 7)
|
||||
_G[frame:GetName().."ScrollUpButton"]:SetWidth(_G[frame:GetName().."ScrollUpButton"]:GetWidth() + 7)
|
||||
_G[frame:GetName().."ScrollUpButton"]:SetHeight(_G[frame:GetName().."ScrollUpButton"]:GetHeight() + 7)
|
||||
end
|
||||
@@ -45,7 +44,6 @@ local function SkinScrollBar(frame, thumbTrim)
|
||||
if not _G[frame:GetName().."ScrollDownButton"].icon then
|
||||
S:HandleNextPrevButton(_G[frame:GetName().."ScrollDownButton"])
|
||||
S:SquareButton_SetIcon(_G[frame:GetName().."ScrollDownButton"], "DOWN")
|
||||
-- _G[frame:GetName().."ScrollDownButton"]:Size(_G[frame:GetName().."ScrollDownButton"]:GetWidth() + 7, _G[frame:GetName().."ScrollDownButton"]:GetHeight() + 7)
|
||||
_G[frame:GetName().."ScrollDownButton"]:SetWidth(_G[frame:GetName().."ScrollDownButton"]:GetWidth() + 7)
|
||||
_G[frame:GetName().."ScrollDownButton"]:SetHeight(_G[frame:GetName().."ScrollDownButton"]:GetHeight() + 7)
|
||||
end
|
||||
@@ -60,9 +58,11 @@ local function SkinScrollBar(frame, thumbTrim)
|
||||
if frame:GetThumbTexture() then
|
||||
if not thumbTrim then thumbTrim = 3 end
|
||||
frame:GetThumbTexture():SetTexture(nil)
|
||||
frame:GetThumbTexture():SetHeight(24)
|
||||
if not frame.thumbbg then
|
||||
frame.thumbbg = CreateFrame("Frame", nil, frame)
|
||||
frame.thumbbg:SetPoint("TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim)
|
||||
frame.thumbbg:SetPoint("TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim)
|
||||
frame.thumbbg:SetPoint("BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -2, thumbTrim)
|
||||
E:SetTemplate(frame.thumbbg, "Default", true, true)
|
||||
frame.thumbbg:SetBackdropColor(0.3, 0.3, 0.3)
|
||||
@@ -102,8 +102,8 @@ local function SkinButton(f, strip, noTemplate)
|
||||
E:SetTemplate(f, "Default", true)
|
||||
end
|
||||
|
||||
f:SetScript("OnEnter", function() S:SetModifiedBackdrop(this) end)
|
||||
f:SetScript("OnLeave", function() S:SetOriginalBackdrop(this) end)
|
||||
HookScript(f, "OnEnter", function() SetModifiedBackdrop(this) end)
|
||||
HookScript(f, "OnLeave", function() SetOriginalBackdrop(this) end)
|
||||
end
|
||||
|
||||
function S:SkinAce3()
|
||||
@@ -159,7 +159,7 @@ function S:SkinAce3()
|
||||
end
|
||||
button:SetParent(frame.backdrop)
|
||||
text:SetParent(frame.backdrop)
|
||||
HookScript(button, "OnClick", function(this)
|
||||
HookScript(button, "OnClick", function()
|
||||
local dropdown = this.obj.pullout
|
||||
if dropdown.frame then
|
||||
E:SetTemplate(dropdown.frame, "Default", true)
|
||||
@@ -212,7 +212,7 @@ function S:SkinAce3()
|
||||
end
|
||||
button:SetParent(frame.backdrop)
|
||||
text:SetParent(frame.backdrop)
|
||||
HookScript(button, "OnClick", function(this)
|
||||
HookScript(button, "OnClick", function()
|
||||
local dropdown = this.obj.dropdown
|
||||
if dropdown then
|
||||
E:SetTemplate(dropdown, "Default", true)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/">
|
||||
<Script file="Skins.lua"/>
|
||||
<Include file="Addons\Load_Addons.xml"/>
|
||||
<Include file="Blizzard\Load_Blizzard.xml"/>
|
||||
</Ui>
|
||||
Reference in New Issue
Block a user