This commit is contained in:
Bunny67
2017-12-11 21:49:46 +03:00
parent e280782c31
commit d9ceb70f4b
3 changed files with 15 additions and 15 deletions
@@ -64,7 +64,6 @@ end
local function CreateDispatcher(argCount) local function CreateDispatcher(argCount)
local code = [[ local code = [[
local xpcall, eh = arg1, arg2
local method, ARGS local method, ARGS
local function call() return method(ARGS) end local function call() return method(ARGS) end
@@ -72,7 +71,7 @@ local function CreateDispatcher(argCount)
method = func method = func
if not method then return end if not method then return end
ARGS = unpack(arg) ARGS = unpack(arg)
return xpcall(call, eh) return xpcall(call, function(err) return geterrorhandler()(err) end)
end end
return dispatch return dispatch
@@ -536,7 +535,7 @@ function AceAddon:InitializeAddon(addon)
local embeds = self.embeds[addon] local embeds = self.embeds[addon]
for i = 1, getn(embeds) do for i = 1, getn(embeds) do
local lib = LibStub:GetLibrary(embeds[i], true) 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 end
-- we don't call InitializeAddon on modules specifically, this is handled -- we don't call InitializeAddon on modules specifically, this is handled
+12 -12
View File
@@ -11,14 +11,14 @@ local pairs = pairs
local CreateFrame = CreateFrame local CreateFrame = CreateFrame
local RegisterAsWidget, RegisterAsContainer local RegisterAsWidget, RegisterAsContainer
local function SetModifiedBackdrop() local function SetModifiedBackdrop(self)
if this.backdrop then this = this.backdrop end if self.backdrop then self = self.backdrop end
this:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor)) self:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
end end
local function SetOriginalBackdrop() local function SetOriginalBackdrop(self)
if this.backdrop then this = this.backdrop end if self.backdrop then self = self.backdrop end
this:SetBackdropBorderColor(unpack(E["media"].bordercolor)) self:SetBackdropBorderColor(unpack(E["media"].bordercolor))
end end
local function SkinScrollBar(frame, thumbTrim) local function SkinScrollBar(frame, thumbTrim)
@@ -36,7 +36,6 @@ local function SkinScrollBar(frame, thumbTrim)
if not _G[frame:GetName().."ScrollUpButton"].icon then if not _G[frame:GetName().."ScrollUpButton"].icon then
S:HandleNextPrevButton(_G[frame:GetName().."ScrollUpButton"]) S:HandleNextPrevButton(_G[frame:GetName().."ScrollUpButton"])
S:SquareButton_SetIcon(_G[frame:GetName().."ScrollUpButton"], "UP") 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"]:SetWidth(_G[frame:GetName().."ScrollUpButton"]:GetWidth() + 7)
_G[frame:GetName().."ScrollUpButton"]:SetHeight(_G[frame:GetName().."ScrollUpButton"]:GetHeight() + 7) _G[frame:GetName().."ScrollUpButton"]:SetHeight(_G[frame:GetName().."ScrollUpButton"]:GetHeight() + 7)
end end
@@ -45,7 +44,6 @@ local function SkinScrollBar(frame, thumbTrim)
if not _G[frame:GetName().."ScrollDownButton"].icon then if not _G[frame:GetName().."ScrollDownButton"].icon then
S:HandleNextPrevButton(_G[frame:GetName().."ScrollDownButton"]) S:HandleNextPrevButton(_G[frame:GetName().."ScrollDownButton"])
S:SquareButton_SetIcon(_G[frame:GetName().."ScrollDownButton"], "DOWN") 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"]:SetWidth(_G[frame:GetName().."ScrollDownButton"]:GetWidth() + 7)
_G[frame:GetName().."ScrollDownButton"]:SetHeight(_G[frame:GetName().."ScrollDownButton"]:GetHeight() + 7) _G[frame:GetName().."ScrollDownButton"]:SetHeight(_G[frame:GetName().."ScrollDownButton"]:GetHeight() + 7)
end end
@@ -60,9 +58,11 @@ local function SkinScrollBar(frame, thumbTrim)
if frame:GetThumbTexture() then if frame:GetThumbTexture() then
if not thumbTrim then thumbTrim = 3 end if not thumbTrim then thumbTrim = 3 end
frame:GetThumbTexture():SetTexture(nil) frame:GetThumbTexture():SetTexture(nil)
frame:GetThumbTexture():SetHeight(24)
if not frame.thumbbg then if not frame.thumbbg then
frame.thumbbg = CreateFrame("Frame", nil, frame) 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("TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim)
frame.thumbbg:SetPoint("BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -2, thumbTrim) frame.thumbbg:SetPoint("BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -2, thumbTrim)
E:SetTemplate(frame.thumbbg, "Default", true, true) E:SetTemplate(frame.thumbbg, "Default", true, true)
frame.thumbbg:SetBackdropColor(0.3, 0.3, 0.3) frame.thumbbg:SetBackdropColor(0.3, 0.3, 0.3)
@@ -102,8 +102,8 @@ local function SkinButton(f, strip, noTemplate)
E:SetTemplate(f, "Default", true) E:SetTemplate(f, "Default", true)
end end
f:SetScript("OnEnter", function() S:SetModifiedBackdrop(this) end) HookScript(f, "OnEnter", function() SetModifiedBackdrop(this) end)
f:SetScript("OnLeave", function() S:SetOriginalBackdrop(this) end) HookScript(f, "OnLeave", function() SetOriginalBackdrop(this) end)
end end
function S:SkinAce3() function S:SkinAce3()
@@ -159,7 +159,7 @@ function S:SkinAce3()
end end
button:SetParent(frame.backdrop) button:SetParent(frame.backdrop)
text:SetParent(frame.backdrop) text:SetParent(frame.backdrop)
HookScript(button, "OnClick", function(this) HookScript(button, "OnClick", function()
local dropdown = this.obj.pullout local dropdown = this.obj.pullout
if dropdown.frame then if dropdown.frame then
E:SetTemplate(dropdown.frame, "Default", true) E:SetTemplate(dropdown.frame, "Default", true)
@@ -212,7 +212,7 @@ function S:SkinAce3()
end end
button:SetParent(frame.backdrop) button:SetParent(frame.backdrop)
text:SetParent(frame.backdrop) text:SetParent(frame.backdrop)
HookScript(button, "OnClick", function(this) HookScript(button, "OnClick", function()
local dropdown = this.obj.dropdown local dropdown = this.obj.dropdown
if dropdown then if dropdown then
E:SetTemplate(dropdown, "Default", true) E:SetTemplate(dropdown, "Default", true)
@@ -1,4 +1,5 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"> <Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="Skins.lua"/> <Script file="Skins.lua"/>
<Include file="Addons\Load_Addons.xml"/>
<Include file="Blizzard\Load_Blizzard.xml"/> <Include file="Blizzard\Load_Blizzard.xml"/>
</Ui> </Ui>