mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update Ace3 skin
This commit is contained in:
+182
-189
@@ -4,88 +4,27 @@ local S = E:GetModule("Skins");
|
|||||||
--Cache global variables
|
--Cache global variables
|
||||||
--Lua functions
|
--Lua functions
|
||||||
local _G = _G
|
local _G = _G
|
||||||
local unpack = unpack
|
local select, unpack = select, unpack
|
||||||
local pairs = pairs
|
local getn = table.getn
|
||||||
--WoW API / Variables
|
--WoW API / Variables
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
|
|
||||||
local RegisterAsWidget, RegisterAsContainer
|
local RegisterAsWidget, RegisterAsContainer
|
||||||
local function SetModifiedBackdrop()
|
|
||||||
if this.backdrop then this = this.backdrop end
|
|
||||||
this:SetBackdropBorderColor(unpack(E["media"].rgbvaluecolor))
|
|
||||||
end
|
|
||||||
|
|
||||||
local function SetOriginalBackdrop()
|
|
||||||
if this.backdrop then this = this.backdrop end
|
|
||||||
this:SetBackdropBorderColor(unpack(E["media"].bordercolor))
|
|
||||||
end
|
|
||||||
|
|
||||||
local function SkinScrollBar(frame, thumbTrim)
|
|
||||||
if _G[frame:GetName().."BG"] then _G[frame:GetName().."BG"]:SetTexture(nil) end
|
|
||||||
if _G[frame:GetName().."Track"] then _G[frame:GetName().."Track"]:SetTexture(nil) end
|
|
||||||
|
|
||||||
if _G[frame:GetName().."Top"] then
|
|
||||||
_G[frame:GetName().."Top"]:SetTexture(nil)
|
|
||||||
_G[frame:GetName().."Bottom"]:SetTexture(nil)
|
|
||||||
_G[frame:GetName().."Middle"]:SetTexture(nil)
|
|
||||||
end
|
|
||||||
|
|
||||||
if _G[frame:GetName().."ScrollUpButton"] and _G[frame:GetName().."ScrollDownButton"] then
|
|
||||||
E:StripTextures(_G[frame:GetName().."ScrollUpButton"])
|
|
||||||
if not _G[frame:GetName().."ScrollUpButton"].icon then
|
|
||||||
S:HandleNextPrevButton(_G[frame:GetName().."ScrollUpButton"])
|
|
||||||
S:SquareButton_SetIcon(_G[frame:GetName().."ScrollUpButton"], "UP")
|
|
||||||
E:Size(_G[frame:GetName().."ScrollUpButton"], _G[frame:GetName().."ScrollUpButton"]:GetWidth() + 7, _G[frame:GetName().."ScrollUpButton"]:GetHeight() + 7)
|
|
||||||
end
|
|
||||||
|
|
||||||
E:StripTextures(_G[frame:GetName().."ScrollDownButton"])
|
|
||||||
if not _G[frame:GetName().."ScrollDownButton"].icon then
|
|
||||||
S:HandleNextPrevButton(_G[frame:GetName().."ScrollDownButton"])
|
|
||||||
S:SquareButton_SetIcon(_G[frame:GetName().."ScrollDownButton"], "DOWN")
|
|
||||||
E:Size(_G[frame:GetName().."ScrollDownButton"], _G[frame:GetName().."ScrollDownButton"]:GetWidth() + 7, _G[frame:GetName().."ScrollDownButton"]:GetHeight() + 7)
|
|
||||||
end
|
|
||||||
|
|
||||||
if not frame.trackbg then
|
|
||||||
frame.trackbg = CreateFrame("Frame", nil, frame)
|
|
||||||
E:Point(frame.trackbg, "TOPLEFT", _G[frame:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1)
|
|
||||||
E:Point(frame.trackbg, "BOTTOMRIGHT", _G[frame:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1)
|
|
||||||
E:SetTemplate(frame.trackbg, "Transparent")
|
|
||||||
end
|
|
||||||
|
|
||||||
if frame:GetThumbTexture() then
|
|
||||||
if not thumbTrim then thumbTrim = 3 end
|
|
||||||
frame:GetThumbTexture():SetTexture(nil)
|
|
||||||
E:Height(frame:GetThumbTexture(), 24)
|
|
||||||
if not frame.thumbbg then
|
|
||||||
frame.thumbbg = CreateFrame("Frame", nil, frame)
|
|
||||||
E:Point(frame.thumbbg, "TOPLEFT", frame:GetThumbTexture(), "TOPLEFT", 2, -thumbTrim)
|
|
||||||
E:Point(frame.thumbbg, "BOTTOMRIGHT", frame:GetThumbTexture(), "BOTTOMRIGHT", -2, thumbTrim)
|
|
||||||
E:SetTemplate(frame.thumbbg, "Default", true, true)
|
|
||||||
frame.thumbbg:SetBackdropColor(0.3, 0.3, 0.3)
|
|
||||||
if frame.trackbg then
|
|
||||||
frame.thumbbg:SetFrameLevel(frame.trackbg:GetFrameLevel() + 1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function SkinButton(f, strip, noTemplate)
|
local function SkinButton(f, strip, noTemplate)
|
||||||
local name = f:GetName()
|
local name = f:GetName()
|
||||||
|
if name then
|
||||||
if(name) then
|
|
||||||
local left = _G[name.."Left"]
|
local left = _G[name.."Left"]
|
||||||
local middle = _G[name.."Middle"]
|
local middle = _G[name.."Middle"]
|
||||||
local right = _G[name.."Right"]
|
local right = _G[name.."Right"]
|
||||||
|
|
||||||
if(left) then E:Kill(left) end
|
if left then E:Kill(left) end
|
||||||
if(middle) then E:Kill(middle) end
|
if middle then E:Kill(middle) end
|
||||||
if(right) then E:Kill(right) end
|
if right then E:Kill(right) end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(f.Left) then E:Kill(f.Left) end
|
if f.Left then E:Kill(f.Left) end
|
||||||
if(f.Middle) then E:Kill(f.Middle) end
|
if f.Middle then E:Kill(f.Middle) end
|
||||||
if(f.Right) then E:Kill(f.Right) end
|
if f.Right then E:Kill(f.Right) end
|
||||||
|
|
||||||
if f.SetNormalTexture then f:SetNormalTexture("") end
|
if f.SetNormalTexture then f:SetNormalTexture("") end
|
||||||
if f.SetHighlightTexture then f:SetHighlightTexture("") end
|
if f.SetHighlightTexture then f:SetHighlightTexture("") end
|
||||||
@@ -98,8 +37,27 @@ local function SkinButton(f, strip, noTemplate)
|
|||||||
E:SetTemplate(f, "Default", true)
|
E:SetTemplate(f, "Default", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
HookScript(f, "OnEnter", SetModifiedBackdrop)
|
HookScript(f, "OnEnter", S.SetModifiedBackdrop)
|
||||||
HookScript(f, "OnLeave", SetOriginalBackdrop)
|
HookScript(f, "OnLeave", S.SetOriginalBackdrop)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function SkinDropdownPullout(self)
|
||||||
|
if self.obj.pullout.frame.template and self.obj.pullout.slider.template then return end
|
||||||
|
|
||||||
|
if not self.obj.pullout.frame.template then
|
||||||
|
E:SetTemplate(self.obj.pullout.frame, "Default", true)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.obj.pullout.slider.template then
|
||||||
|
E:SetTemplate(self.obj.pullout.slider, "Default")
|
||||||
|
E:Point(self.obj.pullout.slider, "TOPRIGHT", self.obj.pullout.frame, "TOPRIGHT", -10, -10)
|
||||||
|
E:Point(self.obj.pullout.slider, "BOTTOMRIGHT", self.obj.pullout.frame, "BOTTOMRIGHT", -10, 10)
|
||||||
|
if self.obj.pullout.slider:GetThumbTexture() then
|
||||||
|
self.obj.pullout.slider:SetThumbTexture(E.media.normTex)
|
||||||
|
self.obj.pullout.slider:GetThumbTexture():SetVertexColor(unpack(E.media.rgbvaluecolor))
|
||||||
|
E:Size(self.obj.pullout.slider:GetThumbTexture(), 10, 14)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function S:SkinAce3()
|
function S:SkinAce3()
|
||||||
@@ -114,100 +72,112 @@ function S:SkinAce3()
|
|||||||
local TYPE = widget.type
|
local TYPE = widget.type
|
||||||
if TYPE == "MultiLineEditBox" then
|
if TYPE == "MultiLineEditBox" then
|
||||||
local frame = widget.frame
|
local frame = widget.frame
|
||||||
|
local scrollBG = widget.scrollBG or select(2, frame:GetChildren())
|
||||||
|
|
||||||
if not widget.scrollBG.template then
|
if not scrollBG.template then
|
||||||
E:SetTemplate(widget.scrollBG, "Default")
|
E:SetTemplate(scrollBG, "Default")
|
||||||
end
|
end
|
||||||
|
|
||||||
SkinButton(widget.button)
|
SkinButton(widget.button)
|
||||||
SkinScrollBar(widget.scrollBar)
|
S:HandleScrollBar(widget.scrollBar)
|
||||||
E:Point(widget.scrollBar, "RIGHT", frame, "RIGHT", 0 -4)
|
E:Point(widget.scrollBar, "RIGHT", frame, "RIGHT", 0 -4)
|
||||||
E:Point(widget.scrollBG, "TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19)
|
E:Point(scrollBG, "TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19)
|
||||||
E:Point(widget.scrollBG, "BOTTOMLEFT", widget.button, "TOPLEFT")
|
E:Point(scrollBG, "BOTTOMLEFT", widget.button, "TOPLEFT")
|
||||||
E:Point(widget.scrollFrame, "BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8)
|
E:Point(widget.scrollFrame, "BOTTOMRIGHT", scrollBG, "BOTTOMRIGHT", -4, 8)
|
||||||
elseif TYPE == "CheckBox" then
|
elseif TYPE == "CheckBox" then
|
||||||
E:Kill(widget.checkbg)
|
local check = widget.check
|
||||||
E:Kill(widget.highlight)
|
local checkbg = widget.checkbg
|
||||||
|
local highlight = widget.highlight
|
||||||
|
|
||||||
if not widget.skinnedCheckBG then
|
E:CreateBackdrop(checkbg, "Default")
|
||||||
widget.skinnedCheckBG = CreateFrame("Frame", nil, widget.frame)
|
E:SetInside(checkbg.backdrop, checkbg, 4, 4)
|
||||||
E:SetTemplate(widget.skinnedCheckBG, "Default")
|
checkbg.backdrop:SetFrameLevel(checkbg.backdrop:GetFrameLevel() + 1)
|
||||||
E:Point(widget.skinnedCheckBG, "TOPLEFT", widget.checkbg, "TOPLEFT", 4, -4)
|
checkbg:SetTexture("")
|
||||||
E:Point(widget.skinnedCheckBG, "BOTTOMRIGHT", widget.checkbg, "BOTTOMRIGHT", -4, 4)
|
checkbg.SetTexture = E.noop
|
||||||
end
|
|
||||||
|
|
||||||
widget.check:SetParent(widget.skinnedCheckBG)
|
check:SetTexture(E.media.normTex)
|
||||||
|
check.SetTexture = E.noop
|
||||||
|
check:SetVertexColor(unpack(E.media.rgbvaluecolor))
|
||||||
|
E:SetInside(check, checkbg.backdrop)
|
||||||
|
check:SetParent(checkbg.backdrop)
|
||||||
|
|
||||||
|
highlight:SetTexture("")
|
||||||
|
highlight.SetTexture = E.noop
|
||||||
elseif TYPE == "Dropdown" then
|
elseif TYPE == "Dropdown" then
|
||||||
local frame = widget.dropdown
|
local frame = widget.dropdown
|
||||||
local button = widget.button
|
local button = widget.button
|
||||||
|
local button_cover = widget.button_cover
|
||||||
local text = widget.text
|
local text = widget.text
|
||||||
E:StripTextures(frame)
|
|
||||||
|
|
||||||
button:ClearAllPoints()
|
E:StripTextures(frame)
|
||||||
E:Point(button, "RIGHT", frame, "RIGHT", -20, 0)
|
|
||||||
|
|
||||||
S:HandleNextPrevButton(button, true)
|
S:HandleNextPrevButton(button, true)
|
||||||
|
|
||||||
if not frame.backdrop then
|
if not frame.backdrop then
|
||||||
E:CreateBackdrop(frame, "Default")
|
E:CreateBackdrop(frame, "Default")
|
||||||
E:Point(frame.backdrop, "TOPLEFT", 20, -2)
|
|
||||||
E:Point(frame.backdrop, "BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2)
|
|
||||||
end
|
end
|
||||||
button:SetParent(frame.backdrop)
|
|
||||||
text:SetParent(frame.backdrop)
|
|
||||||
HookScript(button, "OnClick", function()
|
|
||||||
local dropdown = this.obj.pullout
|
|
||||||
if dropdown.frame then
|
|
||||||
E:SetTemplate(dropdown.frame, "Default", true)
|
|
||||||
if dropdown.slider then
|
|
||||||
E:SetTemplate(dropdown.slider, "Default")
|
|
||||||
E:Point(dropdown.slider, "TOPRIGHT", dropdown.frame, "TOPRIGHT", -10, -10)
|
|
||||||
E:Point(dropdown.slider, "BOTTOMRIGHT", dropdown.frame, "BOTTOMRIGHT", -10, 10)
|
|
||||||
|
|
||||||
if dropdown.slider:GetThumbTexture() then
|
E:Point(frame.backdrop, "TOPLEFT", 15, -2)
|
||||||
dropdown.slider:SetThumbTexture(E["media"].blankTex)
|
E:Point(frame.backdrop, "BOTTOMRIGHT", -21, 0)
|
||||||
dropdown.slider:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3)
|
|
||||||
E:Size(dropdown.slider:GetThumbTexture(), 10, 12)
|
widget.label:ClearAllPoints()
|
||||||
end
|
E:Point(widget.label, "BOTTOMLEFT", frame.backdrop, "TOPLEFT", 2, 0)
|
||||||
end
|
|
||||||
end
|
E:Size(button, 20, 20)
|
||||||
end)
|
button:ClearAllPoints()
|
||||||
|
E:Point(button, "RIGHT", frame.backdrop, "RIGHT", -2, 0)
|
||||||
|
button:SetParent(frame.backdrop)
|
||||||
|
|
||||||
|
text:SetParent(frame.backdrop)
|
||||||
|
|
||||||
|
HookScript(button, "OnClick", SkinDropdownPullout)
|
||||||
|
|
||||||
|
if button_cover then
|
||||||
|
HookScript(button_cover, "OnClick", SkinDropdownPullout)
|
||||||
|
end
|
||||||
elseif TYPE == "LSM30_Font" or TYPE == "LSM30_Sound" or TYPE == "LSM30_Border" or TYPE == "LSM30_Background" or TYPE == "LSM30_Statusbar" then
|
elseif TYPE == "LSM30_Font" or TYPE == "LSM30_Sound" or TYPE == "LSM30_Border" or TYPE == "LSM30_Background" or TYPE == "LSM30_Statusbar" then
|
||||||
local frame = widget.frame
|
local frame = widget.frame
|
||||||
local button = frame.dropButton
|
local button = frame.dropButton
|
||||||
local text = frame.text
|
local text = frame.text
|
||||||
|
|
||||||
E:StripTextures(frame)
|
E:StripTextures(frame)
|
||||||
|
|
||||||
S:HandleNextPrevButton(button, true)
|
S:HandleNextPrevButton(button, true)
|
||||||
frame.text:ClearAllPoints()
|
|
||||||
E:Point(frame.text, "RIGHT", button, "LEFT", -2, 0)
|
|
||||||
|
|
||||||
button:ClearAllPoints()
|
|
||||||
E:Point(button, "RIGHT", frame, "RIGHT", -10, -6)
|
|
||||||
|
|
||||||
if not frame.backdrop then
|
if not frame.backdrop then
|
||||||
E:CreateBackdrop(frame, "Default")
|
E:CreateBackdrop(frame, "Default")
|
||||||
if TYPE == "LSM30_Font" then
|
|
||||||
E:Point(frame.backdrop, "TOPLEFT", 20, -17)
|
|
||||||
elseif TYPE == "LSM30_Sound" then
|
|
||||||
E:Point(frame.backdrop, "TOPLEFT", 20, -17)
|
|
||||||
widget.soundbutton:SetParent(frame.backdrop)
|
|
||||||
widget.soundbutton:ClearAllPoints()
|
|
||||||
E:Point(widget.soundbutton, "LEFT", frame.backdrop, "LEFT", 2, 0)
|
|
||||||
elseif TYPE == "LSM30_Statusbar" then
|
|
||||||
E:Point(frame.backdrop, "TOPLEFT", 20, -17)
|
|
||||||
widget.bar:SetParent(frame.backdrop)
|
|
||||||
E:SetInside(widget.bar)
|
|
||||||
elseif TYPE == "LSM30_Border" or TYPE == "LSM30_Background" then
|
|
||||||
E:Point(frame.backdrop, "TOPLEFT", 42, -16)
|
|
||||||
end
|
|
||||||
|
|
||||||
E:Point(frame.backdrop, "BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
frame.label:ClearAllPoints()
|
||||||
|
E:Point(frame.label, "BOTTOMLEFT", frame.backdrop, "TOPLEFT", 2, 0)
|
||||||
|
|
||||||
|
text:ClearAllPoints()
|
||||||
|
E:Point(text, "RIGHT", button, "LEFT", -2, 0)
|
||||||
|
|
||||||
|
E:Size(button, 20, 20)
|
||||||
|
button:ClearAllPoints()
|
||||||
|
E:Point(button, "RIGHT", frame.backdrop, "RIGHT", -2, 0)
|
||||||
|
|
||||||
|
E:Point(frame.backdrop, "TOPLEFT", 0, -21)
|
||||||
|
E:Point(frame.backdrop, "BOTTOMRIGHT", -4, -1)
|
||||||
|
|
||||||
|
if TYPE == "LSM30_Sound" then
|
||||||
|
widget.soundbutton:SetParent(frame.backdrop)
|
||||||
|
widget.soundbutton:ClearAllPoints()
|
||||||
|
E:Point(widget.soundbutton, "LEFT", frame.backdrop, "LEFT", 2, 0)
|
||||||
|
elseif TYPE == "LSM30_Statusbar" then
|
||||||
|
widget.bar:SetParent(frame.backdrop)
|
||||||
|
widget.bar:ClearAllPoints()
|
||||||
|
E:Point(widget.bar, "TOPLEFT", frame.backdrop, "TOPLEFT", 2, -2)
|
||||||
|
E:Point(widget.bar, "BOTTOMRIGHT", button, "BOTTOMLEFT", -1, 0)
|
||||||
|
--elseif TYPE == "LSM30_Border" or TYPE == "LSM30_Background" then -- Leave this here please. - Azilroka
|
||||||
|
end
|
||||||
|
|
||||||
button:SetParent(frame.backdrop)
|
button:SetParent(frame.backdrop)
|
||||||
text:SetParent(frame.backdrop)
|
text:SetParent(frame.backdrop)
|
||||||
HookScript(button, "OnClick", function()
|
|
||||||
local dropdown = this.obj.dropdown
|
HookScript(button, "OnClick", function(self)
|
||||||
|
local dropdown = self.obj.dropdown
|
||||||
if dropdown then
|
if dropdown then
|
||||||
E:SetTemplate(dropdown, "Default", true)
|
E:SetTemplate(dropdown, "Default", true)
|
||||||
if dropdown.slider then
|
if dropdown.slider then
|
||||||
@@ -216,14 +186,14 @@ function S:SkinAce3()
|
|||||||
E:Point(dropdown.slider, "BOTTOMRIGHT", dropdown, "BOTTOMRIGHT", -10, 10)
|
E:Point(dropdown.slider, "BOTTOMRIGHT", dropdown, "BOTTOMRIGHT", -10, 10)
|
||||||
|
|
||||||
if dropdown.slider:GetThumbTexture() then
|
if dropdown.slider:GetThumbTexture() then
|
||||||
dropdown.slider:SetThumbTexture(E["media"].blankTex)
|
dropdown.slider:SetThumbTexture(E.media.normTex)
|
||||||
dropdown.slider:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3)
|
dropdown.slider:GetThumbTexture():SetVertexColor(unpack(E.media.rgbvaluecolor))
|
||||||
E:Size(dropdown.slider:GetThumbTexture(), 10, 12)
|
E:Size(dropdown.slider:GetThumbTexture(), 10, 14)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if TYPE == "LSM30_Sound" then
|
if TYPE == "LSM30_Sound" then
|
||||||
local frame = this.obj.frame
|
local frame = self.obj.frame
|
||||||
local width = frame:GetWidth()
|
local width = frame:GetWidth()
|
||||||
E:Point(dropdown, "TOPLEFT", frame, "BOTTOMLEFT")
|
E:Point(dropdown, "TOPLEFT", frame, "BOTTOMLEFT")
|
||||||
E:Point(dropdown, "TOPRIGHT", frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 30, 0)
|
E:Point(dropdown, "TOPRIGHT", frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 30, 0)
|
||||||
@@ -233,35 +203,45 @@ function S:SkinAce3()
|
|||||||
elseif TYPE == "EditBox" then
|
elseif TYPE == "EditBox" then
|
||||||
local frame = widget.editbox
|
local frame = widget.editbox
|
||||||
local button = widget.button
|
local button = widget.button
|
||||||
|
|
||||||
E:Kill(_G[frame:GetName().."Left"])
|
E:Kill(_G[frame:GetName().."Left"])
|
||||||
E:Kill(_G[frame:GetName().."Middle"])
|
E:Kill(_G[frame:GetName().."Middle"])
|
||||||
E:Kill(_G[frame:GetName().."Right"])
|
E:Kill(_G[frame:GetName().."Right"])
|
||||||
|
|
||||||
E:Height(frame, 17)
|
E:Height(frame, 17)
|
||||||
E:CreateBackdrop(frame, "Default")
|
E:CreateBackdrop(frame, "Default")
|
||||||
E:Point(frame.backdrop, "TOPLEFT", -2, 0)
|
E:Point(frame.backdrop, "TOPLEFT", 2, -2)
|
||||||
E:Point(frame.backdrop, "BOTTOMRIGHT", 2, 0)
|
E:Point(frame.backdrop, "BOTTOMRIGHT", -2, 0)
|
||||||
frame.backdrop:SetParent(widget.frame)
|
frame.backdrop:SetParent(widget.frame)
|
||||||
frame:SetParent(frame.backdrop)
|
frame:SetParent(frame.backdrop)
|
||||||
|
frame:SetTextInsets(4, 43, 3, 3)
|
||||||
|
frame.SetTextInsets = E.noop
|
||||||
|
|
||||||
SkinButton(button)
|
SkinButton(button)
|
||||||
elseif TYPE == "Button" then
|
E:Point(button, "RIGHT", frame.backdrop, "RIGHT", -2, 0)
|
||||||
local frame = widget.frame
|
|
||||||
SkinButton(frame, nil, true)
|
hooksecurefunc(frame, "SetPoint", function(self, a, b, c, d, e)
|
||||||
E:StripTextures(frame)
|
if d == 7 then
|
||||||
E:CreateBackdrop(frame, "Default", true)
|
self:SetPoint(a, b, c, 0, e)
|
||||||
E:SetInside(frame.backdrop)
|
end
|
||||||
widget.text:SetParent(frame.backdrop)
|
end)
|
||||||
elseif TYPE == "Button-ElvUI" then
|
elseif TYPE == "Button" or TYPE == "Button-ElvUI" then
|
||||||
local frame = widget.frame
|
local frame = widget.frame
|
||||||
|
|
||||||
SkinButton(frame, nil, true)
|
SkinButton(frame, nil, true)
|
||||||
|
|
||||||
E:StripTextures(frame)
|
E:StripTextures(frame)
|
||||||
E:CreateBackdrop(frame, "Default", true)
|
E:CreateBackdrop(frame, "Default", true)
|
||||||
E:SetInside(frame.backdrop)
|
E:SetInside(frame.backdrop)
|
||||||
|
|
||||||
widget.text:SetParent(frame.backdrop)
|
widget.text:SetParent(frame.backdrop)
|
||||||
elseif TYPE == "Keybinding" then
|
elseif TYPE == "Keybinding" then
|
||||||
local button = widget.button
|
local button = widget.button
|
||||||
local msgframe = widget.msgframe
|
local msgframe = widget.msgframe
|
||||||
local msg = widget.msgframe.msg
|
local msg = widget.msgframe.msg
|
||||||
|
|
||||||
SkinButton(button)
|
SkinButton(button)
|
||||||
|
|
||||||
E:StripTextures(msgframe)
|
E:StripTextures(msgframe)
|
||||||
E:CreateBackdrop(msgframe, "Default", true)
|
E:CreateBackdrop(msgframe, "Default", true)
|
||||||
E:SetInside(msgframe.backdrop)
|
E:SetInside(msgframe.backdrop)
|
||||||
@@ -282,9 +262,10 @@ function S:SkinAce3()
|
|||||||
E:StripTextures(frame)
|
E:StripTextures(frame)
|
||||||
E:SetTemplate(frame, "Default")
|
E:SetTemplate(frame, "Default")
|
||||||
E:Height(frame, HEIGHT)
|
E:Height(frame, HEIGHT)
|
||||||
frame:SetThumbTexture(E["media"].blankTex)
|
|
||||||
frame:GetThumbTexture():SetVertexColor(0.3, 0.3, 0.3)
|
frame:SetThumbTexture(E.media.normTex)
|
||||||
E:Size(frame:GetThumbTexture(), HEIGHT-2, HEIGHT+2)
|
frame:GetThumbTexture():SetVertexColor(unpack(E.media.rgbvaluecolor))
|
||||||
|
E:Size(frame:GetThumbTexture(), HEIGHT - 2, HEIGHT - 2)
|
||||||
|
|
||||||
E:SetTemplate(editbox, "Default")
|
E:SetTemplate(editbox, "Default")
|
||||||
E:Height(editbox, 15)
|
E:Height(editbox, 15)
|
||||||
@@ -292,12 +273,37 @@ function S:SkinAce3()
|
|||||||
|
|
||||||
E:Point(lowtext, "TOPLEFT", frame, "BOTTOMLEFT", 2, -2)
|
E:Point(lowtext, "TOPLEFT", frame, "BOTTOMLEFT", 2, -2)
|
||||||
E:Point(hightext, "TOPRIGHT", frame, "BOTTOMRIGHT", -2, -2)
|
E:Point(hightext, "TOPRIGHT", frame, "BOTTOMRIGHT", -2, -2)
|
||||||
|
elseif (TYPE == "ColorPicker" or TYPE == "ColorPicker-ElvUI") then
|
||||||
--[[elseif TYPE == "ColorPicker" then
|
|
||||||
local frame = widget.frame
|
local frame = widget.frame
|
||||||
local colorSwatch = widget.colorSwatch
|
local colorSwatch = widget.colorSwatch
|
||||||
]]
|
|
||||||
|
if not frame.backdrop then
|
||||||
|
E:CreateBackdrop(frame, "Default")
|
||||||
|
end
|
||||||
|
|
||||||
|
E:Size(frame.backdrop, 16, 16)
|
||||||
|
frame.backdrop:ClearAllPoints()
|
||||||
|
E:Point(frame.backdrop, "LEFT", frame, "LEFT", 4, 0)
|
||||||
|
frame.backdrop:SetBackdropColor(0, 0, 0, 0)
|
||||||
|
frame.backdrop.SetBackdropColor = E.noop
|
||||||
|
|
||||||
|
colorSwatch:SetTexture(E.media.blankTex)
|
||||||
|
colorSwatch:ClearAllPoints()
|
||||||
|
colorSwatch:SetParent(frame.backdrop)
|
||||||
|
E:SetInside(colorSwatch, frame.backdrop)
|
||||||
|
|
||||||
|
if frame.texture then
|
||||||
|
frame.texture:SetTexture(0, 0, 0, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
if frame.checkers then
|
||||||
|
frame.checkers:ClearAllPoints()
|
||||||
|
frame.checkers:SetDrawLayer("ARTWORK")
|
||||||
|
frame.checkers:SetParent(frame.backdrop)
|
||||||
|
E:SetInside(frame.checkers, frame.backdrop)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return oldRegisterAsWidget(self, widget)
|
return oldRegisterAsWidget(self, widget)
|
||||||
end
|
end
|
||||||
AceGUI.RegisterAsWidget = RegisterAsWidget
|
AceGUI.RegisterAsWidget = RegisterAsWidget
|
||||||
@@ -309,32 +315,22 @@ function S:SkinAce3()
|
|||||||
end
|
end
|
||||||
local TYPE = widget.type
|
local TYPE = widget.type
|
||||||
if TYPE == "ScrollFrame" then
|
if TYPE == "ScrollFrame" then
|
||||||
local frame = widget.scrollbar
|
S:HandleScrollBar(widget.scrollbar)
|
||||||
SkinScrollBar(frame)
|
|
||||||
elseif TYPE == "InlineGroup" or TYPE == "TreeGroup" or TYPE == "TabGroup" or TYPE == "Frame" or TYPE == "DropdownGroup" or TYPE == "Window" then
|
elseif TYPE == "InlineGroup" or TYPE == "TreeGroup" or TYPE == "TabGroup" or TYPE == "Frame" or TYPE == "DropdownGroup" or TYPE == "Window" then
|
||||||
local frame = widget.content:GetParent()
|
local frame = widget.content:GetParent()
|
||||||
if TYPE == "Frame" then
|
if TYPE == "Frame" then
|
||||||
E:StripTextures(frame)
|
E:StripTextures(frame)
|
||||||
if(not E.GUIFrame) then
|
if not E.GUIFrame then
|
||||||
E.GUIFrame = frame
|
E.GUIFrame = frame
|
||||||
end
|
end
|
||||||
|
for i = 1, frame:GetNumChildren() do
|
||||||
for _, child in ipairs({frame:GetChildren()}) do
|
|
||||||
if child:GetObjectType() == "Button" and child:GetText() then
|
|
||||||
SkinButton(child)
|
|
||||||
else
|
|
||||||
E:StripTextures(child)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--[[for i=1, frame:GetNumChildren() do
|
|
||||||
local child = select(i, frame:GetChildren())
|
local child = select(i, frame:GetChildren())
|
||||||
if child:GetObjectType() == "Button" and child:GetText() then
|
if child:GetObjectType() == "Button" and child:GetText() then
|
||||||
SkinButton(child)
|
SkinButton(child)
|
||||||
else
|
else
|
||||||
E:StripTextures(child)
|
E:StripTextures(child)
|
||||||
end
|
end
|
||||||
end]]
|
end
|
||||||
elseif TYPE == "Window" then
|
elseif TYPE == "Window" then
|
||||||
E:StripTextures(frame)
|
E:StripTextures(frame)
|
||||||
S:HandleCloseButton(frame.obj.closebutton)
|
S:HandleCloseButton(frame.obj.closebutton)
|
||||||
@@ -345,19 +341,6 @@ function S:SkinAce3()
|
|||||||
E:SetTemplate(widget.treeframe, "Transparent")
|
E:SetTemplate(widget.treeframe, "Transparent")
|
||||||
E:Point(frame, "TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0)
|
E:Point(frame, "TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0)
|
||||||
|
|
||||||
local oldCreateButton = widget.CreateButton
|
|
||||||
widget.CreateButton = function(self)
|
|
||||||
local button = oldCreateButton(self)
|
|
||||||
E:StripTextures(button.toggle)
|
|
||||||
button.toggle.SetNormalTexture = E.noop
|
|
||||||
button.toggle.SetPushedTexture = E.noop
|
|
||||||
button.toggleText = button.toggle:CreateFontString(nil, "OVERLAY")
|
|
||||||
E:FontTemplate(button.toggleText, nil, 19)
|
|
||||||
E:Point(button.toggleText, "CENTER", 0, 0)
|
|
||||||
button.toggleText:SetText("+")
|
|
||||||
return button
|
|
||||||
end
|
|
||||||
|
|
||||||
local oldRefreshTree = widget.RefreshTree
|
local oldRefreshTree = widget.RefreshTree
|
||||||
widget.RefreshTree = function(self, scrollToSelection)
|
widget.RefreshTree = function(self, scrollToSelection)
|
||||||
oldRefreshTree(self, scrollToSelection)
|
oldRefreshTree(self, scrollToSelection)
|
||||||
@@ -366,13 +349,22 @@ function S:SkinAce3()
|
|||||||
local groupstatus = status.groups
|
local groupstatus = status.groups
|
||||||
local lines = self.lines
|
local lines = self.lines
|
||||||
local buttons = self.buttons
|
local buttons = self.buttons
|
||||||
|
local offset = status.scrollvalue
|
||||||
|
|
||||||
for i, line in pairs(lines) do
|
for i = offset + 1, getn(lines) do
|
||||||
local button = buttons[i]
|
local button = buttons[i - offset]
|
||||||
if groupstatus[line.uniquevalue] and button then
|
if button then
|
||||||
button.toggleText:SetText("-")
|
button.toggle:SetNormalTexture([[Interface\AddOns\ElvUI\media\textures\PlusMinusButton]])
|
||||||
elseif button then
|
button.toggle:SetPushedTexture([[Interface\AddOns\ElvUI\media\textures\PlusMinusButton]])
|
||||||
button.toggleText:SetText("+")
|
button.toggle:SetHighlightTexture("")
|
||||||
|
|
||||||
|
if groupstatus[lines[i].uniquevalue] then
|
||||||
|
button.toggle:GetNormalTexture():SetTexCoord(0.540, 0.965, 0.085, 0.920)
|
||||||
|
button.toggle:GetPushedTexture():SetTexCoord(0.540, 0.965, 0.085, 0.920)
|
||||||
|
else
|
||||||
|
button.toggle:GetNormalTexture():SetTexCoord(0.040, 0.465, 0.085, 0.920)
|
||||||
|
button.toggle:GetPushedTexture():SetTexCoord(0.040, 0.465, 0.085, 0.920)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -387,18 +379,19 @@ function S:SkinAce3()
|
|||||||
E:SetTemplate(tab.backdrop, "Transparent")
|
E:SetTemplate(tab.backdrop, "Transparent")
|
||||||
tab.backdrop:SetFrameLevel(tab:GetFrameLevel() - 1)
|
tab.backdrop:SetFrameLevel(tab:GetFrameLevel() - 1)
|
||||||
E:Point(tab.backdrop, "TOPLEFT", 10, -3)
|
E:Point(tab.backdrop, "TOPLEFT", 10, -3)
|
||||||
E:Point(tab.backdrop, "BOTTOMRIGHT", -10, 0)]]
|
E:Point(tab.backdrop, "BOTTOMRIGHT", -10, 0)--]]
|
||||||
|
|
||||||
return tab
|
return tab
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if widget.scrollbar then
|
if widget.scrollbar then
|
||||||
SkinScrollBar(widget.scrollbar)
|
S:HandleScrollBar(widget.scrollbar)
|
||||||
end
|
end
|
||||||
elseif TYPE == "SimpleGroup" then
|
elseif TYPE == "SimpleGroup" then
|
||||||
local frame = widget.content:GetParent()
|
local frame = widget.content:GetParent()
|
||||||
E:SetTemplate(frame, "Transparent", nil, true) --ignore border updates
|
E:SetTemplate(frame, "Transparent", nil, true) --ignore border updates
|
||||||
frame:SetBackdropBorderColor(0,0,0,0) --Make border completely transparent
|
frame:SetBackdropBorderColor(0, 0, 0, 0) --Make border completely transparent
|
||||||
end
|
end
|
||||||
|
|
||||||
return oldRegisterAsContainer(self, widget)
|
return oldRegisterAsContainer(self, widget)
|
||||||
|
|||||||
@@ -722,7 +722,7 @@ do
|
|||||||
self.text = text
|
self.text = text
|
||||||
text.obj = self
|
text.obj = self
|
||||||
text:ClearAllPoints()
|
text:ClearAllPoints()
|
||||||
text:SetPoint("RIGHT", right, "RIGHT" ,-43, 2)
|
text:SetPoint("RIGHT", right, "RIGHT" ,-46, 2)
|
||||||
text:SetPoint("LEFT", left, "LEFT", 25, 2)
|
text:SetPoint("LEFT", left, "LEFT", 25, 2)
|
||||||
|
|
||||||
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
|
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
|
||||||
|
|||||||
Reference in New Issue
Block a user