diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index f31043e..6e80712 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -1,6 +1,6 @@ ## Interface: 50400 ## Author: Munglunch -## Version: 4.073 +## Version: 4.074 ## Title: |cffFF9900SVUI|r ## Notes: Supervillain UI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global, SVUI_AuraFilters diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc index bbac951..3c6276e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 50400 ## Author: Munglunch, Elv -## Version: 4.073 +## Version: 4.074 ## Title: |cffFF9900SVUI |r|cffFFEF00Config O Matic|r ## Notes: Supervillain UI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/AceGUI-3.0.lua b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/AceGUI-3.0.lua index 1430aca..9853644 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/AceGUI-3.0.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/AceGUI-3.0.lua @@ -57,327 +57,6 @@ local WidgetRegistry = AceGUI.WidgetRegistry local LayoutRegistry = AceGUI.LayoutRegistry local WidgetVersions = AceGUI.WidgetVersions ---[[ SUPERVILLAIN MOD ]]-- -local function Ace3_OnEnter(b) - b:SetBackdropBorderColor(0,1,1) -end - -local function Ace3_OnLeave(b) - b:SetBackdropBorderColor(0,0,0,1) -end - -local function Ace3_PaginationStyle(button, isVertical) - if(not button or not button:GetName() or (button and button.appliedStyle)) then return end - local c,d,e; - local leftDown = (button:GetName() and (button:GetName():lower()):find('left')) or (button:GetName():lower()):find('prev') or (button:GetName():lower()):find('decrement') - button:Formula409() - button:SetNormalTexture(nil) - button:SetPushedTexture(nil) - button:SetHighlightTexture(nil) - button:SetDisabledTexture(nil) - if not button.icon then - button.icon=button:CreateTexture(nil,'ARTWORK') - button.icon:Size(13) - button.icon:SetPoint('CENTER') - button.icon:SetTexture([[Interface\Buttons\SquareButtonTextures]]) - button.icon:SetTexCoord(0.01562500,0.20312500,0.01562500,0.20312500) - button:SetScript('OnMouseDown',function(g) - if g:IsEnabled()then - g.icon:SetPoint("CENTER",-1,-1) - end - end) - button:SetScript('OnMouseUp',function(g) - g.icon:SetPoint("CENTER",0,0) - end) - button:SetScript('OnDisable',function(g) - SetDesaturation(g.icon,true) - g.icon:SetAlpha(0.5) - end) - button:SetScript('OnEnable',function(g) - SetDesaturation(g.icon,false) - g.icon:SetAlpha(1.0) - end) - if not button:IsEnabled()then - button:GetScript('OnDisable')(button) - end - end - if isVertical then - if leftDown then SquareButton_SetIcon(button,'UP')else SquareButton_SetIcon(button,'DOWN')end - else - if leftDown then SquareButton_SetIcon(button,'LEFT')else SquareButton_SetIcon(button,'RIGHT')end - end - button:SetButtonTemplate() - button:Size((button:GetWidth() - 7),(button:GetHeight() - 7)) - button.appliedStyle = true -end - -local function Ace3_ScrollStyle(e, f) - if _G[e:GetName().."BG"]then - _G[e:GetName().."BG"]:SetTexture(nil) - end - if _G[e:GetName().."Track"]then - _G[e:GetName().."Track"]:SetTexture(nil) - end - if _G[e:GetName().."Top"]then - _G[e:GetName().."Top"]:SetTexture(nil) - _G[e:GetName().."Bottom"]:SetTexture(nil) - _G[e:GetName().."Middle"]:SetTexture(nil) - end - if _G[e:GetName().."ScrollUpButton"] and _G[e:GetName().."ScrollDownButton"] then - _G[e:GetName().."ScrollUpButton"]:Formula409() - if not _G[e:GetName().."ScrollUpButton"].icon then - Ace3_PaginationStyle(_G[e:GetName().."ScrollUpButton"]) - SquareButton_SetIcon(_G[e:GetName().."ScrollUpButton"], "UP") - _G[e:GetName().."ScrollUpButton"]:Size(_G[e:GetName().."ScrollUpButton"]:GetWidth()+7, _G[e:GetName().."ScrollUpButton"]:GetHeight()+7) - end - _G[e:GetName().."ScrollDownButton"]:Formula409() - if not _G[e:GetName().."ScrollDownButton"].icon then - Ace3_PaginationStyle(_G[e:GetName().."ScrollDownButton"]) - SquareButton_SetIcon(_G[e:GetName().."ScrollDownButton"], "DOWN") - _G[e:GetName().."ScrollDownButton"]:Size(_G[e:GetName().."ScrollDownButton"]:GetWidth()+7, _G[e:GetName().."ScrollDownButton"]:GetHeight()+7) - end - if not e.styledBackground then - e.styledBackground = CreateFrame("Frame", nil, e) - e.styledBackground:Point("TOPLEFT", _G[e:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) - e.styledBackground:Point("BOTTOMRIGHT", _G[e:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) - e.styledBackground:SetPanelTemplate("Inset", true) - end - if e:GetThumbTexture()then - if not f then - f = 3 - end - e:GetThumbTexture():SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - end - end -end - -local function Ace3_ButtonStyle(h, i, j) - if h.Left then h.Left:SetAlpha(0)end - if h.Middle then h.Middle:SetAlpha(0)end - if h.Right then h.Right:SetAlpha(0)end - if h.SetNormalTexture then h:SetNormalTexture("")end - if h.SetHighlightTexture then h:SetHighlightTexture("")end - if h.SetPushedTexture then h:SetPushedTexture("")end - if h.SetDisabledTexture then h:SetDisabledTexture("")end - if i then h:Formula409()end - if not h.template and not j then h:SetFixedPanelTemplate("Button")end - h:HookScript("OnEnter", Ace3_OnEnter)h:HookScript("OnLeave", Ace3_OnLeave) -end - -local preWidget = function(self, widget) - local n = widget.type; - if n == "MultiLineEditBox"then - local e = widget.frame; - e:SetFixedPanelTemplate("Pattern") - if not widget.scrollBG.template then - widget.scrollBG:SetFixedPanelTemplate("Inset") - end - Ace3_ButtonStyle(widget.button) - Ace3_ScrollStyle(widget.scrollBar) - widget.scrollBar:SetPoint("RIGHT", e, "RIGHT", 0-4) - widget.scrollBG:SetPoint("TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) - widget.scrollBG:SetPoint("BOTTOMLEFT", widget.button, "TOPLEFT") - widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) - elseif n == "CheckBox"then - widget.checkbg:MUNG() - widget.highlight:MUNG() - if not widget.styledCheckBG then - widget.styledCheckBG = CreateFrame("Frame", nil, widget.frame) - widget.styledCheckBG:FillInner(widget.check) - widget.styledCheckBG:SetFixedPanelTemplate("Inset") - end - widget.check:SetParent(widget.styledCheckBG) - elseif n == "Dropdown"then - local e = widget.dropdown; - local o = widget.button; - local p = widget.text; - e:Formula409() - o:ClearAllPoints() - o:Point("RIGHT", e, "RIGHT", -20, 0) - o:SetFrameLevel(o:GetFrameLevel() + 1) - Ace3_PaginationStyle(o, true) - if not e.Panel then - e:SetPanelTemplate("Inset") - e.Panel:Point("TOPLEFT", e, "TOPLEFT", 20, -2) - e.Panel:Point("BOTTOMRIGHT", e, "BOTTOMRIGHT", -20, 2) - local level = e:GetFrameLevel() - if(level > 0) then - e.Panel:SetFrameLevel(level - 1) - else - e.Panel:SetFrameLevel(0) - end - end - o:SetParent(e.Panel) - p:SetParent(e.Panel) - o:HookScript("OnClick", function(s) - local self = s.obj; - self.pullout.frame:SetFixedPanelTemplate("Default") - end) - elseif n == "LSM30_Font" or n == "LSM30_Sound" or n == "LSM30_Border" or n == "LSM30_Background" or n == "LSM30_Statusbar" then - local e = widget.frame; - local o = e.dropButton; - local p = e.text; - e:Formula409() - Ace3_PaginationStyle(o, true) - e.text:ClearAllPoints() - e.text:Point("RIGHT", o, "LEFT", -2, 0) - o:ClearAllPoints() - o:Point("RIGHT", e, "RIGHT", -10, -6) - if not e.Panel then - e:SetFixedPanelTemplate("Inset") - if n == "LSM30_Font"then - e.Panel:Point("TOPLEFT", 20, -17) - elseif n == "LSM30_Sound"then - e.Panel:Point("TOPLEFT", 20, -17) - widget.soundbutton:SetParent(e.Panel) - widget.soundbutton:ClearAllPoints() - widget.soundbutton:Point("LEFT", e.Panel, "LEFT", 2, 0) - elseif n == "LSM30_Statusbar"then - e.Panel:Point("TOPLEFT", 20, -17) - widget.bar:SetParent(e.Panel) - widget.bar:FillInner() - elseif n == "LSM30_Border"or n == "LSM30_Background"then - e.Panel:Point("TOPLEFT", 42, -16) - end - e.Panel:Point("BOTTOMRIGHT", o, "BOTTOMRIGHT", 2, -2) - end - o:SetParent(e.Panel) - p:SetParent(e.Panel) - o:HookScript("OnClick", function(s, o) - local self = s.obj; - if(self.dropdown and not self.dropdown.Panel) then - local e = self.dropdown - e:SetPanelTemplate("Inset") - e.Panel:Point("TOPLEFT", e, "TOPLEFT", 20, -2) - e.Panel:Point("BOTTOMRIGHT", e, "BOTTOMRIGHT", -20, 2) - local level = e:GetFrameLevel() - if(level > 0) then - e.Panel:SetFrameLevel(level - 1) - else - e.Panel:SetFrameLevel(0) - end - end - end) - elseif n == "EditBox" then - local e = widget.editbox; - local o = widget.button; - _G[e:GetName().."Left"]:MUNG() - _G[e:GetName().."Middle"]:MUNG() - _G[e:GetName().."Right"]:MUNG() - e:Height(17) - e:SetFixedPanelTemplate("Inset") - local level = e:GetFrameLevel() - if(level > 0) then - e.Panel:SetFrameLevel(level - 1) - else - e.Panel:SetFrameLevel(0) - end - Ace3_ButtonStyle(o) - elseif n == "Button"then - local e = widget.frame; - Ace3_ButtonStyle(e, nil, true) - e:Formula409() - e:SetFixedPanelTemplate("Button", true) - e.Panel:FillInner() - widget.text:SetParent(e.Panel) - elseif n == "Slider"then - local e = widget.slider; - local t = widget.editbox; - local u = widget.lowtext; - local v = widget.hightext; - local w = 20; - e:Formula409() - e:SetFixedPanelTemplate("Inset") - e:Height(w) - e:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - e:GetThumbTexture():SetVertexColor(0.8, 0.8, 0.8) - t:SetFixedPanelTemplate("Inset") - t:Height(15) - t:Point("TOP", e, "BOTTOM", 0, -1) - u:SetPoint("TOPLEFT", e, "BOTTOMLEFT", 2, -2) - v:SetPoint("TOPRIGHT", e, "BOTTOMRIGHT", -2, -2) - end - return widget -end - -local externaltest = false; -local preContainer = function(self, widget) - local n = widget.type; - if n == "ScrollFrame" then - local e = widget.scrollbar; - Ace3_ScrollStyle(e) - elseif n == "Window" then - local e = widget.content:GetParent() - e:SetPanelTemplate("Halftone") - elseif n == "InlineGroup" or n == "TreeGroup" or n == "TabGroup" or n == "SimpleGroup" or n == "Frame" or n == "DropdownGroup" then - local e = widget.content:GetParent() - if n == "Frame" then - e:Formula409() - for z = 1, e:GetNumChildren()do - local A = select(z, e:GetChildren()) - if A:GetObjectType() == "Button"and A:GetText() then - Ace3_ButtonStyle(A) - else - A:Formula409() - end - end - end - if not widget.treeframe then - if not externaltest then - e:SetPanelTemplate("Halftone") - e.Panel:SetFrameLevel(0) - externaltest = true - else - e:SetFixedPanelTemplate("Default") - end - end - if widget.treeframe then - widget.treeframe:SetFixedPanelTemplate("Inset") - e:Point("TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) - local B = widget.CreateButton; - widget.CreateButton = function(self) - local o = B(self) - o.toggle:Formula409() - o.toggle.SetNormalTexture = NOOP; - o.toggle.SetPushedTexture = NOOP; - o.toggleText = o.toggle:CreateFontString(nil, "OVERLAY") - o.toggleText:SetFontTemplate(nil, 19) - o.toggleText:SetPoint("CENTER") - o.toggleText:SetText("+") - return o - end - local C = widget.RefreshTree; - widget.RefreshTree = function(self, D) - C(self, D) - if not self.tree then return end - local E = self.status or self.localstatus; - local F = E.groups; - local G = self.lines; - local H = self.buttons; - for z, I in pairs(G)do - local o = H[z] - if F[I.uniquevalue]and o then - o.toggleText:SetText("-") - elseif o then - o.toggleText:SetText("+") - end - end - end - end - if n == "TabGroup" then - local createTab = widget.CreateTab; - widget.CreateTab = function(self, arg) - local tab = createTab(self, arg) - tab:Formula409() - return tab - end - end - if widget.scrollbar then Ace3_ScrollStyle(widget.scrollbar) end - end - return widget -end ---[[ END MOD ]]-- - --[[ xpcall safecall implementation ]] @@ -840,7 +519,6 @@ do --- Register a widget-class as a container for newly created widgets. -- @param widget The widget class function AceGUI:RegisterAsContainer(widget) - widget = preContainer(self, widget) widget.children = {} widget.userdata = {} widget.events = {} @@ -857,7 +535,6 @@ do --- Register a widget-class as a widget. -- @param widget The widget class function AceGUI:RegisterAsWidget(widget) - widget = preWidget(self, widget) widget.userdata = {} widget.events = {} widget.base = WidgetBase diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index c03fdb1..b38efdc 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 50400 ## Author: Munglunch, Azilroka, Sortokk -## Version: 4.073 +## Version: 4.074 ## Title: |cffFF9900SVUI |r|cffFFEF00Style O Matic|r ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua index d2c3661..40778ed 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua @@ -15,29 +15,323 @@ S U P E R - V I L L A I N - U I By: Munglunch # --]] local SuperVillain, L = unpack(SVUI); local STYLE = _G.StyleVillain; -local NOOP = function() end --[[ ########################################################## ALERTFRAME STYLER ########################################################## ]]-- -local function SVUICoreStyle() - for i = 1, 4 do - local alert = _G["SVUI_SystemAlert"..i]; - if(alert) then - for b = 1, 3 do - alert.buttons[b]:SetButtonTemplate() +local function Widget_OnEnter(b) + b:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) +end; +local function Widget_OnLeave(b) + b:SetBackdropBorderColor(0,0,0,1) +end; +local function Widget_ScrollStyle(e, f) + if _G[e:GetName().."BG"]then + _G[e:GetName().."BG"]:SetTexture(nil) + end; + if _G[e:GetName().."Track"]then + _G[e:GetName().."Track"]:SetTexture(nil) + end; + if _G[e:GetName().."Top"]then + _G[e:GetName().."Top"]:SetTexture(nil) + _G[e:GetName().."Bottom"]:SetTexture(nil) + _G[e:GetName().."Middle"]:SetTexture(nil) + end; + if _G[e:GetName().."ScrollUpButton"] and _G[e:GetName().."ScrollDownButton"] then + _G[e:GetName().."ScrollUpButton"]:Formula409() + if not _G[e:GetName().."ScrollUpButton"].icon then + STYLE:ApplyPaginationStyle(_G[e:GetName().."ScrollUpButton"]) + SquareButton_SetIcon(_G[e:GetName().."ScrollUpButton"], "UP") + _G[e:GetName().."ScrollUpButton"]:Size(_G[e:GetName().."ScrollUpButton"]:GetWidth()+7, _G[e:GetName().."ScrollUpButton"]:GetHeight()+7) + end; + _G[e:GetName().."ScrollDownButton"]:Formula409() + if not _G[e:GetName().."ScrollDownButton"].icon then + STYLE:ApplyPaginationStyle(_G[e:GetName().."ScrollDownButton"]) + SquareButton_SetIcon(_G[e:GetName().."ScrollDownButton"], "DOWN") + _G[e:GetName().."ScrollDownButton"]:Size(_G[e:GetName().."ScrollDownButton"]:GetWidth()+7, _G[e:GetName().."ScrollDownButton"]:GetHeight()+7) + end; + if not e.styledBackground then + e.styledBackground = CreateFrame("Frame", nil, e) + e.styledBackground:Point("TOPLEFT", _G[e:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) + e.styledBackground:Point("BOTTOMRIGHT", _G[e:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) + e.styledBackground:SetPanelTemplate("Inset", true) + end; + if e:GetThumbTexture()then + if not f then + f = 3 end; - alert:Formula409() - STYLE:ApplyAlertStyle(alert) - alert.input:SetEditboxTemplate() - alert.input.Panel:Point("TOPLEFT", -2, -4) - alert.input.Panel:Point("BOTTOMRIGHT", 2, 4) - alert.gold:SetEditboxTemplate() - alert.silver:SetEditboxTemplate() - alert.copper:SetEditboxTemplate() + e:GetThumbTexture():SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + end + end +end; + +local function Widget_ButtonStyle(h, i, j) + if h.Left then h.Left:SetAlpha(0)end; + if h.Middle then h.Middle:SetAlpha(0)end; + if h.Right then h.Right:SetAlpha(0)end; + if h.SetNormalTexture then h:SetNormalTexture("")end; + if h.SetHighlightTexture then h:SetHighlightTexture("")end; + if h.SetPushedTexture then h:SetPushedTexture("")end; + if h.SetDisabledTexture then h:SetDisabledTexture("")end; + if i then h:Formula409()end; + if not h.template and not j then h:SetFixedPanelTemplate("Button")end; + h:HookScript("OnEnter", Widget_OnEnter)h:HookScript("OnLeave", Widget_OnLeave) +end; + +local function Widget_PaginationStyle(...) + STYLE:ApplyPaginationStyle(...) +end + +local function SVUICoreStyle(postLoad) + if(not postLoad) then + for i = 1, 4 do + local alert = _G["SVUI_SystemAlert"..i]; + if(alert) then + for b = 1, 3 do + alert.buttons[b]:SetButtonTemplate() + end; + alert:Formula409() + STYLE:ApplyAlertStyle(alert) + alert.input:SetEditboxTemplate() + alert.input.Panel:Point("TOPLEFT", -2, -4) + alert.input.Panel:Point("BOTTOMRIGHT", 2, 4) + alert.gold:SetEditboxTemplate() + alert.silver:SetEditboxTemplate() + alert.copper:SetEditboxTemplate() + end end end + + local AceGUI = LibStub("AceGUI-3.0", true) + if not AceGUI then + local h = CreateFrame("Frame") + h:RegisterEvent("ADDON_LOADED") + h:SetScript("OnEvent", function(b, M, N) + if LibStub("AceGUI-3.0", true) then + SVUICoreStyle(true) + b:UnregisterEvent("ADDON_LOADED") + end + end) + return + end + + local regWidget = AceGUI.RegisterAsWidget; + local regContainer = AceGUI.RegisterAsContainer; + + AceGUI.RegisterAsWidget = function(self, widget) + local n = widget.type; + if n == "MultiLineEditBox"then + local e = widget.frame; + e:SetFixedPanelTemplate("Pattern") + if not widget.scrollBG.template then + widget.scrollBG:SetFixedPanelTemplate("Inset") + end + Widget_ButtonStyle(widget.button) + Widget_ScrollStyle(widget.scrollBar) + widget.scrollBar:SetPoint("RIGHT", e, "RIGHT", 0-4) + widget.scrollBG:SetPoint("TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) + widget.scrollBG:SetPoint("BOTTOMLEFT", widget.button, "TOPLEFT") + widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) + elseif n == "CheckBox"then + widget.checkbg:MUNG() + widget.highlight:MUNG() + if not widget.styledCheckBG then + widget.styledCheckBG = CreateFrame("Frame", nil, widget.frame) + widget.styledCheckBG:FillInner(widget.check) + widget.styledCheckBG:SetFixedPanelTemplate("Inset") + end + widget.check:SetParent(widget.styledCheckBG) + elseif n == "Dropdown"then + local e = widget.dropdown; + local o = widget.button; + local p = widget.text; + e:Formula409() + o:ClearAllPoints() + o:Point("RIGHT", e, "RIGHT", -20, 0) + o:SetFrameLevel(o:GetFrameLevel() + 1) + Widget_PaginationStyle(o, true) + if not e.Panel then + e:SetPanelTemplate("Inset") + e.Panel:Point("TOPLEFT", e, "TOPLEFT", 20, -2) + e.Panel:Point("BOTTOMRIGHT", e, "BOTTOMRIGHT", -20, 2) + local level = e:GetFrameLevel() + if(level > 0) then + e.Panel:SetFrameLevel(level - 1) + else + e.Panel:SetFrameLevel(0) + end + end + o:SetParent(e.Panel) + p:SetParent(e.Panel) + o:HookScript("OnClick", function(s) + local self = s.obj; + self.pullout.frame:SetFixedPanelTemplate("Default") + end) + elseif n == "LSM30_Font" or n == "LSM30_Sound" or n == "LSM30_Border" or n == "LSM30_Background" or n == "LSM30_Statusbar" then + local e = widget.frame; + local o = e.dropButton; + local p = e.text; + e:Formula409() + Widget_PaginationStyle(o, true) + e.text:ClearAllPoints() + e.text:Point("RIGHT", o, "LEFT", -2, 0) + o:ClearAllPoints() + o:Point("RIGHT", e, "RIGHT", -10, -6) + if not e.Panel then + e:SetFixedPanelTemplate("Inset") + if n == "LSM30_Font"then + e.Panel:Point("TOPLEFT", 20, -17) + elseif n == "LSM30_Sound"then + e.Panel:Point("TOPLEFT", 20, -17) + widget.soundbutton:SetParent(e.Panel) + widget.soundbutton:ClearAllPoints() + widget.soundbutton:Point("LEFT", e.Panel, "LEFT", 2, 0) + elseif n == "LSM30_Statusbar"then + e.Panel:Point("TOPLEFT", 20, -17) + widget.bar:SetParent(e.Panel) + widget.bar:FillInner() + elseif n == "LSM30_Border"or n == "LSM30_Background"then + e.Panel:Point("TOPLEFT", 42, -16) + end + e.Panel:Point("BOTTOMRIGHT", o, "BOTTOMRIGHT", 2, -2) + end + o:SetParent(e.Panel) + p:SetParent(e.Panel) + o:HookScript("OnClick", function(s, o) + local self = s.obj; + if(self.dropdown and not self.dropdown.Panel) then + local e = self.dropdown + e:SetPanelTemplate("Inset") + e.Panel:Point("TOPLEFT", e, "TOPLEFT", 20, -2) + e.Panel:Point("BOTTOMRIGHT", e, "BOTTOMRIGHT", -20, 2) + local level = e:GetFrameLevel() + if(level > 0) then + e.Panel:SetFrameLevel(level - 1) + else + e.Panel:SetFrameLevel(0) + end + end + end) + elseif n == "EditBox" then + local e = widget.editbox; + local o = widget.button; + _G[e:GetName().."Left"]:MUNG() + _G[e:GetName().."Middle"]:MUNG() + _G[e:GetName().."Right"]:MUNG() + e:Height(17) + e:SetFixedPanelTemplate("Inset") + local level = e:GetFrameLevel() + if(level > 0) then + e.Panel:SetFrameLevel(level - 1) + else + e.Panel:SetFrameLevel(0) + end + Widget_ButtonStyle(o) + elseif n == "Button"then + local e = widget.frame; + Widget_ButtonStyle(e, nil, true) + e:Formula409() + e:SetFixedPanelTemplate("Button", true) + e.Panel:FillInner() + widget.text:SetParent(e.Panel) + elseif n == "Slider"then + local e = widget.slider; + local t = widget.editbox; + local u = widget.lowtext; + local v = widget.hightext; + local w = 20; + e:Formula409() + e:SetFixedPanelTemplate("Inset") + e:Height(w) + e:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + e:GetThumbTexture():SetVertexColor(0.8, 0.8, 0.8) + t:SetFixedPanelTemplate("Inset") + t:Height(15) + t:Point("TOP", e, "BOTTOM", 0, -1) + u:SetPoint("TOPLEFT", e, "BOTTOMLEFT", 2, -2) + v:SetPoint("TOPRIGHT", e, "BOTTOMRIGHT", -2, -2) + end + return regWidget(self, widget) + end + + local externaltest = false; + + AceGUI.RegisterAsContainer = function(self, widget) + local n = widget.type; + if n == "ScrollFrame" then + local e = widget.scrollbar; + Widget_ScrollStyle(e) + elseif n == "Window" then + local e = widget.content:GetParent() + e:SetPanelTemplate("Halftone") + elseif n == "InlineGroup" or n == "TreeGroup" or n == "TabGroup" or n == "SimpleGroup" or n == "Frame" or n == "DropdownGroup" then + local e = widget.content:GetParent() + if n == "Frame" then + e:Formula409() + for z = 1, e:GetNumChildren()do + local A = select(z, e:GetChildren()) + if A:GetObjectType() == "Button"and A:GetText() then + Widget_ButtonStyle(A) + else + A:Formula409() + end + end + end + if not widget.treeframe then + if not externaltest then + e:SetPanelTemplate("Halftone") + e.Panel:SetFrameLevel(0) + externaltest = true + else + e:SetFixedPanelTemplate("Default") + end + end + if widget.treeframe then + widget.treeframe:SetFixedPanelTemplate("Inset") + e:Point("TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) + local B = widget.CreateButton; + widget.CreateButton = function(self) + local o = B(self) + o.toggle:Formula409() + o.toggle.SetNormalTexture = NOOP; + o.toggle.SetPushedTexture = NOOP; + o.toggleText = o.toggle:CreateFontString(nil, "OVERLAY") + o.toggleText:SetFontTemplate(nil, 19) + o.toggleText:SetPoint("CENTER") + o.toggleText:SetText("+") + return o + end + local C = widget.RefreshTree; + widget.RefreshTree = function(self, D) + C(self, D) + if not self.tree then return end + local E = self.status or self.localstatus; + local F = E.groups; + local G = self.lines; + local H = self.buttons; + for z, I in pairs(G)do + local o = H[z] + if F[I.uniquevalue]and o then + o.toggleText:SetText("-") + elseif o then + o.toggleText:SetText("+") + end + end + end + end + if n == "TabGroup" then + local createTab = widget.CreateTab; + widget.CreateTab = function(self, arg) + local tab = createTab(self, arg) + tab:Formula409() + return tab + end + end + if widget.scrollbar then Widget_ScrollStyle(widget.scrollbar) end + end + return regContainer(self, widget) + end end --[[ ##########################################################