diff --git a/SVUI_!Core/system/_reports/system.lua b/SVUI_!Core/system/_reports/system.lua index 6e20203..a61d4eb 100644 --- a/SVUI_!Core/system/_reports/system.lua +++ b/SVUI_!Core/system/_reports/system.lua @@ -3,7 +3,7 @@ S V U I By: Munglunch ############################################################################## -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -23,27 +23,16 @@ local floor = math.floor local tsort = table.sort; local IsShiftKeyDown = _G.IsShiftKeyDown; local IsAddOnLoaded = _G.IsAddOnLoaded; -local GetNumAddOns = _G.GetNumAddOns; -local GetAddOnInfo = _G.GetAddOnInfo; -local GetFramerate = _G.GetFramerate; -local GetNetStats = _G.GetNetStats; -local GetAddOnCPUUsage = _G.GetAddOnCPUUsage; -local GetAddOnMemoryUsage = _G.GetAddOnMemoryUsage; -local ResetCPUUsage = _G.ResetCPUUsage; -local UpdateAddOnCPUUsage = _G.UpdateAddOnCPUUsage; -local UpdateAddOnMemoryUsage = _G.UpdateAddOnMemoryUsage; -local GetAvailableBandwidth = _G.GetAvailableBandwidth; -local GetDownloadedPercentage = _G.GetDownloadedPercentage; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- local SV = select(2, ...) local L = SV.L; local Reports = SV.Reports; ---[[ -########################################################## +--[[ +########################################################## SYSTEM STATS (Credit: Elv) ########################################################## ]]-- @@ -113,15 +102,15 @@ local function UpdateCPU() for i = 1, #cpuTable do addonCPU = GetAddOnCPUUsage(cpuTable[i][1]) cpuTable[i][3] = addonCPU - totalCPU = totalCPU + addonCPU + totalCPU = totalCPU + addonCPU end - + tsort(cpuTable, function(a, b) if a and b then return a[3] > b[3] end - end) - + end) + return totalCPU end @@ -141,11 +130,11 @@ Report.OnEnter = function(self) local cpuProfiling = false Reports:SetDataTip(self) - UpdateMemory() + UpdateMemory() bandwidth = GetAvailableBandwidth() - + Reports.ToolTip:AddDoubleLine(L['Home Latency:'], homeLatencyString:format(select(3, GetNetStats())), 0.69, 0.31, 0.31,0.84, 0.75, 0.65) - + if bandwidth ~= 0 then local percent = GetDownloadedPercentage() percent = percent * 100 @@ -153,14 +142,14 @@ Report.OnEnter = function(self) Reports.ToolTip:AddDoubleLine(L['Download'] , percentageString:format(percent), 0.69, 0.31, 0.31, 0.84, 0.75, 0.65) Reports.ToolTip:AddLine(" ") end - + local totalCPU = nil Reports.ToolTip:AddDoubleLine(L['Total Memory:'], formatMem(totalMemory), 0.69, 0.31, 0.31,0.84, 0.75, 0.65) if cpuProfiling then totalCPU = UpdateCPU() Reports.ToolTip:AddDoubleLine(L['Total CPU:'], homeLatencyString:format(totalCPU), 0.69, 0.31, 0.31,0.84, 0.75, 0.65) end - + local red, green if IsShiftKeyDown() or not cpuProfiling then Reports.ToolTip:AddLine(" ") @@ -169,10 +158,10 @@ Report.OnEnter = function(self) red = memoryTable[i][3] / totalMemory green = 1 - red Reports.ToolTip:AddDoubleLine(memoryTable[i][2], formatMem(memoryTable[i][3]), 1, 1, 1, red, green + .5, 0) - end + end end end - + if cpuProfiling and not IsShiftKeyDown() then Reports.ToolTip:AddLine(" ") for i = 1, #cpuTable do @@ -180,13 +169,13 @@ Report.OnEnter = function(self) red = cpuTable[i][3] / totalCPU green = 1 - red Reports.ToolTip:AddDoubleLine(cpuTable[i][2], homeLatencyString:format(cpuTable[i][3]), 1, 1, 1, red, green + .5, 0) - end + end end Reports.ToolTip:AddLine(" ") Reports.ToolTip:AddLine(L['(Hold Shift) Memory Usage']) end - + Reports.ToolTip:Show() end @@ -198,23 +187,23 @@ end Report.OnUpdate = function(self, elapsed) int = int - elapsed int2 = int2 - elapsed - + if int < 0 then RebuildAddonList() int = 10 end if int2 < 0 then local framerate = floor(GetFramerate()) - local latency = select(4, GetNetStats()) - - self.text:SetFormattedText("FPS: %s%d|r MS: %s%d|r", - statusColors[framerate >= 30 and 1 or (framerate >= 20 and framerate < 30) and 2 or (framerate >= 10 and framerate < 20) and 3 or 4], - framerate, - statusColors[latency < 150 and 1 or (latency >= 150 and latency < 300) and 2 or (latency >= 300 and latency < 500) and 3 or 4], + local latency = select(4, GetNetStats()) + + self.text:SetFormattedText("FPS: %s%d|r MS: %s%d|r", + statusColors[framerate >= 30 and 1 or (framerate >= 20 and framerate < 30) and 2 or (framerate >= 10 and framerate < 20) and 3 or 4], + framerate, + statusColors[latency < 150 and 1 or (latency >= 150 and latency < 300) and 2 or (latency >= 300 and latency < 500) and 3 or 4], latency) int2 = 1 if enteredFrame then Report.OnEnter(self) - end + end end -end \ No newline at end of file +end diff --git a/SVUI_!Core/system/api.lua b/SVUI_!Core/system/api.lua index efd44a6..04f5ff8 100644 --- a/SVUI_!Core/system/api.lua +++ b/SVUI_!Core/system/api.lua @@ -77,12 +77,12 @@ MOD.Templates = { ["Default"] = "SVUI_CoreStyle_Default", ["Transparent"] = "SVUI_CoreStyle_Transparent", ["Button"] = "SVUI_CoreStyle_Button", + ["CheckButton"] = "SVUI_CoreStyle_CheckButton", ["DockButton"] = "SVUI_CoreStyle_DockButton", ["ActionSlot"] = "SVUI_CoreStyle_ActionSlot", ["Lite"] = "SVUI_CoreStyle_Lite", ["Icon"] = "SVUI_CoreStyle_Icon", ["Bar"] = "SVUI_CoreStyle_Bar", - ["Checkbox"] = "SVUI_CoreStyle_Checkbox", ["Inset"] = "SVUI_CoreStyle_Inset", ["Blackout"] = "SVUI_CoreStyle_Blackout", ["Component"] = "SVUI_CoreStyle_Component", @@ -288,11 +288,6 @@ local SecureFade_OnUpdate = function(self, elasped) frame.___fadefunc = nil end end - if(frame.___fadeshowfunc and frame.___fademode == "IN") then - local _, catch = pcall(frame.___fadeshowfunc, frame) - elseif(frame.___fadehidefunc and frame.___fademode == "OUT") then - local _, catch = pcall(frame.___fadehidefunc, frame) - end else frame:SetAlpha(state[2]) FRAMES_TO_HIDE[frame] = true; @@ -305,11 +300,6 @@ local SecureFade_OnUpdate = function(self, elasped) frame.___fadefunc = nil end end - if(frame.___fadeshowfunc and frame.___fademode == "IN") then - local _, catch = pcall(frame.___fadeshowfunc, frame) - elseif(frame.___fadehidefunc and frame.___fademode == "OUT") then - local _, catch = pcall(frame.___fadehidefunc, frame) - end end self.Running = false; @@ -344,7 +334,7 @@ local SecureFadeIn = function(self, duration, alphaStart, alphaEnd) self.___fademode = "IN"; self.___fadehide = nil; - self.___fadefunc = nil; + self.___fadefunc = self.___fadeshowfunc; if(not self.___fadeset) then self.___fadeset = {}; @@ -378,7 +368,7 @@ local SecureFadeOut = function(self, duration, alphaStart, alphaEnd, hideOnFinis self.___fademode = "OUT"; self.___fadehide = hideOnFinished; - self.___fadefunc = nil; + self.___fadefunc = self.___fadehidefunc; if(not self.___fadeset) then self.___fadeset = {}; @@ -398,12 +388,11 @@ end local SecureFadeCallback = function(self, callback, alwaysOnHide, alwaysOnShow) if(alwaysOnHide) then - self.___fadehidefunc = callback; + self.___fadehidefunc = callback; elseif(alwaysOnShow) then - self.___fadeshowfunc = callback; - else - self.___fadefunc = callback; + self.___fadeshowfunc = callback; end + self.___fadefunc = callback; end --[[ ########################################################## @@ -959,7 +948,7 @@ MOD.Methods["ActionSlot"] = function(self, frame, inverse, addChecked) CommonButtonSettings(frame, addChecked, true) end; -MOD.Methods["Checkbox"] = function(self, frame, inverse, x, y) +MOD.Methods["CheckButton"] = function(self, frame, inverse, x, y) if(not frame or (frame and frame.Panel)) then return end local width, height = frame:GetSize() @@ -968,7 +957,7 @@ MOD.Methods["Checkbox"] = function(self, frame, inverse, x, y) frame:SetSize(width, height) local underlay = (not inverse) - self:APPLY(frame, "Checkbox", inverse, 1, 1, 1) + self:APPLY(frame, "CheckButton", inverse, 1, 1, 1) if(frame.SetNormalTexture) then frame:SetNormalTexture("") @@ -1488,6 +1477,14 @@ MOD.Concepts["Window"] = function(self, adjustable, frame, altStyle, fullStrip, frame:SetFrameLevel(1) end RemoveTextures(frame, fullStrip) + local name = frame:GetName() + if(name and _G[name.."BtnCornerLeft"]) then + _G[name.."BtnCornerLeft"]:SetTexture(""); + _G[name.."BtnCornerRight"]:SetTexture(""); + _G[name.."ButtonBottomBorder"]:SetTexture(""); + frame.Inset.Bg:Hide(); + frame.Inset:DisableDrawLayer("BORDER"); + end self.Methods["Frame"](self, frame, (not adjustable), template, false, padding, xOffset, yOffset) end @@ -1496,6 +1493,11 @@ MOD.Concepts["Button"] = function(self, adjustable, frame) self.Methods["Button"](self, frame, adjustable) end +MOD.Concepts["CheckButton"] = function(self, adjustable, frame) + if(not frame or (frame and frame.Panel)) then return end + self.Methods["CheckButton"](self, frame, adjustable) +end + MOD.Concepts["CloseButton"] = function(self, adjustable, frame, targetAnchor) if(not frame or (frame and frame.Panel)) then return end diff --git a/SVUI_!Core/system/dock.lua b/SVUI_!Core/system/dock.lua index 8c5c68e..981d1f4 100644 --- a/SVUI_!Core/system/dock.lua +++ b/SVUI_!Core/system/dock.lua @@ -79,9 +79,9 @@ local DOCK_LOCATIONS = { ["TopLeft"] = {1, "LEFT", false, "ANCHOR_BOTTOMLEFT"}, ["TopRight"] = {-1, "RIGHT", false, "ANCHOR_BOTTOMLEFT"}, }; -DOCK_DROPDOWN_OPTIONS["BottomLeft"] = { text = "To BottomLeft", func = function(button) button:MoveTo("BottomLeft"); end }; -DOCK_DROPDOWN_OPTIONS["BottomRight"] = { text = "To BottomRight", func = function(button) button:MoveTo("BottomRight"); end }; -DOCK_DROPDOWN_OPTIONS["TopLeft"] = { text = "To TopLeft", func = function(button) button:MoveTo("TopLeft"); end }; +DOCK_DROPDOWN_OPTIONS["BottomLeft"] = { text = "To BottomLeft", func = function(button) MOD.BottomLeft.Bar:Add(button); end }; +DOCK_DROPDOWN_OPTIONS["BottomRight"] = { text = "To BottomRight", func = function(button) MOD.BottomRight.Bar:Add(button); end }; +DOCK_DROPDOWN_OPTIONS["TopLeft"] = { text = "To TopLeft", func = function(button) MOD.TopLeft.Bar:Add(button); end }; --DOCK_DROPDOWN_OPTIONS["TopRight"] = { text = "To TopRight", func = function(button) MOD.TopRight.Bar:Add(button) end }; --[[ ########################################################## @@ -418,51 +418,45 @@ local function ActivateDockletButton(button) end end -local function ShowDockletWindow(parent, window, button) - if((not parent) or (not window)) then return end - parent.Window.FrameLink = window; - parent.Window:Show(); - parent.Window:FadeIn(); - parent.backdrop:Show(); - if(not window:IsShown()) then - if(not InCombatLockdown()) then - window:SetFrameLevel(10) - window:Show() - end - if(button and button.PostShowCallback) then - button:PostShowCallback() - end +local function ShowDockletWindow(holder, window) + if((not holder) or (not window)) then return end + holder.FrameLink = window; + holder:Show(); + holder:FadeIn(); + if(not InCombatLockdown()) then + window:SetFrameLevel(10) + window:Show() end window:FadeIn() end -local function HideDockletWindow(window, button) +local function HideDockletWindow(window) if(not window) then return end if(not InCombatLockdown()) then window:SetFrameLevel(0) window:Hide() + else + window:FadeOut(0.2, 1, 0, true) end - window:FadeOut(0.1, 1, 0, true) - if(button and button.PostHideCallback) then - button:PostHideCallback() +end + +local DockBar_ResetDocklets = function(self) + self.Parent.backdrop:Hide(); + for name,window in pairs(self.Data.Windows) do + HideDockletWindow(window) end end -local DockBar_ResetDocklets = function(self, button) +local DockBar_RefreshDocklets = function(self) local location = self.Data.Location; - local buttonList = self.Data.Buttons; - local currentButton = ""; - if(button and button.GetName) then - currentButton = button:GetName() - end - self.Parent.backdrop:Hide(); - for nextName,nextButton in pairs(buttonList) do - if(nextName ~= currentButton) then - local ownerFrame = nextButton:GetAttribute("ownerFrame"); - local window = _G[ownerFrame] - if(window) then - HideDockletWindow(window, nextButton) - end + local ownerFrame = "" + local defaultButton = MOD.private.DefaultDocklets[location]; + if(_G[defaultButton]) then + ownerFrame = _G[defaultButton]:GetAttribute("ownerFrame") + end + for name,window in pairs(self.Data.Windows) do + if(name ~= ownerFrame) then + HideDockletWindow(window) end end end @@ -489,8 +483,8 @@ local DockBar_SetDefault = function(self, button) end if(button and defaultFrame) then - DockBar_ResetDocklets(self, button); - ShowDockletWindow(self.Parent, defaultFrame, button); + DockBar_ResetDocklets(self); + ShowDockletWindow(self.Parent.Window, defaultFrame); ActivateDockletButton(button); end @@ -504,8 +498,8 @@ local DockBar_NextDefault = function(self) local ownerFrame = nextButton:GetAttribute("ownerFrame"); if(_G[ownerFrame]) then MOD.private.DefaultDocklets[location] = nextName; - DockBar_ResetDocklets(self, nextButton) - ShowDockletWindow(self.Parent, _G[ownerFrame], nextButton); + DockBar_ResetDocklets(self) + ShowDockletWindow(self.Parent.Window, _G[ownerFrame]); ActivateDockletButton(nextButton); break; end @@ -748,20 +742,13 @@ local DockButton_OnClick = function(self, button) MOD.ButtonSound() if(button and button == "RightButton") then self.Parent.Parent.backdrop:Hide() - self:SetAttribute("isActive", false) - self:SetPanelColor("default") - if(self.Icon) then - self.Icon:SetGradient(unpack(SV.media.gradient.icon)); - end - local ownerFrame = self:GetAttribute("ownerFrame") - local window = _G[ownerFrame] - HideDockletWindow(window, self) + self:Deactivate() else if(IsAltKeyDown() and (not InCombatLockdown()) and self:GetAttribute("hasDropDown") and self.GetMenuList) then local list = self:GetMenuList(); SV.Dropdown:Open(self, list, "Dock Options"); else - local thisIsShowing = DockBar_SetDefault(self.Parent, self) + local thisIsShowing = DockBar_SetDefault(self, button) if(self.PostClickFunction and thisIsShowing) then self:PostClickFunction(button) end @@ -824,15 +811,6 @@ local DockButton_SetDocked = function(self, attach) self.Parent:Remove(self) end end - -local DockButton_MoveTo = function(self, location) - if(not MOD[location]) then return end - MOD[location].Bar:Add(self); - - if(self.PostMoveCallback) then - self:PostMoveCallback() - end -end --[[ ########################################################## REMAINING DOCKBAR FUNCTIONS @@ -870,7 +848,6 @@ local DockBar_CreateButton = function(self, displayName, texture, onclick, globa button.Parent = self; button.OrderIndex = 0; - button.MoveTo = DockButton_MoveTo button.GetMenuList = DockButton_GetMenuList button.SetDocked = DockButton_SetDocked @@ -912,7 +889,7 @@ MOD.BottomCenter = _G["SVUI_DockBottomCenter"]; local DockBar_OnEvent = function(self, event) if(event == 'PLAYER_REGEN_ENABLED') then self:UnregisterEvent("PLAYER_REGEN_ENABLED") - DockBar_SetDefault(self) + DockBar_ResetDocklets(self) end end @@ -1320,7 +1297,7 @@ function MOD:Load() dock.Window:ClearAllPoints() dock.Window:SetSize(width, height) - dock.Window:SetPoint(anchor, dock.Alert, reverse, 0, 4) + dock.Window:SetPoint(anchor, dock.Alert, reverse, 0, (4 * vertMod)) dock.backdrop = self.SetThemeDockStyle(dock.Window, isBottom) dock.backdrop:Hide() dock.Alert.backdrop = self.SetThemeDockStyle(dock.Alert, isBottom) @@ -1351,10 +1328,10 @@ function MOD:Load() self.BottomCenter:SetSize(centerWidth, dockHeight) self.BottomCenter:SetPoint("BOTTOM", SV.Screen, "BOTTOM", 0, 0) - DockBar_SetDefault(self.BottomLeft.Bar) - DockBar_SetDefault(self.BottomRight.Bar) - DockBar_SetDefault(self.TopLeft.Bar) - DockBar_SetDefault(self.TopRight.Bar) + DockBar_ResetDocklets(self.BottomLeft.Bar) + DockBar_ResetDocklets(self.BottomRight.Bar) + DockBar_ResetDocklets(self.TopLeft.Bar) + DockBar_ResetDocklets(self.TopRight.Bar) self:LoadProfessionTools(); self:LoadAllMiscTools(); diff --git a/SVUI_!Core/system/misc.lua b/SVUI_!Core/system/misc.lua index ce840ac..901dfc7 100644 --- a/SVUI_!Core/system/misc.lua +++ b/SVUI_!Core/system/misc.lua @@ -458,7 +458,7 @@ do HelmetToggle = CreateFrame('CheckButton', nil, CharacterModelFrame, "OptionsCheckButtonTemplate") HelmetToggle:SetSize(16, 16) - HelmetToggle:SetStyle("Checkbox") + HelmetToggle:SetStyle("CheckButton") HelmetToggle.text = HelmetToggle:CreateFontString(nil, 'OVERLAY', "GameFontNormal") HelmetToggle.text:SetPoint("LEFT", 24, 0) HelmetToggle.TText = "Show/Hide Helmet" @@ -468,7 +468,7 @@ do CloakToggle = CreateFrame('CheckButton', nil, CharacterModelFrame, "OptionsCheckButtonTemplate") CloakToggle:SetSize(16, 16) - CloakToggle:SetStyle("Checkbox") + CloakToggle:SetStyle("CheckButton") CloakToggle.text = CloakToggle:CreateFontString(nil, 'OVERLAY', "GameFontNormal") CloakToggle.text:SetPoint("LEFT", 24, 0) CloakToggle.TText = "Show/Hide Cloak" @@ -831,15 +831,15 @@ local function InitializeMisc() end local cfg = CreateFrame("Button", "GameMenuButtonSVUI", GameMenuFrame, "GameMenuButtonTemplate") - cfg:SetSize(GameMenuButtonHelp:GetWidth(), GameMenuButtonHelp:GetHeight()) - cfg:SetPoint(GameMenuButtonHelp:GetPoint()) + cfg:Size(GameMenuButtonUIOptions:GetWidth(), GameMenuButtonUIOptions:GetHeight()) + cfg:Point("TOP", GameMenuButtonUIOptions, "BOTTOM", 0 , -1) cfg:SetScript("OnClick", function() SV:ToggleConfig() HideUIPanel(GameMenuFrame) end) - cfg:SetText("|cffFF9900SuperVillain UI|r") + cfg:SetText("|cffFFFF00SuperVillain|r") GameMenuFrame:HookScript("OnShow", function() - GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() + GameMenuButtonHelp:GetHeight() + 10) + GameMenuFrame:Height(GameMenuFrame:GetHeight() + GameMenuButtonUIOptions:GetHeight()) end) - GameMenuButtonHelp:ClearAllPoints() - GameMenuButtonHelp:SetPoint("TOP", cfg, "BOTTOM", 0, -11) + GameMenuButtonKeybindings:ClearAllPoints() + GameMenuButtonKeybindings:Point("TOP", cfg, "BOTTOM", 0, -1) end SV.Events:On("CORE_INITIALIZED", InitializeMisc); diff --git a/SVUI_!Core/xml/styles.xml b/SVUI_!Core/xml/styles.xml index 86adc95..401ae80 100644 --- a/SVUI_!Core/xml/styles.xml +++ b/SVUI_!Core/xml/styles.xml @@ -218,7 +218,7 @@ </Frames> </Frame> - <Frame name="SVUI_CoreStyle_Checkbox" virtual="true"> + <Frame name="SVUI_CoreStyle_CheckButton" virtual="true"> <Attributes> <Attribute name="panelID" type="string" value="checkbox" /> <Attribute name="panelPadding" type="number" value="1" /> diff --git a/SVUI_ActionBars/components/keybind.lua b/SVUI_ActionBars/components/keybind.lua index 4fac61f..9c951b4 100644 --- a/SVUI_ActionBars/components/keybind.lua +++ b/SVUI_ActionBars/components/keybind.lua @@ -510,7 +510,7 @@ function MOD:LoadKeyBinder() moveDesc:SetText(L["Hover your mouse over any actionbutton or spellbook button to bind it. Press the escape key or right click to clear the current actionbutton's keybinding."]) local checkButton = NewFrame("CheckButton", "SVUI_KeyBindPopupCheckButton", pop, "OptionsCheckButtonTemplate") - checkButton:SetStyle("Checkbox") + checkButton:SetStyle("CheckButton") _G["SVUI_KeyBindPopupCheckButtonText"]:SetText(CHARACTER_SPECIFIC_KEYBINDINGS) checkButton:SetScript("OnShow", Check_OnShow) checkButton:SetScript("OnClick", Check_OnClick) diff --git a/SVUI_Chat/components/bubbles.lua b/SVUI_Chat/components/bubbles.lua index d82c88d..f780978 100644 --- a/SVUI_Chat/components/bubbles.lua +++ b/SVUI_Chat/components/bubbles.lua @@ -1,7 +1,7 @@ --[[ ########################################################## S V U I By: Munglunch -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -12,16 +12,16 @@ local select = _G.select; local pairs = _G.pairs; local ipairs = _G.ipairs; local type = _G.type; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- local SV = _G['SVUI'] local L = SV.L; local MOD = SV.Chat; ---[[ -########################################################## +--[[ +########################################################## CHAT BUBBLES ########################################################## ]]-- @@ -29,28 +29,31 @@ function MOD:LoadChatBubbles() if(SV.db.Chat.bubbles == true) then local ChatBubbleHandler = CreateFrame("Frame", nil, UIParent) - local function styleBubble(frame) + local function _style(frame) + if(frame:GetName() or (not frame:GetRegions())) then return end + local backdrop = frame:GetBackdrop() + if((not backdrop) or (not backdrop.bgFile) or (not backdrop.bgFile:find('ChatBubble'))) then return end local needsUpdate = true; for i = 1, frame:GetNumRegions() do local region = select(i, frame:GetRegions()) if region:GetObjectType() == "Texture" then - if(region:GetTexture() == [[Interface\Tooltips\ChatBubble-Background]]) then + if(region:GetTexture() == [[Interface\Tooltips\ChatBubble-Background]]) then region:SetTexture([[Interface\AddOns\SVUI_Chat\assets\CHATBUBBLE-BG]]) - needsUpdate = false + needsUpdate = false elseif(region:GetTexture() == [[Interface\Tooltips\ChatBubble-Backdrop]]) then region:SetTexture([[Interface\AddOns\SVUI_Chat\assets\CHATBUBBLE-BACKDROP]]) - needsUpdate = false + needsUpdate = false elseif(region:GetTexture() == [[Interface\Tooltips\ChatBubble-Tail]]) then region:SetTexture([[Interface\AddOns\SVUI_Chat\assets\CHATBUBBLE-TAIL]]) - needsUpdate = false - else + needsUpdate = false + else region:SetTexture("") end elseif(region:GetObjectType() == "FontString" and not frame.text) then - frame.text = region + frame.text = region end end - if needsUpdate then + if needsUpdate then frame:SetBackdrop(nil); frame:SetClampedToScreen(false) frame:SetFrameStrata("BACKGROUND") @@ -62,25 +65,17 @@ function MOD:LoadChatBubbles() end end - local total = 0 - local numKids = 0 - + local timer,total = 0,0; ChatBubbleHandler:SetScript("OnUpdate", function(self, elapsed) - total = total + elapsed - if total > 0.1 then - total = 0 - local newNumKids = WorldFrame:GetNumChildren() - if newNumKids ~= numKids then - for i = numKids + 1, newNumKids do - local frame = select(i, WorldFrame:GetChildren()) - local backdrop = frame:GetBackdrop() - if(backdrop and backdrop.bgFile:find('ChatBubble')) then - styleBubble(frame) - end - end - numKids = newNumKids + timer = timer + elapsed + if timer > 0.1 then + timer = 0 + local current = WorldFrame:GetNumChildren(); + if current ~= total then + for i = total + 1, current do _style(select(i, WorldFrame:GetChildren())) end + total = current end end end) end -end \ No newline at end of file +end diff --git a/SVUI_QuestTracker/components/quests.lua b/SVUI_QuestTracker/components/quests.lua index 713476d..b651cac 100644 --- a/SVUI_QuestTracker/components/quests.lua +++ b/SVUI_QuestTracker/components/quests.lua @@ -350,44 +350,25 @@ function ItemBar:Update() local maxIndex = #self.Buttons; local firstButton = self.Buttons[1]; local itemLink = firstButton.itemLink; - if(itemLink) then ACTIVE_ITEMS[itemLink] = 1 end - local dockletLocation = MOD.Docklet.Parent.Bar.Data.Location; - local isHorizontal = (SV.db.QuestTracker.itemBarDirection == 'HORIZONTAL'); - local anchor1 = isHorizontal and "LEFT" or "TOP"; - local anchor2 = isHorizontal and "RIGHT" or "BOTTOM"; - local xOff = isHorizontal and 2 or 0; - local yOff = isHorizontal and 0 or -2; - - local itemScale = firstButton:GetHeight() + 2 - local dockWidth,dockHeight = MOD.Docklet:GetSize() - local maxLength = isHorizontal and (dockWidth / itemScale) or (dockHeight / itemScale); - firstButton:ClearAllPoints(); - if(dockletLocation:find('Left')) then - anchor1 = isHorizontal and "RIGHT" or "TOP"; - anchor2 = isHorizontal and "LEFT" or "BOTTOM"; - xOff = isHorizontal and -2 or 0; - end - - if(dockletLocation:find('Top') and (not isHorizontal)) then - anchor1 = "BOTTOM"; - anchor2 = "TOP"; - yOff = 2; - end - - if(isHorizontal) then - firstButton:SetPoint(anchor1, self, anchor1, 0, 0); + local a1, a2, x, y = "BOTTOM", "TOP", 0, 2; + if(SV.db.QuestTracker.itemBarDirection == 'HORIZONTAL') then + a1, a2, x, y = "LEFT", "RIGHT", 2, 0; + firstButton:SetPoint("LEFT", self, "LEFT", 2, 0); if(SV.Tooltip and (not self.tipanchorchecked) and SV.Tooltip.Holder and SV.Tooltip.Holder.Grip and (not SV.Tooltip.Holder.Grip:HasMoved())) then SV.Tooltip.DefaultPadding = 56 self.tipanchorchecked = true end + -- if(SV.Tooltip and SV.Tooltip.Holder and SV.Tooltip.Holder.Grip) then + -- print(SV.Tooltip.Holder.Grip:GetPoint()) + -- end else - firstButton:SetPoint(anchor2, self, anchor2, 0, 0); + firstButton:SetPoint("TOP", self, "TOP", 0, -2); end local lastButton, totalShown, button = firstButton, 1; @@ -399,16 +380,16 @@ function ItemBar:Update() button:ClearAllPoints(); if(button:IsShown()) then totalShown = totalShown + 1; - if(totalShown > maxLength) then - if(totalShown == (maxLength + 1)) then - button:SetPoint(anchor1, firstButton, anchor2, xOff, yOff) + if(totalShown > 5) then + if(totalShown == 6) then + button:SetPoint(a1, firstButton, a2, x, y) else - button:SetPoint(anchor1, lastButton, anchor2, xOff, yOff) + button:SetPoint(a1, lastButton, a2, x, y) end button.___overflow = true; button:FadeOut(); else - button:SetPoint(anchor2, lastButton, anchor1, xOff, -yOff) + button:SetPoint(a2, lastButton, a1, x, -y) button.___overflow = false; button:FadeIn(); end @@ -1130,58 +1111,12 @@ local function UpdateQuestLocals(...) QUEST_ROW_HEIGHT = ROW_HEIGHT + 2; end -local function ReAnchorItemBar() - local dockletLocation = MOD.Docklet.Parent.Bar.Data.Location; - local isHorizontal = (SV.db.QuestTracker.itemBarDirection == 'HORIZONTAL'); - local anchor1 = isHorizontal and "LEFT" or "RIGHT"; - local anchor2 = "LEFT"; - local xOff = isHorizontal and 0 or -4; - local yOff = isHorizontal and 4 or 0; - - if(dockletLocation:find('Left')) then - anchor1 = isHorizontal and "RIGHT" or "LEFT"; - anchor2 = "RIGHT"; - xOff = isHorizontal and 0 or 4; - end - - local prefix1 = isHorizontal and "BOTTOM" or "TOP"; - local prefix2 = "TOP"; - - if(dockletLocation:find('Top')) then - prefix1 = isHorizontal and "TOP" or "BOTTOM"; - prefix2 = "BOTTOM"; - yOff = -4; - end - - anchor1 = prefix1 .. anchor1; - anchor2 = prefix2 .. anchor2; - - ItemBar:ClearAllPoints(); - ItemBar:SetParent(SV.Screen); - ItemBar:SetPoint(anchor1, MOD.Docklet.Parent, anchor2, xOff, yOff); - if(isHorizontal) then - ItemBar:SetWidth(MOD.Docklet.Parent:GetWidth()); - ItemBar:SetHeight(32); - else - ItemBar:SetWidth(32); - ItemBar:SetHeight(MOD.Docklet.Parent:GetHeight()); - end -end - -local function PostMoveCallback() - if(ItemBar.Grip and (not ItemBar.Grip:HasMoved())) then - ReAnchorItemBar() - end - MOD.QuestItemTimer = SV.Timers:ExecuteTimer(ShowItemBarButtons, 1.2); - ShowItemBarButtons(); -end - -local function PostShowCallback() +local _hook_QuestDock_OnShow = function(self) MOD.QuestItemTimer = SV.Timers:ExecuteTimer(ShowItemBarButtons, 1.2); ShowItemBarButtons(); end -local function PostHideCallback() +local _hook_QuestDock_OnHide = function(self) if(MOD.QuestItemTimer) then SV.Timers:RemoveTimer(MOD.QuestItemTimer) MOD.QuestItemTimer = nil @@ -1190,16 +1125,26 @@ local function PostHideCallback() end function MOD:InitializeQuests() - ReAnchorItemBar() + ItemBar:ClearAllPoints(); + ItemBar:SetParent(SV.Screen); + if(SV.db.QuestTracker.itemBarDirection == 'HORIZONTAL') then + ItemBar:SetPoint("BOTTOMLEFT", SV.Dock.BottomRight, "TOPLEFT", 0, 4); + ItemBar:SetWidth(SV.Dock.BottomRight:GetWidth()); + ItemBar:SetHeight(32); + else + ItemBar:SetPoint("TOPRIGHT", SV.Dock.BottomRight, "TOPLEFT", -4, 0); + ItemBar:SetWidth(32); + ItemBar:SetHeight(SV.Dock.BottomRight:GetHeight()); + end + SV:NewAnchor(ItemBar, L["Quest Items"]); for i = 1, 5 do ItemBar.Buttons[i] = CreateQuestItemButton(i) end - self.Docklet.DockButton.PostMoveCallback = PostMoveCallback; - self.Docklet.DockButton.PostShowCallback = PostShowCallback; - self.Docklet.DockButton.PostHideCallback = PostHideCallback; + self.Docklet:FadeCallback(_hook_QuestDock_OnShow, false, true) + self.Docklet:FadeCallback(_hook_QuestDock_OnHide, true) local scrollChild = self.Docklet.ScrollFrame.ScrollChild; local quests = CreateFrame("Frame", nil, scrollChild) diff --git a/SVUI_Skins/components/addons/ACP.lua b/SVUI_Skins/components/addons/ACP.lua index 4bc2d04..c2aba40 100644 --- a/SVUI_Skins/components/addons/ACP.lua +++ b/SVUI_Skins/components/addons/ACP.lua @@ -70,9 +70,9 @@ local function StyleACP() k:SetScript("OnUpdate",cbResize) end for c=1,20 do - _G["ACP_AddonListEntry"..c.."Enabled"]:SetStyle("Checkbox") + _G["ACP_AddonListEntry"..c.."Enabled"]:SetStyle("CheckButton") end - ACP_AddonList_NoRecurse:SetStyle("Checkbox") + ACP_AddonList_NoRecurse:SetStyle("CheckButton") SV.API:Set("ScrollBar", ACP_AddonList_ScrollFrameScrollBar) SV.API:Set("DropDown", ACP_AddonListSortDropDown) ACP_AddonListSortDropDown:SetWidth(130) diff --git a/SVUI_Skins/components/addons/Ace3.lua b/SVUI_Skins/components/addons/Ace3.lua index 3cafdb8..9d0602a 100644 --- a/SVUI_Skins/components/addons/Ace3.lua +++ b/SVUI_Skins/components/addons/Ace3.lua @@ -123,7 +123,7 @@ local function StyleAceGUI(event, addon) if not widget.styledCheckBG then widget.styledCheckBG = CreateFrame("Frame", nil, widget.frame) widget.styledCheckBG:InsetPoints(widget.check) - SV.API:Set("!_Frame", widget.styledCheckBG, "Checkbox") + SV.API:Set("!_Frame", widget.styledCheckBG, "CheckButton") end widget.check:SetParent(widget.styledCheckBG) diff --git a/SVUI_Skins/components/addons/AtlasLoot.lua b/SVUI_Skins/components/addons/AtlasLoot.lua index 39bb46a..46d34b6 100644 --- a/SVUI_Skins/components/addons/AtlasLoot.lua +++ b/SVUI_Skins/components/addons/AtlasLoot.lua @@ -183,18 +183,18 @@ local function StyleAtlasLoot(event, addon) AtlasLootCompareFrameSearch_Box:SetStyle("Editbox") if AtlasLootFilterCheck then - AtlasLootFilterCheck:SetStyle("Checkbox") + AtlasLootFilterCheck:SetStyle("CheckButton") end if AtlasLootItemsFrame_Heroic then - AtlasLootItemsFrame_Heroic:SetStyle("Checkbox") + AtlasLootItemsFrame_Heroic:SetStyle("CheckButton") end - if AtlasLootCompareFrameSearch_FilterCheck then AtlasLootCompareFrameSearch_FilterCheck:SetStyle("Checkbox") + if AtlasLootCompareFrameSearch_FilterCheck then AtlasLootCompareFrameSearch_FilterCheck:SetStyle("CheckButton") end if AtlasLootItemsFrame_RaidFinder then - AtlasLootItemsFrame_RaidFinder:SetStyle("Checkbox") + AtlasLootItemsFrame_RaidFinder:SetStyle("CheckButton") end if AtlasLootItemsFrame_Thunderforged then - AtlasLootItemsFrame_Thunderforged:SetStyle("Checkbox") + AtlasLootItemsFrame_Thunderforged:SetStyle("CheckButton") end AtlasLootPanel.Titel:SetTextColor(23/255, 132/255, 209/255) diff --git a/SVUI_Skins/components/addons/LightHeaded.lua b/SVUI_Skins/components/addons/LightHeaded.lua index 1bb266e..e9feb60 100644 --- a/SVUI_Skins/components/addons/LightHeaded.lua +++ b/SVUI_Skins/components/addons/LightHeaded.lua @@ -76,7 +76,7 @@ local function StyleLightHeaded() if lhopts:IsVisible() then for i = 1, 9 do local cbox = _G["LightHeaded_Panel_Toggle"..i] - cbox:SetStyle("Checkbox") + cbox:SetStyle("CheckButton") end local buttons = { "LightHeaded_Panel_Button1", diff --git a/SVUI_Skins/components/addons/Outfitter.lua b/SVUI_Skins/components/addons/Outfitter.lua index dd883a6..3673aae 100644 --- a/SVUI_Skins/components/addons/Outfitter.lua +++ b/SVUI_Skins/components/addons/Outfitter.lua @@ -65,24 +65,24 @@ local function StyleOutfitter() OutfitterButton:SetPoint("RIGHT", PaperDollSidebarTabs, "RIGHT", 26, -2) OutfitterButton:SetHighlightTexture(nil) OutfitterSlotEnables:SetFrameStrata("HIGH") - OutfitterEnableHeadSlot:SetStyle("Checkbox") - OutfitterEnableNeckSlot:SetStyle("Checkbox") - OutfitterEnableShoulderSlot:SetStyle("Checkbox") - OutfitterEnableBackSlot:SetStyle("Checkbox") - OutfitterEnableChestSlot:SetStyle("Checkbox") - OutfitterEnableShirtSlot:SetStyle("Checkbox") - OutfitterEnableTabardSlot:SetStyle("Checkbox") - OutfitterEnableWristSlot:SetStyle("Checkbox") - OutfitterEnableMainHandSlot:SetStyle("Checkbox") - OutfitterEnableSecondaryHandSlot:SetStyle("Checkbox") - OutfitterEnableHandsSlot:SetStyle("Checkbox") - OutfitterEnableWaistSlot:SetStyle("Checkbox") - OutfitterEnableLegsSlot:SetStyle("Checkbox") - OutfitterEnableFeetSlot:SetStyle("Checkbox") - OutfitterEnableFinger0Slot:SetStyle("Checkbox") - OutfitterEnableFinger1Slot:SetStyle("Checkbox") - OutfitterEnableTrinket0Slot:SetStyle("Checkbox") - OutfitterEnableTrinket1Slot:SetStyle("Checkbox") + OutfitterEnableHeadSlot:SetStyle("CheckButton") + OutfitterEnableNeckSlot:SetStyle("CheckButton") + OutfitterEnableShoulderSlot:SetStyle("CheckButton") + OutfitterEnableBackSlot:SetStyle("CheckButton") + OutfitterEnableChestSlot:SetStyle("CheckButton") + OutfitterEnableShirtSlot:SetStyle("CheckButton") + OutfitterEnableTabardSlot:SetStyle("CheckButton") + OutfitterEnableWristSlot:SetStyle("CheckButton") + OutfitterEnableMainHandSlot:SetStyle("CheckButton") + OutfitterEnableSecondaryHandSlot:SetStyle("CheckButton") + OutfitterEnableHandsSlot:SetStyle("CheckButton") + OutfitterEnableWaistSlot:SetStyle("CheckButton") + OutfitterEnableLegsSlot:SetStyle("CheckButton") + OutfitterEnableFeetSlot:SetStyle("CheckButton") + OutfitterEnableFinger0Slot:SetStyle("CheckButton") + OutfitterEnableFinger1Slot:SetStyle("CheckButton") + OutfitterEnableTrinket0Slot:SetStyle("CheckButton") + OutfitterEnableTrinket1Slot:SetStyle("CheckButton") OutfitterItemComparisons:SetStyle("Button") OutfitterTooltipInfo:SetStyle("Button") OutfitterShowHotkeyMessages:SetStyle("Button") diff --git a/SVUI_Skins/components/addons/Postal.lua b/SVUI_Skins/components/addons/Postal.lua index 34b6e2a..c67e04d 100644 --- a/SVUI_Skins/components/addons/Postal.lua +++ b/SVUI_Skins/components/addons/Postal.lua @@ -40,7 +40,7 @@ local function StylePostal() b.returnicon:SetPoint("TOPRIGHT", b, "TOPRIGHT", 20, 0) end if _G['PostalInboxCB'..i] and not _G['PostalInboxCB'..i].handled then - _G['PostalInboxCB'..i]:SetStyle("Checkbox") + _G['PostalInboxCB'..i]:SetStyle("CheckButton") _G['PostalInboxCB'..i].handled = true end end diff --git a/SVUI_Skins/components/addons/SVUI_!Options.lua b/SVUI_Skins/components/addons/SVUI_!Options.lua index 5e77bec..eba44a3 100644 --- a/SVUI_Skins/components/addons/SVUI_!Options.lua +++ b/SVUI_Skins/components/addons/SVUI_!Options.lua @@ -123,7 +123,7 @@ function MOD:StyleSVUIOptions() if not widget.styledCheckBG then widget.styledCheckBG = CreateFrame("Frame", nil, widget.frame) widget.styledCheckBG:InsetPoints(widget.check) - SV.API:Set("!_Frame", widget.styledCheckBG, "Checkbox") + SV.API:Set("!_Frame", widget.styledCheckBG, "CheckButton") end widget.check:SetParent(widget.styledCheckBG) diff --git a/SVUI_Skins/components/blizzard/achievement.lua b/SVUI_Skins/components/blizzard/achievement.lua index 813fb71..7be0754 100644 --- a/SVUI_Skins/components/blizzard/achievement.lua +++ b/SVUI_Skins/components/blizzard/achievement.lua @@ -293,7 +293,7 @@ local function AchievementStyle() track:ClearAllPoints() track:SetPoint("BOTTOMLEFT", 1, 5) track:RemoveTextures() - track:SetStyle("Checkbox") + track:SetStyle("CheckButton") track.ListParent = button end end diff --git a/SVUI_Skins/components/blizzard/auctionhouse.lua b/SVUI_Skins/components/blizzard/auctionhouse.lua index 71fe793..14a43e2 100644 --- a/SVUI_Skins/components/blizzard/auctionhouse.lua +++ b/SVUI_Skins/components/blizzard/auctionhouse.lua @@ -106,11 +106,11 @@ local function AuctionStyle() SV.API:Set("DropDown", DurationDropDown) SV.API:Set("ScrollBar", BrowseFilterScrollFrameScrollBar) SV.API:Set("ScrollBar", BrowseScrollFrameScrollBar) - IsUsableCheckButton:SetStyle("Checkbox") - ShowOnPlayerCheckButton:SetStyle("Checkbox") + IsUsableCheckButton:SetStyle("CheckButton") + ShowOnPlayerCheckButton:SetStyle("CheckButton") ExactMatchCheckButton:RemoveTextures() - ExactMatchCheckButton:SetStyle("Checkbox") + ExactMatchCheckButton:SetStyle("CheckButton") --SideDressUpFrame:SetPoint("LEFT", AuctionFrame, "RIGHT", 16, 0) AuctionProgressFrame:RemoveTextures() diff --git a/SVUI_Skins/components/blizzard/calendar.lua b/SVUI_Skins/components/blizzard/calendar.lua index 1bb5793..10d8292 100644 --- a/SVUI_Skins/components/blizzard/calendar.lua +++ b/SVUI_Skins/components/blizzard/calendar.lua @@ -102,7 +102,7 @@ local function CalendarStyle() CalendarCreateEventDescriptionContainer:RemoveTextures() CalendarCreateEventDescriptionContainer:SetStyle("!_Frame", "Default") SV.API:Set("CloseButton", CalendarCreateEventCloseButton) - CalendarCreateEventLockEventCheck:SetStyle("Checkbox") + CalendarCreateEventLockEventCheck:SetStyle("CheckButton") SV.API:Set("DropDown", CalendarCreateEventHourDropDown, 68) SV.API:Set("DropDown", CalendarCreateEventMinuteDropDown, 68) SV.API:Set("DropDown", CalendarCreateEventAMPMDropDown, 68) diff --git a/SVUI_Skins/components/blizzard/character.lua b/SVUI_Skins/components/blizzard/character.lua index 0b3bcec..51a0758 100644 --- a/SVUI_Skins/components/blizzard/character.lua +++ b/SVUI_Skins/components/blizzard/character.lua @@ -287,12 +287,12 @@ local function CharacterFrameStyle() SV.API:Set("CloseButton", ReputationDetailCloseButton) SV.API:Set("CloseButton", TokenFramePopupCloseButton) - ReputationDetailAtWarCheckBox:SetStyle("Checkbox") - ReputationDetailMainScreenCheckBox:SetStyle("Checkbox") - ReputationDetailInactiveCheckBox:SetStyle("Checkbox") - ReputationDetailLFGBonusReputationCheckBox:SetStyle("Checkbox") - TokenFramePopupInactiveCheckBox:SetStyle("Checkbox") - TokenFramePopupBackpackCheckBox:SetStyle("Checkbox") + ReputationDetailAtWarCheckBox:SetStyle("CheckButton") + ReputationDetailMainScreenCheckBox:SetStyle("CheckButton") + ReputationDetailInactiveCheckBox:SetStyle("CheckButton") + ReputationDetailLFGBonusReputationCheckBox:SetStyle("CheckButton") + TokenFramePopupInactiveCheckBox:SetStyle("CheckButton") + TokenFramePopupBackpackCheckBox:SetStyle("CheckButton") EquipmentFlyoutFrameHighlight:Die() EquipmentFlyoutFrame:HookScript("OnShow", EquipmentFlyout_OnShow) hooksecurefunc("EquipmentFlyout_Show", EquipmentFlyout_OnShow) diff --git a/SVUI_Skins/components/blizzard/chat.lua b/SVUI_Skins/components/blizzard/chat.lua index 3463231..a2be769 100644 --- a/SVUI_Skins/components/blizzard/chat.lua +++ b/SVUI_Skins/components/blizzard/chat.lua @@ -164,12 +164,12 @@ local _hook_ChatConfig_UpdateCheckboxes = function(frame) local check = _G[baseName.."Check"] if(check) then - check:SetStyle("Checkbox") + check:SetStyle("CheckButton") end local colors = _G[baseName.."ColorClasses"] if(colors) then - colors:SetStyle("Checkbox") + colors:SetStyle("CheckButton") colors:SetHeight(colorsHeight) end end @@ -274,7 +274,7 @@ local function ChatStyle() for i = 1, #ChatFrameList6 do local this = _G[ChatFrameList6[i]] if(this) then - this:SetStyle("Checkbox") + this:SetStyle("CheckButton") end end diff --git a/SVUI_Skins/components/blizzard/friends.lua b/SVUI_Skins/components/blizzard/friends.lua index 1555b83..f131d4e 100644 --- a/SVUI_Skins/components/blizzard/friends.lua +++ b/SVUI_Skins/components/blizzard/friends.lua @@ -248,7 +248,7 @@ local function FriendsFrameStyle() BNConversationInviteDialogInviteButton:SetStyle("Button") BNConversationInviteDialogCancelButton:SetStyle("Button") for i = 1, BN_CONVERSATION_INVITE_NUM_DISPLAYED do - _G["BNConversationInviteDialogListFriend"..i].checkButton:SetStyle("Checkbox") + _G["BNConversationInviteDialogListFriend"..i].checkButton:SetStyle("CheckButton") end FriendsTabHeaderSoRButton:SetStyle("!_Frame", 'Default') FriendsTabHeaderSoRButton:SetStyle("Button") diff --git a/SVUI_Skins/components/blizzard/garrison.lua b/SVUI_Skins/components/blizzard/garrison.lua index 2a1e537..b50195e 100644 --- a/SVUI_Skins/components/blizzard/garrison.lua +++ b/SVUI_Skins/components/blizzard/garrison.lua @@ -14,16 +14,16 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## HELPERS ########################################################## ]]-- local RING_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-RING]] local LVL_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-LEVEL]] local DEFAULT_COLOR = {r = 0.25, g = 0.25, b = 0.25}; ---[[ -########################################################## +--[[ +########################################################## STYLE ########################################################## ]]-- @@ -38,7 +38,7 @@ end local function StyleTextureIcon(frame) if((not frame) or (not frame.Texture)) then return end frame.Texture:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) - if(not frame.IconSlot) then + if(not frame.IconSlot) then frame.IconSlot = CreateFrame("Frame", nil, frame) frame.IconSlot:WrapPoints(frame.Texture) frame.IconSlot:SetStyle("Icon") @@ -72,7 +72,7 @@ local function StyleIconElement(frame) end end -local function StyleListItem(item) +local function _hook_GarrisonMissionFrame_SetItemRewardDetails(item) if(not item) then return; end if(item.Icon) then local size = item:GetHeight() - 8 @@ -85,7 +85,7 @@ local function StyleListItem(item) item.Icon:SetSize(size, size) item.Icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) item.Icon:SetDesaturated(false) - if(not item.IconSlot) then + if(not item.IconSlot) then item.IconSlot = CreateFrame("Frame", nil, item) item.IconSlot:SetAllPoints(item.Icon) item.IconSlot:SetStyle("Icon") @@ -125,7 +125,7 @@ local function StyleFollowerPortrait(frame, color) frame.PortraitRingQuality:SetTexture(RING_TEXTURE) end -local _hook_ReagentUpdate = function(self) +local _hook_GarrisonCapacitiveDisplayFrame_Update = function(self) local reagents = GarrisonCapacitiveDisplayFrame.CapacitiveDisplay.Reagents; for i = 1, #reagents do if(reagents[i] and (not reagents[i].Panel)) then @@ -138,19 +138,19 @@ local _hook_ReagentUpdate = function(self) end end -local _hook_GarrisonBuildingListUpdate = function() +local _hook_GarrisonBuildingTab_Select = function() local list = GarrisonBuildingFrame.BuildingList; for i=1, GARRISON_NUM_BUILDING_SIZES do local tab = list["Tab"..i]; if(tab and tab.buildings) then for i=1, #tab.buildings do - StyleListItem(list.Buttons[i]) + _hook_GarrisonMissionFrame_SetItemRewardDetails(list.Buttons[i]) end end end end -local _hook_GarrisonFollowerListUpdate = function(self) +local _hook_GarrisonFollowerList_Update = function(self) local buttons = self.FollowerList.listScroll.buttons; local followers = self.FollowerList.followers; local followersList = self.FollowerList.followersList; @@ -158,7 +158,7 @@ local _hook_GarrisonFollowerListUpdate = function(self) local scrollFrame = self.FollowerList.listScroll; local offset = HybridScrollFrame_GetOffset(scrollFrame); local numButtons = #buttons; - + for i = 1, numButtons do local button = buttons[i]; local index = offset + i; @@ -190,7 +190,7 @@ local _hook_GarrisonFollowerTooltipTemplate_SetGarrisonFollower = function(toolt StyleFollowerPortrait(tooltip.Portrait, color) end -local _hook_GarrisonBuildingInfoBoxFollowerPortrait = function(owned, hasFollowerSlot, infoBox, isBuilding, canActivate, ID) +local _hook_GarrisonBuildingInfoBox_ShowFollowerPortrait = function(owned, hasFollowerSlot, infoBox, isBuilding, canActivate, ID) local portraitFrame = infoBox.FollowerPortrait; StyleFollowerPortrait(portraitFrame) end @@ -218,12 +218,12 @@ local _hook_GarrisonMissionComplete_SetFollowerLevel = function(followerFrame, l followerFrame.PortraitFrame.PortraitRing:SetVertexColor(color.r, color.g, color.b) end -local function _hook_SetCounterButton(self, index, info) +local function _hook_GarrisonFollowerButton_SetCounterButton(self, index, info) local counter = self.Counters[index]; StyleAbilityIcon(counter) end -local function _hook_AddAbility(self, index, ability) +local function _hook_GarrisonFollowerButton_AddAbility(self, index, ability) local ability = self.Abilities[index]; StyleAbilityIcon(ability) end @@ -235,7 +235,7 @@ local _hook_GarrisonFollowerPage_ShowFollower = function(self, followerID) self.XPBar:SetStatusBarTexture(SV.media.statusbar.default) self.XPBar:SetStyle("!_Frame", "Bar") end - + for i=1, #self.AbilitiesFrame.Abilities do local abilityFrame = self.AbilitiesFrame.Abilities[i]; StyleAbilityIcon(abilityFrame.IconButton) @@ -271,7 +271,7 @@ end local function StyleRewardButtons(rewardButtons) for i = 1, #rewardButtons do local frame = rewardButtons[i]; - StyleListItem(frame); + _hook_GarrisonMissionFrame_SetItemRewardDetails(frame); end end @@ -291,7 +291,7 @@ local _hook_GarrisonMissionFrame_CheckRewardButtons = function(rewards) StyleRewardButtons(rewards); end -local function StyleUpdateRewards() +local function _hook_GarrisonMissionList_Update() local self = GarrisonMissionFrame local missionButtons = self.MissionTab.MissionList.listScroll.buttons; for i = 1, #missionButtons do @@ -313,15 +313,14 @@ end local function LoadGarrisonStyle() if SV.db.Skins.blizzard.enable ~= true then - return + return end - - SV.API:Set("Window", GarrisonMissionFrame, true, false, 1, 0, 4) + --[[ + ############################################################################## + BUILDING FRAME + ############################################################################## + --]] SV.API:Set("Window", GarrisonBuildingFrame, true, false, 1, 0, 4) - SV.API:Set("Window", GarrisonLandingPage, true, false, 1, 0, 0) - - SV.API:Set("Tab", GarrisonMissionFrameTab1) - SV.API:Set("Tab", GarrisonMissionFrameTab2) GarrisonBuildingFrameFollowers:RemoveTextures() GarrisonBuildingFrameFollowers:SetStyle("Frame", 'Inset', true, 1, -5, -5) @@ -349,12 +348,20 @@ local function LoadGarrisonStyle() GarrisonBuildingFrame.BuildingList.MaterialFrame:SetStyle("Frame", "Inset", true, 1, -5, -7) GarrisonBuildingFrameTutorialButton:Die() - StyleUpdateRewards() + SV.API:Set("CloseButton", GarrisonBuildingFrame.CloseButton) + hooksecurefunc("GarrisonBuildingTab_Select", _hook_GarrisonBuildingTab_Select) + hooksecurefunc("GarrisonBuildingList_SelectTab", _hook_GarrisonBuildingTab_Select) + hooksecurefunc("GarrisonBuildingInfoBox_ShowFollowerPortrait", _hook_GarrisonBuildingInfoBox_ShowFollowerPortrait) + --[[ + ############################################################################## + LANDING PAGE + ############################################################################## + --]] + SV.API:Set("Window", GarrisonLandingPage, true, false, 1, 0, 0) SV.API:Set("Skin", GarrisonLandingPage.FollowerTab, 12, 0, -2, 30) - GarrisonLandingPage.FollowerTab.AbilitiesFrame:RemoveTextures() - --GarrisonLandingPage.FollowerTab:SetStyle("!_Frame", "Model") + GarrisonLandingPage.FollowerTab.AbilitiesFrame:RemoveTextures() GarrisonLandingPage.FollowerList:RemoveTextures() GarrisonLandingPage.FollowerList:SetStyle("Frame", 'Inset', false, 4, 0, 0) @@ -364,23 +371,39 @@ local function LoadGarrisonStyle() bgFrameTop:SetStyle("Frame", "Paper") bgFrameTop:SetPanelColor("special") - SV.API:Set("Tab", GarrisonLandingPageTab1, nil, 10, 4) - SV.API:Set("Tab", GarrisonLandingPageTab2, nil, 10, 4) - - local a1, p, a2, x, y = GarrisonLandingPageTab1:GetPoint() - GarrisonLandingPageTab1:SetPoint(a1, p, a2, x, (y - 15)) - GarrisonLandingPageReportList:RemoveTextures() GarrisonLandingPageReportList:SetStyle("Frame", 'Inset', false, 4, 0, 0) - GarrisonLandingPageReport.Available:RemoveTextures(true) GarrisonLandingPageReport.Available:SetStyle("Button") GarrisonLandingPageReport.Available:GetNormalTexture().SetAtlas = function() return end - GarrisonLandingPageReport.InProgress:RemoveTextures(true) GarrisonLandingPageReport.InProgress:SetStyle("Button") GarrisonLandingPageReport.InProgress:GetNormalTexture().SetAtlas = function() return end + for i = 1, GarrisonLandingPageReportListListScrollFrameScrollChild:GetNumChildren() do + local child = select(i, GarrisonLandingPageReportListListScrollFrameScrollChild:GetChildren()) + for j = 1, child:GetNumChildren() do + local childC = select(j, child:GetChildren()) + childC.Icon:SetTexCoord(0.1,0.9,0.1,0.9) + childC.Icon:SetDesaturated(false) + end + end + + local a1, p, a2, x, y = GarrisonLandingPageTab1:GetPoint() + GarrisonLandingPageTab1:SetPoint(a1, p, a2, x, (y - 15)) + SV.API:Set("Tab", GarrisonLandingPageTab1, nil, 10, 4) + SV.API:Set("Tab", GarrisonLandingPageTab2, nil, 10, 4) + SV.API:Set("ScrollBar", GarrisonLandingPageListScrollFrame) + SV.API:Set("ScrollBar", GarrisonLandingPageReportListListScrollFrame) + SV.API:Set("CloseButton", GarrisonLandingPage.CloseButton) + GarrisonLandingPage.CloseButton:SetFrameStrata("HIGH") + --[[ + ############################################################################## + MISSION FRAME + ############################################################################## + --]] + SV.API:Set("Window", GarrisonMissionFrame, true, false, 1, 0, 4) + GarrisonMissionFrameMissions:RemoveTextures() GarrisonMissionFrameMissions:SetStyle("!_Frame", "Inset") @@ -405,23 +428,13 @@ local function LoadGarrisonStyle() completedBGTex:SetTexture(0,0,0,0.8) GarrisonMissionFrame.MissionCompleteBackground:DisableDrawLayer("BACKGROUND") - GarrisonMissionFrameMissionsListScrollFrame:RemoveTextures() - SV.API:Set("ScrollBar", GarrisonMissionFrameMissionsListScrollFrame) - - SV.API:Set("Tab", GarrisonMissionFrameMissionsTab1, nil, 10, 4) - SV.API:Set("Tab", GarrisonMissionFrameMissionsTab2, nil, 10, 4) - local a1, p, a2, x, y = GarrisonMissionFrameMissionsTab1:GetPoint() - GarrisonMissionFrameMissionsTab1:SetPoint(a1, p, a2, x, (y + 8)) - GarrisonMissionFrameMissions.MaterialFrame:RemoveTextures() GarrisonMissionFrameMissions.MaterialFrame:SetStyle("Frame", "Inset", true, 1, -3, -3) - SV.API:Set("Skin", GarrisonMissionFrame.FollowerTab) - GarrisonMissionFrame.FollowerTab.ItemWeapon:RemoveTextures() - StyleListItem(GarrisonMissionFrame.FollowerTab.ItemWeapon) + _hook_GarrisonMissionFrame_SetItemRewardDetails(GarrisonMissionFrame.FollowerTab.ItemWeapon) GarrisonMissionFrame.FollowerTab.ItemArmor:RemoveTextures() - StyleListItem(GarrisonMissionFrame.FollowerTab.ItemArmor) + _hook_GarrisonMissionFrame_SetItemRewardDetails(GarrisonMissionFrame.FollowerTab.ItemArmor) GarrisonMissionFrame.MissionTab:RemoveTextures() GarrisonMissionFrame.MissionTab.MissionPage:RemoveTextures() @@ -449,9 +462,6 @@ local function LoadGarrisonStyle() GarrisonMissionFrameFollowers:SetStyle("Frame", 'Inset', false, 4, 0, 0) GarrisonMissionFrameFollowers.MaterialFrame:RemoveTextures() GarrisonMissionFrameFollowers.MaterialFrame:SetStyle("Frame", "Inset", true, 1, -5, -7) - SV.API:Set("EditBox", GarrisonMissionFrameFollowers.SearchBox) - - --GarrisonMissionFrameFollowersListScrollFrame local mComplete = GarrisonMissionFrame.MissionComplete; local mStage = mComplete.Stage; @@ -477,51 +487,59 @@ local function LoadGarrisonStyle() mComplete.NextMissionButton:RemoveTextures(true) mComplete.NextMissionButton:SetStyle("Button") - --GarrisonMissionFrame.MissionComplete.BonusRewards:RemoveTextures() - --GarrisonMissionFrame.MissionComplete.BonusRewards:SetStyle("!_Frame", "Model") - - local display = GarrisonCapacitiveDisplayFrame - display:RemoveTextures(true) + local a1, p, a2, x, y = GarrisonMissionFrameMissionsTab1:GetPoint() + GarrisonMissionFrameMissionsTab1:SetPoint(a1, p, a2, x, (y + 8)) + SV.API:Set("Tab", GarrisonMissionFrameTab1) + SV.API:Set("Tab", GarrisonMissionFrameTab2) + SV.API:Set("Tab", GarrisonMissionFrameMissionsTab1, nil, 10, 4) + SV.API:Set("Tab", GarrisonMissionFrameMissionsTab2, nil, 10, 4) + SV.API:Set("ScrollBar", GarrisonMissionFrameMissionsListScrollFrame) + SV.API:Set("ScrollBar", GarrisonMissionFrameFollowersListScrollFrame) + SV.API:Set("Skin", GarrisonMissionFrame.FollowerTab) + SV.API:Set("EditBox", GarrisonMissionFrameFollowers.SearchBox) + SV.API:Set("CloseButton", GarrisonMissionFrame.MissionTab.MissionPage.CloseButton) + SV.API:Set("ArrowButton", GarrisonMissionFrame.MissionTab.MissionPage.MinimizeButton, down) + + _hook_GarrisonMissionList_Update() + + hooksecurefunc("GarrisonMissionList_Update", _hook_GarrisonMissionList_Update) + hooksecurefunc("GarrisonMissionFrame_SetItemRewardDetails", _hook_GarrisonMissionFrame_SetItemRewardDetails) + hooksecurefunc("GarrisonMissionFrame_SetFollowerPortrait", _hook_GarrisonMissionFrame_SetFollowerPortrait) + hooksecurefunc("GarrisonMissionComplete_SetFollowerLevel", _hook_GarrisonMissionComplete_SetFollowerLevel) + hooksecurefunc("GarrisonMissionPage_UpdateMissionForParty", _hook_GarrisonFollowerPage_UpdateMissionForParty) + hooksecurefunc("GarrisonMissionButton_SetRewards", _hook_GarrisonMissionButton_SetRewards) + hooksecurefunc("GarrisonMissionFrame_CheckRewardButtons", _hook_GarrisonMissionFrame_CheckRewardButtons) + --[[ + ############################################################################## + CAPACITIVE DISPLAY + ############################################################################## + --]] + SV.API:Set("Window", GarrisonCapacitiveDisplayFrame, true, false, 1, 0, 4) + + --GarrisonCapacitiveDisplayFrame:RemoveTextures(true) + --GarrisonCapacitiveDisplayFrame:SetStyle("Frame", "Window2") GarrisonCapacitiveDisplayFrameInset:RemoveTextures(true) - display.CapacitiveDisplay:RemoveTextures(true) - display.CapacitiveDisplay:SetStyle("Frame", 'Transparent') - display.CapacitiveDisplay.ShipmentIconFrame:SetStyle("Icon") - display.CapacitiveDisplay.ShipmentIconFrame.Icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) - display:SetStyle("Frame", "Window2") + GarrisonCapacitiveDisplayFrame.CapacitiveDisplay:RemoveTextures(true) + GarrisonCapacitiveDisplayFrame.CapacitiveDisplay:SetStyle("Frame", 'Transparent') + GarrisonCapacitiveDisplayFrame.CapacitiveDisplay.ShipmentIconFrame:SetStyle("Icon") + GarrisonCapacitiveDisplayFrame.CapacitiveDisplay.ShipmentIconFrame.Icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) - local reagents = display.CapacitiveDisplay.Reagents; - for i = 1, #reagents do - if(reagents[i]) then - reagents[i]:RemoveTextures() - reagents[i]:SetStyle("Icon") - if(reagents[i].Icon) then + local reagents = GarrisonCapacitiveDisplayFrame.CapacitiveDisplay.Reagents; + for i = 1, #reagents do + if(reagents[i]) then + reagents[i]:RemoveTextures() + reagents[i]:SetStyle("Icon") + if(reagents[i].Icon) then reagents[i].Icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) end end - end - - hooksecurefunc("GarrisonFollowerButton_AddAbility", _hook_AddAbility) - hooksecurefunc("GarrisonFollowerButton_SetCounterButton", _hook_SetCounterButton) - hooksecurefunc("GarrisonMissionList_Update", StyleUpdateRewards) - hooksecurefunc("GarrisonCapacitiveDisplayFrame_Update", _hook_ReagentUpdate) - hooksecurefunc("GarrisonFollowerList_Update", _hook_GarrisonFollowerListUpdate) - hooksecurefunc("GarrisonMissionFrame_SetFollowerPortrait", _hook_GarrisonMissionFrame_SetFollowerPortrait) - hooksecurefunc("GarrisonMissionComplete_SetFollowerLevel", _hook_GarrisonMissionComplete_SetFollowerLevel) - hooksecurefunc("GarrisonFollowerPage_ShowFollower", _hook_GarrisonFollowerPage_ShowFollower) - hooksecurefunc("GarrisonMissionPage_UpdateMissionForParty", _hook_GarrisonFollowerPage_UpdateMissionForParty) - hooksecurefunc("GarrisonMissionFrame_SetItemRewardDetails", StyleListItem) - hooksecurefunc("GarrisonBuildingTab_Select", _hook_GarrisonBuildingListUpdate) - hooksecurefunc("GarrisonBuildingList_SelectTab", _hook_GarrisonBuildingListUpdate) - hooksecurefunc("GarrisonBuildingInfoBox_ShowFollowerPortrait", _hook_GarrisonBuildingInfoBoxFollowerPortrait) - hooksecurefunc("GarrisonFollowerTooltipTemplate_SetGarrisonFollower", _hook_GarrisonFollowerTooltipTemplate_SetGarrisonFollower) - hooksecurefunc("GarrisonMissionButton_SetRewards", _hook_GarrisonMissionButton_SetRewards) - hooksecurefunc("GarrisonMissionFrame_CheckRewardButtons", _hook_GarrisonMissionFrame_CheckRewardButtons) - + end if(GarrisonCapacitiveDisplayFrame.StartWorkOrderButton) then GarrisonCapacitiveDisplayFrame.StartWorkOrderButton:RemoveTextures(true) GarrisonCapacitiveDisplayFrame.StartWorkOrderButton:SetStyle("Button") end + if(GarrisonCapacitiveDisplayFrame.CreateAllWorkOrdersButton) then GarrisonCapacitiveDisplayFrame.CreateAllWorkOrdersButton:RemoveTextures(true) GarrisonCapacitiveDisplayFrame.CreateAllWorkOrdersButton:SetStyle("Button") @@ -530,47 +548,27 @@ local function LoadGarrisonStyle() SV.API:Set("PageButton", GarrisonCapacitiveDisplayFrame.IncrementButton) end - SV.API:Set("ScrollBar", GarrisonLandingPageReportListListScrollFrameScrollBar) - SV.API:Set("ScrollBar", GarrisonMissionFrameMissionsListScrollFrameScrollBar) - SV.API:Set("ScrollBar", GarrisonMissionFrameFollowersListScrollFrameScrollBar) - SV.API:Set("CloseButton", GarrisonLandingPage.CloseButton) - SV.API:Set("CloseButton", GarrisonMissionFrame.MissionTab.MissionPage.CloseButton) - GarrisonLandingPage.CloseButton:SetFrameStrata("HIGH") - - for i = 1, GarrisonLandingPageReportListListScrollFrameScrollChild:GetNumChildren() do - local child = select(i, GarrisonLandingPageReportListListScrollFrameScrollChild:GetChildren()) - for j = 1, child:GetNumChildren() do - local childC = select(j, child:GetChildren()) - childC.Icon:SetTexCoord(0.1,0.9,0.1,0.9) - childC.Icon:SetDesaturated(false) - end - end - - SV.API:Set("ScrollBar", GarrisonLandingPageListScrollFrameScrollBar) - + hooksecurefunc("GarrisonCapacitiveDisplayFrame_Update", _hook_GarrisonCapacitiveDisplayFrame_Update) + --[[ + ############################################################################## + RECRUITER FRAME + ############################################################################## + --]] SV.API:Set("Window", GarrisonRecruiterFrame, true) + SV.API:Set("Window", GarrisonRecruitSelectFrame, true) + GarrisonRecruiterFrameInset:RemoveTextures() GarrisonRecruiterFrameInset:SetStyle("!_Frame", "Inset") - SV.API:Set("DropDown", GarrisonRecruiterFramePickThreatDropDown) - GarrisonRecruiterFrame.Pick.Radio1:SetStyle("!_Checkbox", false, -3, -3, true) - GarrisonRecruiterFrame.Pick.Radio2:SetStyle("!_Checkbox", false, -3, -3, true) + GarrisonRecruiterFrame.Pick.Radio1:SetStyle("!_CheckButton", false, -3, -3, true) + GarrisonRecruiterFrame.Pick.Radio2:SetStyle("!_CheckButton", false, -3, -3, true) GarrisonRecruiterFrame.PortraitTexture:Die() - SV.API:Set("CloseButton", GarrisonRecruiterFrame.CloseButton) - SV.API:Set("Button", GarrisonRecruiterFrame.Pick.ChooseRecruits) - SV.API:Set("Button", GarrisonRecruiterFrame.Random.ChooseRecruits) - --GarrisonRecruiterFrame.UnavailableFrame:RemoveTextures(true) - - SV.API:Set("Window", GarrisonRecruitSelectFrame, true) GarrisonRecruitSelectFrame.FollowerSelection:RemoveTextures() - GarrisonRecruitSelectFrame.FollowerList:RemoveTextures() GarrisonRecruitSelectFrame.FollowerList:SetStyle("Frame", 'Inset', false, 4, 0, 0) - GarrisonRecruitSelectFrame.FollowerSelection.Recruit1:RemoveTextures() GarrisonRecruitSelectFrame.FollowerSelection.Recruit2:RemoveTextures() GarrisonRecruitSelectFrame.FollowerSelection.Recruit3:RemoveTextures() - GarrisonRecruitSelectFrame.FollowerSelection.Recruit1:SetStyle("Frame", 'Inset') GarrisonRecruitSelectFrame.FollowerSelection.Recruit2:SetStyle("Frame", 'Inset') GarrisonRecruitSelectFrame.FollowerSelection.Recruit3:SetStyle("Frame", 'Inset') @@ -583,12 +581,27 @@ local function LoadGarrisonStyle() GarrisonRecruitSelectFrame.FollowerSelection.Recruit2.HireRecruits:SetStyle("Button") GarrisonRecruitSelectFrame.FollowerSelection.Recruit3.HireRecruits:SetStyle("Button") + SV.API:Set("DropDown", GarrisonRecruiterFramePickThreatDropDown) + SV.API:Set("CloseButton", GarrisonRecruiterFrame.CloseButton) + SV.API:Set("CloseButton", GarrisonRecruitSelectFrame.CloseButton) + SV.API:Set("Button", GarrisonRecruiterFrame.Pick.ChooseRecruits) + SV.API:Set("Button", GarrisonRecruiterFrame.Random.ChooseRecruits) + hooksecurefunc("GarrisonRecruitSelectFrame_UpdateRecruits", _hook_GarrisonRecruitSelectFrame_UpdateRecruits) - --print("Test Done") -end ---[[ -########################################################## + --[[ + ############################################################################## + FOLLOWER HOOKS + ############################################################################## + --]] + hooksecurefunc("GarrisonFollowerList_Update", _hook_GarrisonFollowerList_Update) + hooksecurefunc("GarrisonFollowerPage_ShowFollower", _hook_GarrisonFollowerPage_ShowFollower) + hooksecurefunc("GarrisonFollowerButton_AddAbility", _hook_GarrisonFollowerButton_AddAbility) + hooksecurefunc("GarrisonFollowerButton_SetCounterButton", _hook_GarrisonFollowerButton_SetCounterButton) + hooksecurefunc("GarrisonFollowerTooltipTemplate_SetGarrisonFollower", _hook_GarrisonFollowerTooltipTemplate_SetGarrisonFollower) +end +--[[ +########################################################## MOD LOADING ########################################################## ]]-- -MOD:SaveBlizzardStyle("Blizzard_GarrisonUI", LoadGarrisonStyle) \ No newline at end of file +MOD:SaveBlizzardStyle("Blizzard_GarrisonUI", LoadGarrisonStyle) diff --git a/SVUI_Skins/components/blizzard/guild.lua b/SVUI_Skins/components/blizzard/guild.lua index a5fee9c..2d17c3a 100644 --- a/SVUI_Skins/components/blizzard/guild.lua +++ b/SVUI_Skins/components/blizzard/guild.lua @@ -304,7 +304,7 @@ local _hook_BankTabPermissions = function(self) end view = _G[ownedName.."ViewCheck"] if(view) then - view:SetStyle("Checkbox") + view:SetStyle("CheckButton") GCTabHelper(view) end stack = _G[ownedName.."StackBox"] @@ -314,12 +314,12 @@ local _hook_BankTabPermissions = function(self) end deposit = _G[ownedName.."DepositCheck"] if(deposit) then - deposit:SetStyle("Checkbox") + deposit:SetStyle("CheckButton") GCTabHelper(deposit) end update = _G[ownedName.."UpdateInfoCheck"] if(update) then - update:SetStyle("Checkbox") + update:SetStyle("CheckButton") GCTabHelper(update) end end @@ -492,7 +492,7 @@ local function GuildFrameStyle() for i = 1, #GuildCheckBoxList do local check = _G[GuildCheckBoxList[i]] - if(check) then check:SetStyle("Checkbox") end + if(check) then check:SetStyle("CheckButton") end end for i = 1, 5 do @@ -510,9 +510,9 @@ local function GuildFrameStyle() GuildNewsBossModelTextFrame.Panel:SetPoint("TOPLEFT", GuildNewsBossModel.Panel, "BOTTOMLEFT", 0, -1) GuildNewsBossModel:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) - GuildRecruitmentTankButton.checkButton:SetStyle("Checkbox") - GuildRecruitmentHealerButton.checkButton:SetStyle("Checkbox") - GuildRecruitmentDamagerButton.checkButton:SetStyle("Checkbox") + GuildRecruitmentTankButton.checkButton:SetStyle("CheckButton") + GuildRecruitmentHealerButton.checkButton:SetStyle("CheckButton") + GuildRecruitmentDamagerButton.checkButton:SetStyle("CheckButton") GuildFactionBar:RemoveTextures() GuildFactionBar.progress:SetTexture(SV.media.statusbar.default) @@ -522,7 +522,7 @@ local function GuildFrameStyle() GuildRosterContainer:SetStyle("Frame", "Inset") SV.API:Set("ScrollBar", GuildRosterContainerScrollBar, 4, -4) - GuildRosterShowOfflineButton:SetStyle("Checkbox") + GuildRosterShowOfflineButton:SetStyle("CheckButton") for i = 1, 4 do local btn = _G["GuildRosterColumnButton"..i] @@ -567,7 +567,7 @@ local function GuildFrameStyle() for i = 1, 7 do local btn = _G["GuildNewsFilterButton"..i] if(btn) then - btn:SetStyle("Checkbox") + btn:SetStyle("CheckButton") end end @@ -694,7 +694,7 @@ local function GuildControlStyle() for i=1, NUM_RANK_FLAGS do local check = _G["GuildControlUIRankSettingsFrameCheckbox"..i] - if(check) then check:SetStyle("Checkbox") end + if(check) then check:SetStyle("CheckButton") end end GuildControlUIRankOrderFrameNewButton:SetStyle("Button") @@ -718,12 +718,12 @@ local function LFGuildFrameStyle() for i = 1, #LFGFrameList do local check = _G[LFGFrameList[i]] - if(check) then check:SetStyle("Checkbox") end + if(check) then check:SetStyle("CheckButton") end end - LookingForGuildTankButton.checkButton:SetStyle("Checkbox") - LookingForGuildHealerButton.checkButton:SetStyle("Checkbox") - LookingForGuildDamagerButton.checkButton:SetStyle("Checkbox") + LookingForGuildTankButton.checkButton:SetStyle("CheckButton") + LookingForGuildHealerButton.checkButton:SetStyle("CheckButton") + LookingForGuildDamagerButton.checkButton:SetStyle("CheckButton") LookingForGuildFrameInset:RemoveTextures(false) LookingForGuildBrowseButton_LeftSeparator:Die() LookingForGuildRequestButton_RightSeparator:Die() diff --git a/SVUI_Skins/components/blizzard/lfd.lua b/SVUI_Skins/components/blizzard/lfd.lua index 0388757..91dff35 100644 --- a/SVUI_Skins/components/blizzard/lfd.lua +++ b/SVUI_Skins/components/blizzard/lfd.lua @@ -420,7 +420,7 @@ local function LFDFrameStyle() -- local box = _G["LFDQueueFrameSpecificListButton"..u.."EnableButton"] -- if(box and (not box.Panel)) then -- box:RemoveTextures() - -- box:SetStyle("Checkbox") + -- box:SetStyle("CheckButton") -- box:SetFrameLevel(box:GetFrameLevel() + 50) -- end -- end @@ -429,7 +429,7 @@ local function LFDFrameStyle() -- local box = _G["LFRQueueFrameSpecificListButton"..u.."EnableButton"] -- if(box and (not box.Panel)) then -- box:RemoveTextures() - -- box:SetStyle("Checkbox") + -- box:SetStyle("CheckButton") -- box:SetFrameLevel(box:GetFrameLevel() + 50) -- end -- end diff --git a/SVUI_Skins/components/blizzard/pvp.lua b/SVUI_Skins/components/blizzard/pvp.lua index 75cb873..8905941 100644 --- a/SVUI_Skins/components/blizzard/pvp.lua +++ b/SVUI_Skins/components/blizzard/pvp.lua @@ -81,9 +81,9 @@ local function PVPFrameStyle() HonorFrame.BonusFrame.DiceButton:DisableDrawLayer("ARTWORK") HonorFrame.BonusFrame.DiceButton:SetHighlightTexture("") HonorFrame.RoleInset:RemoveTextures() - HonorFrame.RoleInset.DPSIcon.checkButton:SetStyle("Checkbox") - HonorFrame.RoleInset.TankIcon.checkButton:SetStyle("Checkbox") - HonorFrame.RoleInset.HealerIcon.checkButton:SetStyle("Checkbox") + HonorFrame.RoleInset.DPSIcon.checkButton:SetStyle("CheckButton") + HonorFrame.RoleInset.TankIcon.checkButton:SetStyle("CheckButton") + HonorFrame.RoleInset.HealerIcon.checkButton:SetStyle("CheckButton") HonorFrame.RoleInset.TankIcon:DisableDrawLayer("OVERLAY") HonorFrame.RoleInset.TankIcon:DisableDrawLayer("BACKGROUND") HonorFrame.RoleInset.HealerIcon:DisableDrawLayer("OVERLAY") diff --git a/SVUI_Skins/components/blizzard/raid.lua b/SVUI_Skins/components/blizzard/raid.lua index 52e2417..87a4800 100644 --- a/SVUI_Skins/components/blizzard/raid.lua +++ b/SVUI_Skins/components/blizzard/raid.lua @@ -88,7 +88,7 @@ local function RaidInfoStyle() SV.API:Set("ScrollBar", RaidInfoScrollFrameScrollBar) if RaidFrameRaidBrowserButton then RaidFrameRaidBrowserButton:SetStyle("Button") end - RaidFrameAllAssistCheckButton:SetStyle("Checkbox") + RaidFrameAllAssistCheckButton:SetStyle("CheckButton") end --[[ ########################################################## diff --git a/SVUI_Skins/components/blizzard/system.lua b/SVUI_Skins/components/blizzard/system.lua index 287e1de..5fad852 100644 --- a/SVUI_Skins/components/blizzard/system.lua +++ b/SVUI_Skins/components/blizzard/system.lua @@ -39,7 +39,7 @@ local SystemFrameList1 = { "QueueStatusFrame", "InterfaceOptionsFrame", "VideoOptionsFrame", - "AudioOptionsFrame", + "AudioOptionsFrame" }; local SystemFrameList4 = { "Options", @@ -406,6 +406,19 @@ local _hook_GhostFrameBackdropColor = function(self, r, g, b, a) self:SetBackdropBorderColor(0,0,0,0) end end + +local _hook_AddonsList_Update = function() + for i = 1, MAX_ADDONS_DISPLAYED do + local enabledButton = _G["AddonListEntry"..i.."Enabled"]; + if(enabledButton and (not enabledButton.Panel)) then + enabledButton:SetStyle("Button") + end + local loadButton = _G["AddonListEntry"..i.."Load"]; + if(loadButton and (not loadButton.Panel)) then + loadButton:SetStyle("Button") + end + end +end --[[ ########################################################## SYSTEM WIDGET MODRS @@ -448,9 +461,9 @@ local function SystemPanelQue() LFDRoleCheckPopup:SetStyle("!_Frame") LFDRoleCheckPopupAcceptButton:SetStyle("Button") LFDRoleCheckPopupDeclineButton:SetStyle("Button") - LFDRoleCheckPopupRoleButtonTank.checkButton:SetStyle("Checkbox") - LFDRoleCheckPopupRoleButtonDPS.checkButton:SetStyle("Checkbox") - LFDRoleCheckPopupRoleButtonHealer.checkButton:SetStyle("Checkbox") + LFDRoleCheckPopupRoleButtonTank.checkButton:SetStyle("CheckButton") + LFDRoleCheckPopupRoleButtonDPS.checkButton:SetStyle("CheckButton") + LFDRoleCheckPopupRoleButtonHealer.checkButton:SetStyle("CheckButton") LFDRoleCheckPopupRoleButtonTank.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonTank.checkButton:GetFrameLevel() + 1) LFDRoleCheckPopupRoleButtonDPS.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonDPS.checkButton:GetFrameLevel() + 1) LFDRoleCheckPopupRoleButtonHealer.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonHealer.checkButton:GetFrameLevel() + 1) @@ -502,6 +515,19 @@ local function SystemPanelQue() tex:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) tex:InsetPoints() end + + if(AddonList) then + SV.API:Set("Window", AddonList) + SV.API:Set("Button", AddonListEnableAllButton) + SV.API:Set("Button", AddonListDisableAllButton) + SV.API:Set("Button", AddonListDisableAllButton) + SV.API:Set("Button", AddonListCancelButton) + SV.API:Set("Button", AddonListOkayButton) + SV.API:Set("CheckButton", AddonListForceLoad) + SV.API:Set("DropDown", AddonCharacterDropDown) + SV.API:Set("ScrollBar", AddonListScrollFrameScrollBar) + end + for i = 1, #SystemFrameList5 do local this = _G[SystemFrameList5[i].."Header"] if(this) then @@ -633,7 +659,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList15 do local this = _G["InterfaceOptions"..SystemFrameList15[i]] if(this) then - this:SetStyle("Checkbox") + this:SetStyle("CheckButton") end end for i = 1, #SystemFrameList16 do @@ -646,7 +672,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList17 do local this = _G[SystemFrameList17[i]] if(this) then - this:SetStyle("Checkbox") + this:SetStyle("CheckButton") end end for i = 1, #SystemFrameList18 do @@ -663,13 +689,13 @@ local function SystemPanelQue() end AudioOptionsVoicePanelChatMode1KeyBindingButton:ClearAllPoints() AudioOptionsVoicePanelChatMode1KeyBindingButton:SetPoint("CENTER", AudioOptionsVoicePanelBinding, "CENTER", 0, -10) - CompactUnitFrameProfilesRaidStylePartyFrames:SetStyle("Checkbox") + CompactUnitFrameProfilesRaidStylePartyFrames:SetStyle("CheckButton") CompactUnitFrameProfilesGeneralOptionsFrameResetPositionButton:SetStyle("Button") for i = 1, #SystemFrameList20 do local this = _G["CompactUnitFrameProfilesGeneralOptionsFrame"..SystemFrameList20[i]] if(this) then - this:SetStyle("Checkbox") + this:SetStyle("CheckButton") this:SetFrameLevel(40) end end @@ -701,7 +727,7 @@ local function SystemPanelQue() for i = 1, 11 do local this = _G["MacOptionsFrameCheckButton"..i] if(this) then - this:SetStyle("Checkbox") + this:SetStyle("CheckButton") end end MacOptionsButtonKeybindings:ClearAllPoints() diff --git a/SVUI_Skins/components/blizzard/timemanager.lua b/SVUI_Skins/components/blizzard/timemanager.lua index 17f3f17..58c3b20 100644 --- a/SVUI_Skins/components/blizzard/timemanager.lua +++ b/SVUI_Skins/components/blizzard/timemanager.lua @@ -30,9 +30,9 @@ local function TimeManagerStyle() SV.API:Set("DropDown", TimeManagerAlarmMinuteDropDown, 80) SV.API:Set("DropDown", TimeManagerAlarmAMPMDropDown, 80) TimeManagerAlarmMessageEditBox:SetStyle("Editbox") - TimeManagerAlarmEnabledButton:SetStyle("Checkbox") - TimeManagerMilitaryTimeCheck:SetStyle("Checkbox") - TimeManagerLocalTimeCheck:SetStyle("Checkbox") + TimeManagerAlarmEnabledButton:SetStyle("CheckButton") + TimeManagerMilitaryTimeCheck:SetStyle("CheckButton") + TimeManagerLocalTimeCheck:SetStyle("CheckButton") TimeManagerStopwatchFrame:RemoveTextures() TimeManagerStopwatchCheck:SetStyle("!_Frame", "Default") TimeManagerStopwatchCheck:GetNormalTexture():SetTexCoord(unpack(_G.SVUI_ICON_COORDS))