mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
1
This commit is contained in:
@@ -10,14 +10,14 @@ local pairs = pairs
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
local RegisterAsWidget, RegisterAsContainer
|
||||
local function SetModifiedBackdrop(self)
|
||||
if self.backdrop then self = self.backdrop end
|
||||
self:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
||||
local function SetModifiedBackdrop()
|
||||
if this.backdrop then this = this.backdrop end
|
||||
this:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
||||
end
|
||||
|
||||
local function SetOriginalBackdrop(self)
|
||||
if self.backdrop then self = self.backdrop end
|
||||
self:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
local function SetOriginalBackdrop()
|
||||
if this.backdrop then this = this.backdrop end
|
||||
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
end
|
||||
|
||||
local function SkinScrollBar(frame, thumbTrim)
|
||||
@@ -101,8 +101,8 @@ local function SkinButton(f, strip, noTemplate)
|
||||
E:SetTemplate(f, "Default", true)
|
||||
end
|
||||
|
||||
HookScript(f, "OnEnter", function() SetModifiedBackdrop(this) end)
|
||||
HookScript(f, "OnLeave", function() SetOriginalBackdrop(this) end)
|
||||
HookScript(f, "OnEnter", SetModifiedBackdrop)
|
||||
HookScript(f, "OnLeave", SetOriginalBackdrop)
|
||||
end
|
||||
|
||||
function S:SkinAce3()
|
||||
|
||||
@@ -37,8 +37,8 @@ function LoadSkin()
|
||||
tab.backdrop:SetPoint("TOPLEFT", 3, -7)
|
||||
tab.backdrop:SetPoint("BOTTOMRIGHT", -2, -1)
|
||||
|
||||
tab:SetScript("OnEnter", function() S:SetModifiedBackdrop(this) end)
|
||||
tab:SetScript("OnLeave", function() S:SetOriginalBackdrop(this) end)
|
||||
tab:SetScript("OnEnter", S.SetModifiedBackdrop)
|
||||
tab:SetScript("OnLeave", S.SetOriginalBackdrop)
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -300,11 +300,10 @@ local function LoadSkin()
|
||||
|
||||
-- Interface Options
|
||||
UIOptionsFrame:SetParent(E.UIParent)
|
||||
UIOptionsFrame:SetScale(E.UIParent:GetScale())
|
||||
UIOptionsFrame:EnableMouse(0)
|
||||
UIOptionsFrame:EnableMouse(false)
|
||||
|
||||
hooksecurefunc("UIOptionsFrame_Load", function()
|
||||
E:StripTextures(UIOptionsFrame, true)
|
||||
E:StripTextures(UIOptionsFrame)
|
||||
end)
|
||||
|
||||
local UIOptions = {
|
||||
@@ -322,30 +321,45 @@ local function LoadSkin()
|
||||
|
||||
for i = 1, getn(UIOptions) do
|
||||
local options = _G[UIOptions[i]]
|
||||
if options then
|
||||
E:SetTemplate(options, "Transparent")
|
||||
end
|
||||
E:SetTemplate(options, "Transparent")
|
||||
end
|
||||
|
||||
BasicOptions.backdrop = CreateFrame("Frame", nil, BasicOptions)
|
||||
BasicOptions.backdrop:SetPoint("TOPLEFT", BasicOptionsGeneral, -20, 35)
|
||||
BasicOptions.backdrop:SetPoint("BOTTOMRIGHT", BasicOptionsHelp, 20, -130)
|
||||
E:SetTemplate(BasicOptions.backdrop, "Transparent")
|
||||
|
||||
for i = 1, 2 do
|
||||
local tab = _G["UIOptionsFrameTab"..i]
|
||||
E:StripTextures(tab, true)
|
||||
E:CreateBackdrop(tab, "Transparent")
|
||||
|
||||
tab:SetFrameLevel(tab:GetParent():GetFrameLevel() + 1)
|
||||
tab:SetFrameLevel(tab:GetParent():GetFrameLevel() + 2)
|
||||
tab.backdrop:SetFrameLevel(tab:GetParent():GetFrameLevel() + 1)
|
||||
|
||||
tab.backdrop:SetPoint("TOPLEFT", 10, E.PixelMode and -4 or -6)
|
||||
tab.backdrop:SetPoint("BOTTOMRIGHT", -10, E.PixelMode and -4 or -6)
|
||||
tab.backdrop:SetPoint("TOPLEFT", 5, E.PixelMode and -14 or -16)
|
||||
tab.backdrop:SetPoint("BOTTOMRIGHT", -5, E.PixelMode and -4 or -6)
|
||||
|
||||
tab:SetScript("OnEnter", function() S:SetModifiedBackdrop(this) end)
|
||||
tab:SetScript("OnLeave", function() S:SetOriginalBackdrop(this) end)
|
||||
tab:SetScript("OnClick", function()
|
||||
PanelTemplates_Tab_OnClick(UIOptionsFrame)
|
||||
if AdvancedOptions:IsShown() then
|
||||
BasicOptions:Show()
|
||||
AdvancedOptions:Hide()
|
||||
else
|
||||
BasicOptions:Hide()
|
||||
AdvancedOptions:Show()
|
||||
end
|
||||
PlaySound("igCharacterInfoTab")
|
||||
end)
|
||||
|
||||
HookScript(tab, "OnEnter", S.SetModifiedBackdrop)
|
||||
HookScript(tab, "OnLeave", S.SetOriginalBackdrop)
|
||||
end
|
||||
|
||||
for i = 1, UIOptionsFrame:GetNumChildren() do
|
||||
local child = select(i, UIOptionsFrame:GetChildren())
|
||||
if child.GetPushedTexture and child:GetPushedTexture() and not child:GetName() then
|
||||
child:SetFrameLevel(child:GetParent():GetFrameLevel() + 2)
|
||||
child:SetFrameLevel(UIOptionsFrame:GetFrameLevel() + 2)
|
||||
S:HandleCloseButton(child, UIOptionsFrame.backdrop)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -38,14 +38,14 @@ function S:SquareButton_SetIcon(self, name)
|
||||
end
|
||||
end
|
||||
|
||||
function S:SetModifiedBackdrop(self)
|
||||
if self.backdrop then self = self.backdrop end
|
||||
self:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
||||
function S:SetModifiedBackdrop()
|
||||
if this.backdrop then this = this.backdrop end
|
||||
this:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
||||
end
|
||||
|
||||
function S:SetOriginalBackdrop(self)
|
||||
if self.backdrop then self = self.backdrop end
|
||||
self:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
function S:SetOriginalBackdrop()
|
||||
if this.backdrop then this = this.backdrop end
|
||||
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
||||
end
|
||||
|
||||
function S:HandleButton(f, strip)
|
||||
@@ -72,8 +72,8 @@ function S:HandleButton(f, strip)
|
||||
if strip then E:StripTextures(f) end
|
||||
|
||||
E:SetTemplate(f, "Default", true)
|
||||
HookScript(f, "OnEnter", function() S:SetModifiedBackdrop(this) end)
|
||||
HookScript(f, "OnLeave", function() S:SetOriginalBackdrop(this) end)
|
||||
HookScript(f, "OnEnter", S.SetModifiedBackdrop)
|
||||
HookScript(f, "OnLeave", S.SetOriginalBackdrop)
|
||||
end
|
||||
|
||||
function S:HandleScrollBar(frame, thumbTrim)
|
||||
|
||||
Reference in New Issue
Block a user