diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index 1012ec8..1b03ec0 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI|r ## Notes: Supervillain UI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global, SVUI_Errors diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua index b653c98..9bce2f6 100644 --- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua +++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/modules/Registry.lua @@ -152,7 +152,7 @@ function table.dump(targetTable) return "{ "..output.." }"; end -function math.parsefloat(value,decimal) +function math.parsefloat(value, decimal) if(decimal and decimal > 0) then local calc1 = 10 ^ decimal; local calc2 = (value * calc1) + 0.5; @@ -204,24 +204,8 @@ function string.explode(str, delim) return res end ---[[ - /$$$$$$$ /$$ /$$ -| $$__ $$ | $$ | $$ -| $$ \ $$ /$$$$$$ /$$$$$$ /$$$$$$ | $$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ -| $$ | $$|____ $$|_ $$_/ |____ $$| $$__ $$|____ $$ /$$_____/ /$$__ $$ -| $$ | $$ /$$$$$$$ | $$ /$$$$$$$| $$ \ $$ /$$$$$$$| $$$$$$ | $$$$$$$$ -| $$ | $$/$$__ $$ | $$ /$$/$$__ $$| $$ | $$/$$__ $$ \____ $$| $$_____/ -| $$$$$$$/ $$$$$$$ | $$$$/ $$$$$$$| $$$$$$$/ $$$$$$$ /$$$$$$$/| $$$$$$$ -|_______/ \_______/ \___/ \_______/|_______/ \_______/|_______/ \_______/ - - -DataBase is a component used to create and manage SVUI data objects. - -It's main purpose is to keep all methods and logic needed to properly maintain -valid data outside of the core object. ---]] - --DATABASE LOCAL HELPERS + local function SanitizeStorage(data) for k,v in pairs(data) do if(k == "STORED" or k == "SAFEDATA" or k == "LAYOUT") then @@ -685,8 +669,8 @@ function lib:RefreshAll() end end -function lib:LiveUpdate() - if(PROFILE_SV.SAFEDATA.NEEDSLIVEUPDATE and not C_PetBattles.IsInBattle()) then +function lib:LiveUpdate(override) + if((PROFILE_SV.SAFEDATA.NEEDSLIVEUPDATE or override) and not C_PetBattles.IsInBattle()) then self:RefreshAll() PROFILE_SV.SAFEDATA.NEEDSLIVEUPDATE = false end @@ -743,20 +727,20 @@ function lib:LoadQueuedPlugins() if(obj and enabled and (not obj.initialized)) then local halt = false - if((not obj.db) and files.PROFILE and _G[files.PROFILE]) then + if(files.PROFILE and _G[files.PROFILE]) then local db = setmetatable({}, meta_transdata) db.data = _G[files.PROFILE] db.defaults = obj.configs obj.db = db end - if((not obj.cache) and files.CACHE and _G[files.CACHE]) then + if(files.CACHE and _G[files.CACHE]) then local cache = setmetatable({}, meta_database) cache.data = _G[files.CACHE] obj.cache = cache end - if((not obj.public) and files.GLOBAL and _G[files.GLOBAL]) then + if(files.GLOBAL and _G[files.GLOBAL]) then local public = setmetatable({}, meta_database) public.data = _G[files.GLOBAL] obj.public = public @@ -807,6 +791,10 @@ function lib:NewPlugin(addonName, addonObject, pfile, gfile, cfile) addonObject.RegisterUpdate = registerUpdate addonObject.UnregisterUpdate = unregisterUpdate + addonObject.public = addonObject.public or {} + addonObject.configs = addonObject.configs or {} + addonObject.db = tablesplice(addonObject.configs, {}) + if(IsAddOnLoaded(addonName) and not lod) then CoreObject.Options.args.plugins.args.pluginOptions.args[schema] = { type = "group", diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc index 6a3d5d2..75755a0 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc @@ -2,7 +2,7 @@ ## Title: oUF ActionPanel ## Notes: Adds a backing to all unit frames that provides many utilities. ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc index 432ad2b..5b400be 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc @@ -2,7 +2,7 @@ ## Title: oUF Afflicted ## Notes: Adds Custom Debuff Highlighting to oUF. ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc index 9cc371a..6d123ed 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc @@ -2,7 +2,7 @@ ## Title: oUF Arcane Charge ## Notes: Adds support for arcane charge indicators to oUF. ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Dependencies: oUF oUF_ArcaneCharge.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc index 88f0fed..4f7ce07 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc @@ -2,7 +2,7 @@ ## Title: oUF Combatant ## Notes: Adds PvP trinket status and spec icons to oUF frames. ## Author: Munglunch -## Version: 5.00 +## Version: 5.1 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua index 0db4ded..e2399de 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua @@ -408,7 +408,7 @@ end function MOD:LoadKeyBinder() self:RefreshActionBars() - Binder:SetParent(SV.UIParent) + Binder:SetParent(SV.Screen) Binder:SetFrameStrata("DIALOG") Binder:SetFrameLevel(99) Binder:EnableMouse(true) diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index f8c37b8..6fccb10 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -73,7 +73,7 @@ LOCAL FUNCTIONS local LibAB = LibStub("LibActionButton-1.0"); local function NewActionBar(barName) - local bar = CreateFrame("Frame", barName, SV.UIParent, "SecureHandlerStateTemplate") + local bar = CreateFrame("Frame", barName, SV.Screen, "SecureHandlerStateTemplate") bar.buttons = {} bar.conditions = "" bar.config = { @@ -967,13 +967,13 @@ CreateActionBars = function(self) thisBar.page = barPageIndex[i] if(i == 1) then - thisBar:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 28) + thisBar:Point("BOTTOM", SV.Screen, "BOTTOM", 0, 28) elseif(i == 2) then thisBar:Point("BOTTOM", _G["SVUI_ActionBar1"], "TOP", 0, -space) elseif(i == 3) then thisBar:Point("BOTTOMLEFT", _G["SVUI_ActionBar1"], "BOTTOMRIGHT", space, 0) elseif(i == 4) then - thisBar:Point("RIGHT", SV.UIParent, "RIGHT", -space, 0) + thisBar:Point("RIGHT", SV.Screen, "RIGHT", -space, 0) elseif(i == 5) then thisBar:Point("BOTTOMRIGHT", _G["SVUI_ActionBar1"], "BOTTOMLEFT", -space, 0) else @@ -1316,11 +1316,11 @@ CreateMicroBar = function(self) local buttonSize = SV.db.SVBar.Micro.buttonsize or 30; local spacing = SV.db.SVBar.Micro.buttonspacing or 1; local barWidth = (buttonSize + spacing) * 13; - local microBar = NewFrame('Frame','SVUI_MicroBar',SV.UIParent) + local microBar = NewFrame('Frame','SVUI_MicroBar',SV.Screen) microBar:Size(barWidth,buttonSize + 6) microBar:SetFrameStrata("HIGH") microBar:SetFrameLevel(0) - microBar:Point('TOP',SV.UIParent,'TOP',0,4) + microBar:Point('TOP',SV.Screen,'TOP',0,4) SV:AddToDisplayAudit(microBar) for i=1,13 do @@ -1381,8 +1381,8 @@ CreateMicroBar = function(self) RefreshMicrobar() - microBar.screenMarker = NewFrame('Frame',nil,SV.UIParent) - microBar.screenMarker:Point('TOP',SV.UIParent,'TOP',0,2) + microBar.screenMarker = NewFrame('Frame',nil,SV.Screen) + microBar.screenMarker:Point('TOP',SV.Screen,'TOP',0,2) microBar.screenMarker:Size(20,20) microBar.screenMarker:SetFrameStrata("BACKGROUND") microBar.screenMarker:SetFrameLevel(4) @@ -1395,8 +1395,8 @@ CreateMicroBar = function(self) end local CreateExtraBar = function(self) - local specialBar = CreateFrame("Frame", "SVUI_SpecialAbility", SV.UIParent) - specialBar:Point("TOP", SV.UIParent, "CENTER", 0, -50) + local specialBar = CreateFrame("Frame", "SVUI_SpecialAbility", SV.Screen) + specialBar:Point("TOP", SV.Screen, "CENTER", 0, -50) specialBar:Size(ExtraActionBarFrame:GetSize()) ExtraActionBarFrame:SetParent(specialBar) ExtraActionBarFrame:ClearAllPoints() diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua index 603697e..227e78f 100644 --- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua +++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua @@ -569,23 +569,24 @@ function MOD:Load() local maxShown = #AURA_ICONS - 1 local CB_HEIGHT = SVUI_MinimapFrame:GetHeight() - 50 local CB_WIDTH = (CB_HEIGHT / maxShown) + 4 - --print("Load "..CB_WIDTH) - if not SV.db.SVAura.enable then return end + if SV.db.SVAura.disableBlizzard then BuffFrame:Die() ConsolidatedBuffs:Die() TemporaryEnchantFrame:Die() InterfaceOptionsFrameCategoriesButton12:SetScale(0.0001) - end - local auras = CreateFrame("Frame", "SVUI_AurasAnchor", SV.UIParent) + end + + local auras = CreateFrame("Frame", "SVUI_AurasAnchor", SV.Screen) auras:SetSize(CB_WIDTH, CB_HEIGHT) auras:Point("TOPRIGHT", Minimap, "TOPLEFT", -8, 0) + self.BuffFrame = CreateAuraHeader("HELPFUL") self.BuffFrame:SetPoint("TOPRIGHT", auras, "TOPLEFT", -8, 0) self.DebuffFrame = CreateAuraHeader("HARMFUL") self.DebuffFrame:SetPoint( "BOTTOMRIGHT", auras, "BOTTOMLEFT", -8, 0) - SVUI_ConsolidatedBuffs:SetParent(SV.UIParent) + SVUI_ConsolidatedBuffs:SetParent(SV.Screen) SVUI_ConsolidatedBuffs:SetAllPoints(auras) SVUI_ConsolidatedBuffs:SetFrameStrata("BACKGROUND") diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index eaef255..a4c8e6f 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -837,12 +837,12 @@ function MOD:ModifyBags() if self.BagFrame then local anchor, x, y = SV.db.SVBag.bags.point, SV.db.SVBag.bags.xOffset, SV.db.SVBag.bags.yOffset self.BagFrame:ClearAllPoints() - self.BagFrame:Point(anchor, SV.UIParent, anchor, x, y) + self.BagFrame:Point(anchor, SV.Screen, anchor, x, y) end if self.BankFrame then local anchor, x, y = SV.db.SVBag.bank.point, SV.db.SVBag.bank.xOffset, SV.db.SVBag.bank.yOffset self.BankFrame:ClearAllPoints() - self.BankFrame:Point(anchor, SV.UIParent, anchor, x, y) + self.BankFrame:Point(anchor, SV.Screen, anchor, x, y) end end end @@ -872,7 +872,7 @@ do local function LoadBagBar() if MOD.BagBarLoaded then return end - local bar = CreateFrame("Frame", "SVUI_BagBar", SV.UIParent) + local bar = CreateFrame("Frame", "SVUI_BagBar", SV.Screen) bar:SetPoint("TOPRIGHT", RightSuperDock, "TOPLEFT", -4, 0) bar.buttons = {} bar:EnableMouse(true) @@ -1220,7 +1220,7 @@ do local bagName = "SVUI_ContainerFrame" local uisCount = #UISpecialFrames + 1; local bagsCount = #self.BagFrames + 1; - local frame = CreateFrame("Button", "SVUI_ContainerFrame", SV.UIParent) + local frame = CreateFrame("Button", "SVUI_ContainerFrame", SV.Screen) frame:SetPanelTemplate("Container") frame:SetFrameStrata("HIGH") @@ -1410,7 +1410,7 @@ do local uisCount = #UISpecialFrames + 1; local bagsCount = #self.BagFrames + 1; - local frame = CreateFrame("Button", bagName, isReagent and self.BankFrame or SV.UIParent) + local frame = CreateFrame("Button", bagName, isReagent and self.BankFrame or SV.Screen) frame:SetPanelTemplate(isReagent and "Action" or "Container") frame:SetFrameStrata("HIGH") @@ -1768,7 +1768,7 @@ function MOD:Load() self:ModifyBags() self.BagFrame:UpdateLayout() - BagFilters:SetParent(SV.UIParent) + BagFilters:SetParent(SV.Screen) BagFilters:SetPanelTemplate("Default") BagFilters.buttons = {} BagFilters:SetFrameStrata("DIALOG") diff --git a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua index 3668d80..cf4e249 100644 --- a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua +++ b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua @@ -290,10 +290,10 @@ function MOD:BreakStuffLoader() if not allowed then return end - BreakStuffButton:SetParent(SuperDockMacroBar) - local size = SuperDockMacroBar.currentSize + BreakStuffButton:SetParent(RightSuperDockUtilityBar) + local size = RightSuperDockUtilityBar.currentSize BreakStuffButton:Size(size, size) - BreakStuffButton:Point("RIGHT", SuperDockMacroBar, "LEFT", -6, 0) + BreakStuffButton:Point("RIGHT", RightSuperDockUtilityBar, "LEFT", -6, 0) BreakStuffButton:Show(); BreakStuffButton:SetFramedButtonTemplate() BreakStuffButton.icon=BreakStuffButton:CreateTexture(nil,"OVERLAY") diff --git a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua b/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua index fd26f7f..33d60e0 100644 --- a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua +++ b/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua @@ -530,7 +530,7 @@ do for _, bag, slot in IterateBagsForSorting(sourceBags, not reverse, "withdraw") do if #emptySlots == 0 then break end local bagSlot = BagEncoder(bag, slot) - local targetBag, targetSlot = BagDecoder(emptySlots) + local targetBag, targetSlot = BagDecoder(emptySlots[1]) if sortingCache[2][bagSlot] and CanItemGoInBag(bag, slot, targetBag) and (canMove == true or canMove(sortingCache[2][bagSlot], bag, slot)) then SetSortingPath(bagSlot, tremove(emptySlots, 1)) end diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index 33b6b33..0a1b2a7 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -141,6 +141,7 @@ local CHAT_FLAG_GM = "[GM] "; LOCAL FUNCTIONS ########################################################## ]]-- +local tabholder = CreateFrame("Frame", "SVUI_ChatTabHolder", UIParent) local ScrollIndicator = CreateFrame("Frame", nil) do @@ -438,7 +439,8 @@ do LeftSuperDock.editboxforced = true; LeftSuperDockToggleButton:GetScript("OnEnter")(LeftSuperDockToggleButton) end - SuperDockAlertLeft:Activate(self) + + LeftSuperDockAlert:Activate(self) end local EditBox_OnEditFocusLost = function(self) @@ -449,7 +451,7 @@ do end end self:Hide() - SuperDockAlertLeft:Deactivate() + LeftSuperDockAlert:Deactivate() end local EditBox_OnTextChanged = function(self) @@ -497,15 +499,15 @@ do local lastTab = TabsList[1]; if(lastTab) then lastTab:ClearAllPoints() - lastTab:Point("LEFT",SuperDockChatTabBar,"LEFT",3,0); + lastTab:Point("LEFT", tabholder, "LEFT", 3, 0); end for chatID,frame in pairs(TabsList) do if(frame and chatID ~= 1 and frame.isDocked) then frame:ClearAllPoints() if(not lastTab) then - frame:Point("LEFT",SuperDockChatTabBar,"LEFT",3,0); + frame:Point("LEFT", tabholder, "LEFT", 3, 0); else - frame:Point("LEFT",lastTab,"RIGHT",6,0); + frame:Point("LEFT", lastTab, "RIGHT", 6, 0); end lastTab = frame end @@ -524,7 +526,7 @@ do frame:SetParent(chat) if(chatID ~= 1) then frame:ClearAllPoints() - frame:Point("TOPLEFT",chat,"BOTTOMLEFT",0,0) + frame:Point("TOPLEFT", chat, "BOTTOMLEFT", 0, 0) end _repositionDockedTabs() end @@ -535,17 +537,17 @@ do TabSafety[name] = true; TabsList[chatID] = frame frame.chatID = chatID; - frame:SetParent(SuperDockChatTabBar) + frame:SetParent(tabholder) _repositionDockedTabs() end local function _customTab(tab, chatID, enabled) if(tab.IsStyled) then return end local tabName = tab:GetName(); - local tabSize = SuperDockChatTabBar.currentSize; + local tabSize = tabholder.currentSize or 22; local tabText = tab.text:GetText() or "Chat "..chatID; - local holder = CreateFrame("Frame", ("SVUI_ChatTab%s"):format(chatID), SuperDockChatTabBar) + local holder = CreateFrame("Frame", ("SVUI_ChatTab%s"):format(chatID), tabholder) holder:SetWidth(tabSize * 1.75) holder:SetHeight(tabSize) tab.chatID = chatID; @@ -653,7 +655,7 @@ do _G[editBoxName.."FocusRight"]:Die() editBox:SetFixedPanelTemplate("Button", true) editBox:SetAltArrowKeyMode(false) - editBox:SetAllPoints(SuperDockAlertLeft) + editBox:SetAllPoints(LeftSuperDockAlert) editBox:HookScript("OnEditFocusGained", EditBox_OnEditFocusGained) editBox:HookScript("OnEditFocusLost", EditBox_OnEditFocusLost) editBox:HookScript("OnTextChanged", EditBox_OnTextChanged) @@ -662,7 +664,7 @@ do chat:SetFading(CHAT_FADING) chat:SetScript("OnHyperlinkClick", SVUI_OnHyperlinkShow) - local alertSize = SuperDockChatTabBar.currentSize * 2; + local alertSize = (tabholder.currentSize or 22) * 2; local alert = CreateFrame("Frame", nil, tab) alert:SetSize(alertSize, alertSize) alert:SetFrameStrata("DIALOG") @@ -729,14 +731,14 @@ do chat:ClearAllPoints() chat:Width(CHAT_WIDTH) chat:Height(CHAT_HEIGHT) - chat:Point("BOTTOMRIGHT",SuperDockWindowLeft,"BOTTOMRIGHT",-4,10) + chat:Point("BOTTOMRIGHT",LeftSuperDockFrameHolder,"BOTTOMRIGHT",-4,10) FCF_SavePositionAndDimensions(chat) end - chat:SetParent(SuperDockWindowLeft) + chat:SetParent(LeftSuperDockFrameHolder) if(not TAB_SKINS) then tab.owner = chat; tab.isDocked = chat.isDocked; - tab:SetParent(SuperDockChatTabBar) + tab:SetParent(tabholder) _modifyTab(tab, false) else tab.owner = chat; @@ -822,7 +824,7 @@ do end local _hook_GDMFrameSetPoint = function(self) - self:SetAllPoints(SuperDockChatTabBar) + self:SetAllPoints(tabholder) end local _hook_GDMScrollSetPoint = function(self, point, anchor, attachTo, x, y) @@ -967,9 +969,9 @@ end function MOD:Load() if(not SV.db.SVChat.enable) then return end - ScrollIndicator:SetParent(SuperDockWindowLeft) + ScrollIndicator:SetParent(LeftSuperDockFrameHolder) ScrollIndicator:SetSize(20,20) - ScrollIndicator:SetPoint("BOTTOMRIGHT", SuperDockWindowLeft, "BOTTOMRIGHT", 6, 0) + ScrollIndicator:SetPoint("BOTTOMRIGHT", LeftSuperDockFrameHolder, "BOTTOMRIGHT", 6, 0) ScrollIndicator:SetFrameStrata("HIGH") ScrollIndicator.icon = ScrollIndicator:CreateTexture(nil, "OVERLAY") ScrollIndicator.icon:SetAllPoints() @@ -983,15 +985,29 @@ function MOD:Load() self:RegisterEvent('PET_BATTLE_CLOSE') SetParseHandlers() + self:UpdateLocals() self:RefreshChatFrames(true) + + local buttonsize = LeftSuperDockToolBar.currentSize or 22 + local barWidth = LeftSuperDock:GetWidth() - buttonsize + local spacing = LeftSuperDock.currentSpacing or 4 + + tabholder:SetFrameStrata("BACKGROUND") + tabholder:Size(barWidth, buttonsize) + tabholder:Point("LEFT", LeftSuperDockToolBar, "RIGHT", spacing, 0) + tabholder:SetFrameLevel(tabholder:GetFrameLevel() + 2) + tabholder.currentSize = buttonsize; + _G.GeneralDockManagerOverflowButton:ClearAllPoints() - _G.GeneralDockManagerOverflowButton:SetPoint('BOTTOMRIGHT', SuperDockChatTabBar, 'BOTTOMRIGHT', -2, 2) + _G.GeneralDockManagerOverflowButton:SetPoint('BOTTOMRIGHT', tabholder, 'BOTTOMRIGHT', -2, 2) _G.GeneralDockManagerOverflowButtonList:SetFixedPanelTemplate('Transparent') - _G.GeneralDockManager:SetAllPoints(SuperDockChatTabBar) + _G.GeneralDockManager:SetAllPoints(tabholder) + SetAllChatHooks() FriendsMicroButton:Die() ChatFrameMenuButton:Die() + _G.InterfaceOptionsSocialPanelTimestampsButton:SetAlpha(0) _G.InterfaceOptionsSocialPanelTimestampsButton:SetScale(0.000001) _G.InterfaceOptionsSocialPanelTimestamps:SetAlpha(0) diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index 870a325..fa403ac 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -67,20 +67,40 @@ GET ADDON DATA ]]-- local SV = select(2, ...) local L = SV.L + local MOD = SV:NewPackage("SVDock", L["Docks"]); + +MOD.Docklets = { + DEFAULT = "", + FRAMES = {}, + TOOLS = {}, + SAFETY = {} +} --[[ ########################################################## LOCAL VARS ########################################################## ]]-- -local DOCKLET_CACHE, TOOL_CACHE, SAFETY_CACHE = {}, {}, {}; -local PREV_TOOL, DEFAULT_DOCKLET; local AddOnButton = CreateFrame("Button", "SVUI_AddonDocklet", UIParent); -local SuperDockletMain = CreateFrame('Frame', 'SuperDockletMain', UIParent); -local SuperDockletExtra = CreateFrame('Frame', 'SuperDockletExtra', UIParent); +local SVUI_AddonDock1 = CreateFrame('Frame', 'SVUI_AddonDock1', UIParent); +local SVUI_AddonDock2 = CreateFrame('Frame', 'SVUI_AddonDock2', UIParent); local DockletMenu = CreateFrame("Frame", "SVUI_DockletMenu", UIParent); -SuperDockletMain.FrameName = "None"; -SuperDockletExtra.FrameName = "None"; +local leftdock = CreateFrame("Frame", "LeftSuperDock", UIParent) +local leftbutton = CreateFrame("Button", "LeftSuperDockToggleButton", UIParent) +local toolbarLeft = CreateFrame("Frame", "LeftSuperDockToolBar", UIParent) +local rightdock = CreateFrame("Frame", "RightSuperDock", UIParent) +local rightbutton = CreateFrame("Button", "RightSuperDockToggleButton", UIParent) +local toolbarRight = CreateFrame("Frame", "RightSuperDockToolBar", UIParent) +local macrobar = CreateFrame("Frame", "RightSuperDockUtilityBar", UIParent) +local leftwindow = CreateFrame("Frame", "LeftSuperDockFrameHolder", leftdock) +local rightwindow = CreateFrame("Frame", "RightSuperDockFrameHolder", rightdock) +local topdock = CreateFrame("Frame", "TopSuperDock", UIParent) +local toolbarTop = CreateFrame("Frame", "TopSuperDockToolBar", UIParent) +toolbarTop.openWidth = 34 + +SVUI_AddonDock1.FrameName = "None"; +SVUI_AddonDock2.FrameName = "None"; + local ICONFILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-BAG-MICRO]]; local TOOL_DATA = { [171] = {0,0.25,0,0.25}, -- PRO-ALCHEMY @@ -97,11 +117,6 @@ local TOOL_DATA = { [197] = {0.25,0.5,0.75,1}, -- PRO-TAILORING } local HEARTH_SPELLS = {556,50977,18960,126892} - -local rez = GetCVar("gxResolution"); -local gxWidth = tonumber(rez:match("(%d+)x%d+")); -local bw = gxWidth * 0.5 -local defaultStatBarWidth = min(bw, 800) --[[ ########################################################## PRE VARS/FUNCTIONS @@ -127,8 +142,9 @@ local function SetFilterMenu(self) end local function CycleDocklets() - for i=1, #DOCKLET_CACHE do - local f = DOCKLET_CACHE[i] + local list = MOD.Docklets.FRAMES + for i=1, #list do + local f = list[i] if(not InCombatLockdown() or (InCombatLockdown() and (f.IsProtected and not f:IsProtected()))) then local b = _G[f.ToggleName] b:Deactivate() @@ -140,10 +156,10 @@ local function CycleDocklets() end local function GetDefaultWindow() - local window = DEFAULT_DOCKLET + local window = MOD.Docklets.DEFAULT if window and _G[window] then - SuperDockWindowRight.FrameName = window - SuperDockWindowRight:Show() + RightSuperDockFrameHolder.FrameName = window + RightSuperDockFrameHolder:Show() end end @@ -158,18 +174,18 @@ local AlertDeactivate = function(self) self:Height(1) end -local leftalert = CreateFrame("Frame", "SuperDockAlertLeft", UIParent) +local leftalert = CreateFrame("Frame", "LeftSuperDockAlert", UIParent) leftalert.Activate = AlertActivate leftalert.Deactivate = AlertDeactivate -local rightalert = CreateFrame("Frame", "SuperDockAlertRight", UIParent) +local rightalert = CreateFrame("Frame", "RightSuperDockAlert", UIParent) rightalert.Activate = AlertActivate rightalert.Deactivate = AlertDeactivate local rightDockSizeHook = function(self,width,height) - SuperDockWindowRight:Width(width) - SuperDockWindowRight:Height(height) - SuperDockWindowRight:SetPoint("BOTTOMLEFT", SuperDockAlertRight, "TOPLEFT", 0, 0) + RightSuperDockFrameHolder:Width(width) + RightSuperDockFrameHolder:Height(height) + RightSuperDockFrameHolder:SetPoint("BOTTOMLEFT", RightSuperDockAlert, "TOPLEFT", 0, 0) end local ToggleDocks = function(self) @@ -186,23 +202,24 @@ local ToggleDocks = function(self) end local Docklet_OnShow = function(self) - if(_G[SuperDockWindowRight.FrameName]) then - if(InCombatLockdown() and (_G[SuperDockWindowRight.FrameName].IsProtected and _G[SuperDockWindowRight.FrameName]:IsProtected())) then return end - _G[SuperDockWindowRight.FrameName]:Show() + if(_G[RightSuperDockFrameHolder.FrameName]) then + if(InCombatLockdown() and (_G[RightSuperDockFrameHolder.FrameName].IsProtected and _G[RightSuperDockFrameHolder.FrameName]:IsProtected())) then return end + _G[RightSuperDockFrameHolder.FrameName]:Show() end - if _G[SuperDockWindowRight.SecondName] then - if(InCombatLockdown() and (_G[SuperDockWindowRight.SecondName].IsProtected and _G[SuperDockWindowRight.SecondName]:IsProtected())) then return end - _G[SuperDockWindowRight.SecondName]:Show() + if _G[RightSuperDockFrameHolder.SecondName] then + if(InCombatLockdown() and (_G[RightSuperDockFrameHolder.SecondName].IsProtected and _G[RightSuperDockFrameHolder.SecondName]:IsProtected())) then return end + _G[RightSuperDockFrameHolder.SecondName]:Show() end end -local DockletButton_SaveColors = function(self, pG, iG, locked) - if(locked and (locked ~= nil) and self._colorLocked) then return end - self._panelGradient = pG - self._iconGradient = iG - self._colorLocked = locked - self:SetPanelColor(pG) - self.icon:SetGradient(unpack(SV.Media.gradient[iG])) +local DockletButton_SaveColors = function(self, bg, ig, locked) + if(locked and (locked ~= nil) and self:GetAttribute("colorLocked")) then return end + self:SetAttribute("bgGradient", bg) + self:SetAttribute("iconGradient", ig) + self:SetAttribute("colorLocked", locked) + + self:SetPanelColor(bg) + self.Icon:SetGradient(unpack(SV.Media.gradient[ig])) end local DockButtonActivate = function(self) @@ -224,7 +241,7 @@ local DockletButton_OnEnter = function(self, ...) end self:SetPanelColor("highlight") - self.icon:SetGradient(unpack(SV.Media.gradient.bizzaro)) + self.Icon:SetGradient(unpack(SV.Media.gradient.bizzaro)) GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) GameTooltip:ClearLines() @@ -242,8 +259,11 @@ local DockletButton_OnLeave = function(self, ...) SV:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) end - self:SetPanelColor(self._panelGradient) - self.icon:SetGradient(unpack(SV.Media.gradient[self._iconGradient])) + local bg = self:GetAttribute("bgGradient") + local ig = self:GetAttribute("iconGradient") + + self:SetPanelColor(bg) + self.Icon:SetGradient(unpack(SV.Media.gradient[ig])) GameTooltip:Hide() end @@ -255,12 +275,12 @@ local DockletButton_OnClick = function(self, button) else local linkedFrame = self.FrameName if linkedFrame and _G[linkedFrame] then - SuperDockWindowRight.FrameName = linkedFrame + RightSuperDockFrameHolder.FrameName = linkedFrame if not _G[linkedFrame]:IsShown() then CycleDocklets() end - if not SuperDockWindowRight:IsShown()then - SuperDockWindowRight:Show() + if not RightSuperDockFrameHolder:IsShown()then + RightSuperDockFrameHolder:Show() end _G[linkedFrame]:Show() self:Activate() @@ -279,53 +299,53 @@ local DockletFrame_OnShow = function(self) end local AddonDockletToggle = function(self) - if SuperDockletMain.FrameName and _G[SuperDockletMain.FrameName] then - if not _G[SuperDockletMain.FrameName]:IsShown() then + if SVUI_AddonDock1.FrameName and _G[SVUI_AddonDock1.FrameName] then + if not _G[SVUI_AddonDock1.FrameName]:IsShown() then CycleDocklets() - if not InCombatLockdown() and not SuperDockletMain:IsShown()then - SuperDockletMain:Show() + if not InCombatLockdown() and not SVUI_AddonDock1:IsShown()then + SVUI_AddonDock1:Show() end - _G[SuperDockletMain.FrameName]:Show() + _G[SVUI_AddonDock1.FrameName]:Show() self:Activate() - elseif not SuperDockletMain:IsShown()then - if not InCombatLockdown() then SuperDockletMain:Show() end - _G[SuperDockletMain.FrameName]:Show() + elseif not SVUI_AddonDock1:IsShown()then + if not InCombatLockdown() then SVUI_AddonDock1:Show() end + _G[SVUI_AddonDock1.FrameName]:Show() self:Activate() end else - SuperDockletMain.FrameName = "None" + SVUI_AddonDock1.FrameName = "None" if InCombatLockdown()then return end - if SuperDockletMain:IsShown()then - SuperDockletMain:Hide() + if SVUI_AddonDock1:IsShown()then + SVUI_AddonDock1:Hide() else - SuperDockletMain:Show() + SVUI_AddonDock1:Show() end self:Deactivate() end - if SV.db.SVDock.docklets.enableExtra and SuperDockletExtra.FrameName and _G[SuperDockletExtra.FrameName] then - if not _G[SuperDockletExtra.FrameName]:IsShown() then - if not InCombatLockdown() and not SuperDockletExtra:IsShown()then - SuperDockletExtra:Show() - SuperDockletMain:Show() + if SV.db.SVDock.docklets.enableExtra and SVUI_AddonDock2.FrameName and _G[SVUI_AddonDock2.FrameName] then + if not _G[SVUI_AddonDock2.FrameName]:IsShown() then + if not InCombatLockdown() and not SVUI_AddonDock2:IsShown()then + SVUI_AddonDock2:Show() + SVUI_AddonDock1:Show() end - _G[SuperDockletExtra.FrameName]:Show() + _G[SVUI_AddonDock2.FrameName]:Show() self:Activate() - elseif not SuperDockletExtra:IsShown() then + elseif not SVUI_AddonDock2:IsShown() then if not InCombatLockdown() then - SuperDockletExtra:Show() - SuperDockletMain:Show() + SVUI_AddonDock2:Show() + SVUI_AddonDock1:Show() end - _G[SuperDockletExtra.FrameName]:Show() + _G[SVUI_AddonDock2.FrameName]:Show() self:Activate() else if not InCombatLockdown() then - SuperDockletExtra:Hide() - SuperDockletMain:Hide() + SVUI_AddonDock2:Hide() + SVUI_AddonDock1:Hide() end self:Deactivate() end else - SuperDockletExtra.FrameName = "None" + SVUI_AddonDock2.FrameName = "None" end end @@ -364,7 +384,7 @@ local function SetSuperDockStyle(dock) return backdrop end -SV.CycleDocklets = CycleDocklets +MOD.CycleDocklets = CycleDocklets --[[ ########################################################## CORE FUNCTIONS @@ -378,12 +398,41 @@ end DOCKLET HELPERS ########################################################## ]]-- -function MOD:ActivateDockletButton(button, clickFunction, tipFunction) - button._panelGradient = "default" - button._iconGradient = "icon" - button.SaveColors = DockletButton_SaveColors - button:SaveColors("default", "icon") +local function RemoveTool(button) + if not button or not button.listIndex then return end + local name = button:GetName(); + if not MOD.Docklets.SAFETY[name] then return end + MOD.Docklets.SAFETY[name] = false; + local i = button.listIndex; + tremove(MOD.Docklets.TOOLS, i) + local width; + local height = RightSuperDockToolBar.currentSize; + local stored = MOD.Docklets.TOOLS + local PREV_TOOL = stored[#stored] + local xOffset = (#stored - 1) * (height + 6) + 6 + PREV_TOOL:SetPoint("RIGHT", RightSuperDockToolBar, "RIGHT", (xOffset * -1), 0); + width = #stored * (height + 6) + RightSuperDockToolBar:Size(width, height) + button:Hide() +end + +local function AddTool(button) + local name = button:GetName(); + if MOD.Docklets.SAFETY[name] then return end + MOD.Docklets.SAFETY[name] = true; + local width; + local height = RightSuperDockToolBar.currentSize or 22; + local xOffset = #MOD.Docklets.TOOLS * (height + 6) + 6 + button:SetPoint("RIGHT", RightSuperDockToolBar, "RIGHT", (xOffset * -1), 0); + tinsert(MOD.Docklets.TOOLS, button) + button.listIndex = #MOD.Docklets.TOOLS; + width = #MOD.Docklets.TOOLS * (height + 6) + RightSuperDockToolBar:Size(width, height) + button:Show() +end +local function ActivateDockletButton(button, clickFunction, tipFunction, isdefault) + button.SaveColors = DockletButton_SaveColors button.Activate = DockButtonActivate button.Deactivate = DockButtonDeactivate @@ -391,6 +440,13 @@ function MOD:ActivateDockletButton(button, clickFunction, tipFunction) button.CustomTooltip = tipFunction end + if(isdefault) then + MOD.Docklets.DEFAULT = button:GetAttribute("ownerFrame") + button:SaveColors("green", "green") + else + button:SaveColors("default", "icon") + end + button:SetScript("OnEnter", DockletButton_OnEnter) button:SetScript("OnLeave", DockletButton_OnLeave) @@ -399,27 +455,25 @@ function MOD:ActivateDockletButton(button, clickFunction, tipFunction) end end -function MOD:CreateBasicToolButton(name,texture,onclick,frameName,isdefault) +local function CreateBasicToolButton(name, texture, onclick, frameName, isdefault) local fName = frameName or name; local dockIcon = texture or [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-ADDON]]; local clickFunction = (type(onclick)=="function") and onclick or DockletButton_OnClick; - local size = SuperDockToolBarRight.currentSize; - local button = _G[fName .. "_ToolBarButton"] or CreateFrame("Button", ("%s_ToolBarButton"):format(fName), SuperDockToolBarRight) - SV.AddTool(button) + local size = RightSuperDockToolBar.currentSize; + local button = _G[fName .. "_ToolBarButton"] or CreateFrame("Button", ("%s_ToolBarButton"):format(fName), RightSuperDockToolBar, "SVUI_DockletButtonTemplate") + + AddTool(button) + button:Size(size,size) button:SetFramedButtonTemplate() - button.icon = button:CreateTexture(nil,"OVERLAY") - button.icon:FillInner(button,2,2) - button.icon:SetTexture(dockIcon) - button.TText = "Open " .. name; - button.FrameName = fName - MOD:ActivateDockletButton(button, clickFunction) - _G[fName].ToggleName = fName.."_ToolBarButton"; - if(isdefault and isdefault == true) then - DEFAULT_DOCKLET = fName - button:SaveColors("green", "green") - end + button.Icon:SetTexture(dockIcon) + button:SetAttribute("tipText", "Open " .. name) + button:SetAttribute("ownerFrame", fName) + ActivateDockletButton(button, clickFunction, nil, isdefault) + + _G[fName].ToggleName = fName.."_ToolBarButton"; + return button end --[[ @@ -427,14 +481,22 @@ end DOCKS ########################################################## ]]-- -function MOD:CreateSuperBorders() +function MOD:CreateDockPanels() + local leftWidth = SV.db.SVDock.dockLeftWidth or 350; + local leftHeight = SV.db.SVDock.dockLeftHeight or 180; + local rightWidth = SV.db.SVDock.dockRightWidth or 350; + local rightHeight = SV.db.SVDock.dockRightHeight or 180; + local buttonsize = SV.db.SVDock.buttonSize or 22; + local spacing = SV.db.SVDock.buttonSpacing or 4; local texture = [[Interface\AddOns\SVUI\assets\artwork\Template\BUTTON]]; - local TopPanel = CreateFrame("Frame", "SVUITopPanel", SV.UIParent) - TopPanel:Point("TOPLEFT", SV.UIParent, "TOPLEFT", -1, 1) - TopPanel:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", 1, 1) - TopPanel:Height(14) - TopPanel:SetBackdrop({ + -- [[ TOP AND BOTTOM BORDERS ]] -- + + local TopBorder = CreateFrame("Frame", "SVUITopBorder", SV.Screen) + TopBorder:Point("TOPLEFT", SV.Screen, "TOPLEFT", -1, 1) + TopBorder:Point("TOPRIGHT", SV.Screen, "TOPRIGHT", 1, 1) + TopBorder:Height(14) + TopBorder:SetBackdrop({ bgFile = texture, edgeFile = [[Interface\BUTTONS\WHITE8X8]], tile = false, @@ -442,22 +504,22 @@ function MOD:CreateSuperBorders() edgeSize = 1, insets = {left = 0, right = 0, top = 0, bottom = 0} }) - TopPanel:SetBackdropColor(unpack(SV.Media.color.special)) - TopPanel:SetBackdropBorderColor(0,0,0,1) - TopPanel:SetFrameLevel(0) - TopPanel:SetFrameStrata('BACKGROUND') - self.TopPanel = TopPanel; - self.TopPanel:SetScript("OnShow", function(this) + TopBorder:SetBackdropColor(unpack(SV.Media.color.special)) + TopBorder:SetBackdropBorderColor(0,0,0,1) + TopBorder:SetFrameLevel(0) + TopBorder:SetFrameStrata('BACKGROUND') + self.TopBorder = TopBorder; + self.TopBorder:SetScript("OnShow", function(this) this:SetFrameLevel(0) this:SetFrameStrata('BACKGROUND') end) - self:TopPanelVisibility() + self:TopBorderVisibility() - local BottomPanel = CreateFrame("Frame", "SVUIBottomPanel", SV.UIParent) - BottomPanel:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", -1, -1) - BottomPanel:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", 1, -1) - BottomPanel:Height(14) - BottomPanel:SetBackdrop({ + local BottomBorder = CreateFrame("Frame", "SVUIBottomBorder", SV.Screen) + BottomBorder:Point("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", -1, -1) + BottomBorder:Point("BOTTOMRIGHT", SV.Screen, "BOTTOMRIGHT", 1, -1) + BottomBorder:Height(14) + BottomBorder:SetBackdrop({ bgFile = texture, edgeFile = [[Interface\BUTTONS\WHITE8X8]], tile = false, @@ -465,175 +527,115 @@ function MOD:CreateSuperBorders() edgeSize = 1, insets = {left = 0, right = 0, top = 0, bottom = 0} }) - BottomPanel:SetBackdropColor(unpack(SV.Media.color.special)) - BottomPanel:SetBackdropBorderColor(0,0,0,1) - BottomPanel:SetFrameLevel(0) - BottomPanel:SetFrameStrata('BACKGROUND') - self.BottomPanel = BottomPanel; - self.BottomPanel:SetScript("OnShow", function(this) + BottomBorder:SetBackdropColor(unpack(SV.Media.color.special)) + BottomBorder:SetBackdropBorderColor(0,0,0,1) + BottomBorder:SetFrameLevel(0) + BottomBorder:SetFrameStrata('BACKGROUND') + self.BottomBorder = BottomBorder; + self.BottomBorder:SetScript("OnShow", function(this) this:SetFrameLevel(0) this:SetFrameStrata('BACKGROUND') end) - MOD:BottomPanelVisibility() -end + self:BottomBorderVisibility() + + -- [[ BOTTOM LEFT DOCK ]] -- + + leftdock:SetFrameStrata("BACKGROUND") + leftdock:Point("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", 1, buttonsize + 10) + leftdock:Size(leftWidth, leftHeight) + leftdock.currentSpacing = spacing + SV.Mentalo:Add(leftdock, L["Left Dock"]) + + -- [[ CORNER BUTTON ]] -- + + leftbutton:Point("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", 1, 2) + leftbutton:Size(buttonsize, buttonsize) + leftbutton:SetFramedButtonTemplate() + leftbutton.Icon = leftbutton:CreateTexture(nil, "OVERLAY", nil, 0) + leftbutton.Icon:FillInner(leftbutton,2,2) + leftbutton.Icon:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\SVUI-EMBLEM") + leftbutton.TText = L["Toggle Docks"] + leftbutton:RegisterForClicks("AnyUp") + ActivateDockletButton(leftbutton, ToggleDocks) + + -- [[ TOOLBARS AND OTHER NONSENSE ]] -- + + toolbarLeft:Point("LEFT", leftbutton, "RIGHT", spacing, 0) + toolbarLeft:Width(1) + toolbarLeft:Height(buttonsize) + toolbarLeft.currentSize = buttonsize; + + leftalert:SetParent(leftdock) + leftalert:SetFrameStrata("BACKGROUND") + leftalert:Size(leftWidth, 1) + leftalert:Point("BOTTOMRIGHT", leftdock, "BOTTOMRIGHT",0, 0) + leftalert:SetFrameLevel(leftalert:GetFrameLevel() + 2) + leftalert.Activate = AlertActivate + leftalert.Deactivate = AlertDeactivate + + leftwindow:SetFrameStrata("BACKGROUND") + leftwindow:Point("BOTTOMRIGHT", leftalert, "TOPRIGHT", 0, 0) + leftwindow:Size(leftWidth, leftHeight) + leftdock.backdrop = SetSuperDockStyle(leftwindow) + + -- [[ BOTTOM RIGHT DOCK ]] -- -local function BorderColorUpdates() - SVUITopPanel:SetBackdropColor(unpack(SV.Media.color.special)) - SVUITopPanel:SetBackdropBorderColor(0,0,0,1) - SVUIBottomPanel:SetBackdropColor(unpack(SV.Media.color.special)) - SVUIBottomPanel:SetBackdropBorderColor(0,0,0,1) -end - -SV:NewCallback(BorderColorUpdates) - -function MOD:CreateDockPanels() - local leftWidth = SV.db.SVDock.dockLeftWidth or 350; - local leftHeight = SV.db.SVDock.dockLeftHeight or 180; - local rightWidth = SV.db.SVDock.dockRightWidth or 350; - local rightHeight = SV.db.SVDock.dockRightHeight or 180; - local buttonsize = SV.db.SVDock.buttonSize or 22; - local spacing = SV.db.SVDock.buttonSpacing or 4; - local statBarWidth = SV.db.SVDock.dockStatWidth or defaultStatBarWidth - local STATS = SV.SVStats; - - -- [[ CORNER BUTTON ]] -- - - local leftbutton = CreateFrame("Button", "LeftSuperDockToggleButton", SV.UIParent) - leftbutton:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", 1, 2) - leftbutton:Size(buttonsize, buttonsize) - leftbutton:SetFramedButtonTemplate() - leftbutton.icon = leftbutton:CreateTexture(nil, "OVERLAY", nil, 0) - leftbutton.icon:FillInner(leftbutton,2,2) - leftbutton.icon:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\SVUI-EMBLEM") - leftbutton.TText = L["Toggle Docks"] - leftbutton:RegisterForClicks("AnyUp") - self:ActivateDockletButton(leftbutton, ToggleDocks) - -- [[ TOOLBARS AND OTHER NONSENSE ]] -- - - local toolbarLeft = CreateFrame("Frame", "SuperDockToolBarLeft", SV.UIParent) - toolbarLeft:Point("LEFT", leftbutton, "RIGHT", spacing, 0) - toolbarLeft:Width(1) - toolbarLeft:Height(buttonsize) - toolbarLeft.currentSize = buttonsize; - - local leftstation = CreateFrame("Frame", "SuperDockChatTabBar", SV.UIParent) - leftstation:SetFrameStrata("BACKGROUND") - leftstation:Size(leftWidth - buttonsize, buttonsize) - leftstation:Point("LEFT", toolbarLeft, "RIGHT", spacing, 0) - leftstation:SetFrameLevel(leftstation:GetFrameLevel() + 2) - leftstation.currentSize = buttonsize; - - local leftdock = CreateFrame("Frame", "LeftSuperDock", SV.UIParent) - leftdock:SetFrameStrata("BACKGROUND") - leftdock:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", 1, buttonsize + 10) - leftdock:Size(leftWidth, leftHeight) - SV.Mentalo:Add(leftdock, L["Left Dock"]) - - leftalert:SetParent(leftdock) - leftalert:SetFrameStrata("BACKGROUND") - leftalert:Size(leftWidth, 1) - leftalert:Point("BOTTOMRIGHT", leftdock, "BOTTOMRIGHT",0, 0) - leftalert:SetFrameLevel(leftalert:GetFrameLevel() + 2) - leftalert.Activate = AlertActivate - leftalert.Deactivate = AlertDeactivate - - local leftwindow = CreateFrame("Frame", "SuperDockWindowLeft", leftdock) - leftwindow:SetFrameStrata("BACKGROUND") - leftwindow:Point("BOTTOMRIGHT", leftalert, "TOPRIGHT", 0, 0) - leftwindow:Size(leftWidth, leftHeight) - leftdock.backdrop = SetSuperDockStyle(leftwindow) - - -- [[ CORNER BUTTON ]] -- - - local rightbutton = CreateFrame("Button", "RightSuperDockToggleButton", SV.UIParent) - rightbutton:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", -1, 2) - rightbutton:Size(buttonsize, buttonsize) - rightbutton:SetFramedButtonTemplate() - rightbutton.icon = rightbutton:CreateTexture(nil, "OVERLAY") - rightbutton.icon:FillInner(rightbutton,2,2) - rightbutton.icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-HENCHMAN]]) - rightbutton.TText = "Call Henchman!" - rightbutton:RegisterForClicks("AnyUp") - self:ActivateDockletButton(rightbutton, SV.ToggleHenchman) - -- [[ TOOLBARS AND OTHER NONSENSE ]] -- - - local toolbarRight = CreateFrame("Frame", "SuperDockToolBarRight", SV.UIParent) - toolbarRight:Point("RIGHT", rightbutton, "LEFT", -spacing, 0) - toolbarRight:Size(1, buttonsize) - toolbarRight.currentSize = buttonsize; - - local macrobar = CreateFrame("Frame", "SuperDockMacroBar", SV.UIParent) - macrobar:Point("RIGHT", toolbarRight, "LEFT", -spacing, 0) - macrobar:Size(1, buttonsize) - macrobar.currentSize = buttonsize; - - local rightdock = CreateFrame("Frame", "RightSuperDock", SV.UIParent) rightdock:SetFrameStrata("BACKGROUND") - rightdock:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", -1, buttonsize + 10) + rightdock:Point("BOTTOMRIGHT", SV.Screen, "BOTTOMRIGHT", -1, buttonsize + 10) rightdock:Size(rightWidth, rightHeight) SV.Mentalo:Add(rightdock, L["Right Dock"]) - rightalert:SetParent(rightdock) - rightalert:SetFrameStrata("BACKGROUND") - rightalert:Size(rightWidth, 1) - rightalert:Point("BOTTOMLEFT", rightdock, "BOTTOMLEFT", 0, 0) - rightalert:SetFrameLevel(rightalert:GetFrameLevel() + 2) - rightalert.Activate = AlertActivate - rightalert.Deactivate = AlertDeactivate - - local rightwindow = CreateFrame("Frame", "SuperDockWindowRight", rightdock) - rightwindow:SetFrameStrata("BACKGROUND") - rightwindow:Point("BOTTOMLEFT", rightalert, "TOPLEFT", 0, 0) - rightwindow:Size(rightWidth, rightHeight) - rightdock.backdrop = SetSuperDockStyle(rightwindow) + -- [[ CORNER BUTTON ]] -- + + rightbutton:Point("BOTTOMRIGHT", SV.Screen, "BOTTOMRIGHT", -1, 2) + rightbutton:Size(buttonsize, buttonsize) + rightbutton:SetFramedButtonTemplate() + rightbutton.Icon = rightbutton:CreateTexture(nil, "OVERLAY") + rightbutton.Icon:FillInner(rightbutton,2,2) + rightbutton.Icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-HENCHMAN]]) + rightbutton.TText = "Call Henchman!" + rightbutton:RegisterForClicks("AnyUp") + ActivateDockletButton(rightbutton, SV.ToggleHenchman) + + -- [[ TOOLBARS AND OTHER NONSENSE ]] -- + + toolbarRight:Point("RIGHT", rightbutton, "LEFT", -spacing, 0) + toolbarRight:Size(1, buttonsize) + toolbarRight.currentSize = buttonsize; + + macrobar:Point("RIGHT", toolbarRight, "LEFT", -spacing, 0) + macrobar:Size(1, buttonsize) + macrobar.currentSize = buttonsize; + + rightalert:SetParent(rightdock) + rightalert:SetFrameStrata("BACKGROUND") + rightalert:Size(rightWidth, 1) + rightalert:Point("BOTTOMLEFT", rightdock, "BOTTOMLEFT", 0, 0) + rightalert:SetFrameLevel(rightalert:GetFrameLevel() + 2) + rightalert.Activate = AlertActivate + rightalert.Deactivate = AlertDeactivate + + rightwindow:SetFrameStrata("BACKGROUND") + rightwindow:Point("BOTTOMLEFT", rightalert, "TOPLEFT", 0, 0) + rightwindow:Size(rightWidth, rightHeight) + rightdock.backdrop = SetSuperDockStyle(rightwindow) if SV.cache.Docks.SuperDockFaded then LeftSuperDock:Hide() RightSuperDock:Hide() end - local toolbarTop = CreateFrame("Frame", "SuperDockToolBarTop", SV.UIParent) - toolbarTop:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 2, -4) - toolbarTop:Size(1, buttonsize - 12) - toolbarTop.openWidth = buttonsize + 12; + -- [[ TOP LEFT DOCK ]] -- - --TOP STAT HOLDERS - local topWidth = (leftWidth + rightWidth) * 0.8 - local topanchor = CreateFrame("Frame", "SuperDockTopDataAnchor", SV.UIParent) - topanchor:Size(topWidth - 2, buttonsize - 8) - topanchor:Point("LEFT", toolbarTop, "RIGHT", spacing, 0) - - SV:AddToDisplayAudit(topanchor) - - local topleftdata = CreateFrame("Frame", "TopLeftDataPanel", topanchor) - topleftdata:Size((topWidth * 0.5) - 1, buttonsize - 8) - topleftdata:Point("LEFT", topanchor, "LEFT", 0, 0) - STATS:NewAnchor(topleftdata, 3, "ANCHOR_CURSOR", true) - SV.Mentalo:Add(topleftdata, L["Stats Dock 1"]) - - local toprightdata = CreateFrame("Frame", "TopRightDataPanel", topanchor) - toprightdata:Size((topWidth * 0.5) - 1, buttonsize - 8) - toprightdata:Point("RIGHT", topanchor, "RIGHT", 0, 0) - STATS:NewAnchor(toprightdata, 3, "ANCHOR_CURSOR", true) - SV.Mentalo:Add(toprightdata, L["Stats Dock 2"]) - - --BOTTOM STAT HOLDERS - local bottomanchor = CreateFrame("Frame", "SuperDockBottomDataAnchor", SV.UIParent) - bottomanchor:Size(statBarWidth - 2, buttonsize - 8) - bottomanchor:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 2) - --SV:AddToDisplayAudit(bottomanchor) - - local bottomleftdata = CreateFrame("Frame", "BottomLeftDataPanel", bottomanchor) - bottomleftdata:Size((statBarWidth * 0.5) - 1, buttonsize - 8) - bottomleftdata:Point("LEFT", bottomanchor, "LEFT", 0, 0) - STATS:NewAnchor(bottomleftdata, 3, "ANCHOR_CURSOR") - SV.Mentalo:Add(bottomleftdata, L["Stats Dock 3"]) - - local bottomrightdata = CreateFrame("Frame", "BottomRightDataPanel", bottomanchor) - bottomrightdata:Size((statBarWidth * 0.5) - 1, buttonsize - 8) - bottomrightdata:Point("RIGHT", bottomanchor, "RIGHT", 0, 0) - STATS:NewAnchor(bottomrightdata, 3, "ANCHOR_CURSOR") - SV.Mentalo:Add(bottomrightdata, L["Stats Dock 4"]) + topdock:SetFrameStrata("BACKGROUND") + topdock:Point("TOPLEFT", SV.Screen, "TOPLEFT", 1, -(buttonsize + 10)) + topdock:Size(leftWidth, leftHeight) + SV.Mentalo:Add(topdock, L["Top Dock"]) + + toolbarTop:Point("TOPLEFT", SV.Screen, "TOPLEFT", 1, -2) + toolbarTop:Size(1, buttonsize) + toolbarTop.openWidth = buttonsize + 12; --RIGHT CLICK MENU - DockletMenu:SetParent(SV.UIParent) + + DockletMenu:SetParent(SV.Screen) DockletMenu:SetPanelTemplate("Default") DockletMenu.buttons = {} DockletMenu:SetFrameStrata("DIALOG") @@ -676,11 +678,21 @@ function MOD:CreateDockPanels() DockletMenu.buttons[i]:Show() end + DockletMenu:SetSize(135, 94) DockletMenu:Hide() SV:AddToDisplayAudit(DockletMenu) end +local function BorderColorUpdates() + SVUITopBorder:SetBackdropColor(unpack(SV.Media.color.special)) + SVUITopBorder:SetBackdropBorderColor(0,0,0,1) + SVUIBottomBorder:SetBackdropColor(unpack(SV.Media.color.special)) + SVUIBottomBorder:SetBackdropBorderColor(0,0,0,1) +end + +SV:NewCallback(BorderColorUpdates) + do local LastAddedMacro; local MacroCount = 0; @@ -741,30 +753,30 @@ do local function AddMacroTool(frame) local width; - local height = SuperDockToolBarRight.currentSize; + local height = RightSuperDockToolBar.currentSize; if not LastAddedMacro then - frame:Point("RIGHT", SuperDockMacroBar, "RIGHT", -6, 0); + frame:Point("RIGHT", RightSuperDockUtilityBar, "RIGHT", -6, 0); else frame:Point("RIGHT", LastAddedMacro, "LEFT", -6, 0); end LastAddedMacro = frame; MacroCount = MacroCount + 1; width = MacroCount * (height + 6) - SuperDockMacroBar:Size(width, height) + RightSuperDockUtilityBar:Size(width, height) end local function CreateMacroToolButton(proName, proID, itemID, size) local data = TOOL_DATA[proID] if(not data) then return end - local button = CreateFrame("Button", ("%s_MacroBarButton"):format(itemID), SuperDockMacroBar, "SecureActionButtonTemplate") + local button = CreateFrame("Button", ("%s_MacroBarButton"):format(itemID), RightSuperDockUtilityBar, "SecureActionButtonTemplate") button:Size(size, size) AddMacroTool(button) button:SetFramedButtonTemplate() - button.icon = button:CreateTexture(nil, "OVERLAY") - button.icon:FillInner(button, 2, 2) - button.icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\PROFESSIONS]]) - button.icon:SetTexCoord(data[1], data[2], data[3], data[4]) - button.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + button.Icon = button:CreateTexture(nil, "OVERLAY") + button.Icon:FillInner(button, 2, 2) + button.Icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\PROFESSIONS]]) + button.Icon:SetTexCoord(data[1], data[2], data[3], data[4]) + button.Icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) button.skillName = proName; button.itemId = itemID; button.TText = proName; @@ -788,27 +800,27 @@ do button:SetAttribute("macrotext", "/cast " .. proName) end - MOD:ActivateDockletButton(button, nil, SetMacroTooltip) + ActivateDockletButton(button, nil, SetMacroTooltip) end function MOD:LoadToolBarProfessions() - if(MOD.ToolBarLoaded) then return end + if(SV.ToolBarLoaded) then return end if(InCombatLockdown()) then MOD:RegisterEvent("PLAYER_REGEN_ENABLED"); return end - local size = SuperDockMacroBar.currentSize - local hearth = CreateFrame("Button", "RightSuperDockHearthButton", SuperDockMacroBar, "SecureActionButtonTemplate") + local size = RightSuperDockUtilityBar.currentSize + local hearth = CreateFrame("Button", "RightSuperDockHearthButton", RightSuperDockUtilityBar, "SecureActionButtonTemplate") hearth:Size(size, size) AddMacroTool(hearth) hearth:SetFramedButtonTemplate() - hearth.icon = hearth:CreateTexture(nil, "OVERLAY", nil, 0) - hearth.icon:FillInner(hearth,2,2) - hearth.icon:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\DOCK-HEARTH") - hearth.icon:SetTexCoord(0,0.5,0,1) + hearth.Icon = hearth:CreateTexture(nil, "OVERLAY", nil, 0) + hearth.Icon:FillInner(hearth,2,2) + hearth.Icon:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\DOCK-HEARTH") + hearth.Icon:SetTexCoord(0,0.5,0,1) hearth:RegisterForClicks("AnyUp") hearth:SetAttribute("type", "item") hearth:SetAttribute("item", "Hearthstone") - MOD:ActivateDockletButton(hearth, nil, SetHearthTooltip) + ActivateDockletButton(hearth, nil, SetHearthTooltip) for i = 1, #HEARTH_SPELLS do if(IsSpellKnown(HEARTH_SPELLS[i])) then @@ -846,7 +858,7 @@ do end end - MOD.ToolBarLoaded = true + SV.ToolBarLoaded = true end end --[[ @@ -855,10 +867,10 @@ EXTERNALLY ACCESSIBLE METHODS ########################################################## ]]-- SV.CurrentlyDocked = {}; -function SV:IsDockletReady(arg) +function MOD:IsDockletReady(arg) local addon = arg; if arg == "DockletMain" or arg == "DockletExtra" then - addon = self.db.SVDock.docklets[arg] + addon = SV.db.SVDock.docklets[arg] end if addon == nil or addon == "None" then return false @@ -866,134 +878,102 @@ function SV:IsDockletReady(arg) return true end -function SV:RemoveTool() - if not self or not self.listIndex then return end - local name = self:GetName(); - if not SAFETY_CACHE[name] then return end - SAFETY_CACHE[name] = false; - local i = self.listIndex; - tremove(TOOL_CACHE, i) - local width; - local height = SuperDockToolBarRight.currentSize; - local PREV_TOOL = TOOL_CACHE[#TOOL_CACHE] - local xOffset = (#TOOL_CACHE - 1) * (height + 6) + 6 - PREV_TOOL:SetPoint("RIGHT", SuperDockToolBarRight, "RIGHT", (xOffset * -1), 0); - width = #TOOL_CACHE * (height + 6) - SuperDockToolBarRight:Size(width, height) - self:Hide() -end - -function SV:AddTool() - local name = self:GetName(); - if SAFETY_CACHE[name] then return end - SAFETY_CACHE[name] = true; - local width; - local height = SuperDockToolBarRight.currentSize; - local xOffset = #TOOL_CACHE * (height + 6) + 6 - self:SetPoint("RIGHT", SuperDockToolBarRight, "RIGHT", (xOffset * -1), 0); - tinsert(TOOL_CACHE, self) - self.listIndex = #TOOL_CACHE; - width = #TOOL_CACHE * (height + 6) - SuperDockToolBarRight:Size(width, height) - self:Show() -end - do local function UnregisterDocklet(name) local frame = _G[name]; if not frame or not frame.listIndex then return end local i = frame.listIndex; - tremove(DOCKLET_CACHE, i) + tremove(MOD.Docklets.FRAMES, i) end - function SV:ReloadDocklets(alert) + function MOD:ReloadDocklets(alert) if InCombatLockdown() then return end local frame, i; - twipe(self.CurrentlyDocked); + twipe(SV.CurrentlyDocked); if self:IsDockletReady("DockletMain") then - frame = self.db.SVDock.docklets.MainWindow + frame = SV.db.SVDock.docklets.MainWindow if frame ~= nil and frame ~= "None" and _G[frame] then UnregisterDocklet(frame) - self.db.SVDock.docklets.MainWindow = "None" + SV.db.SVDock.docklets.MainWindow = "None" end elseif AddOnButton.IsRegistered then - self.RemoveTool(AddOnButton) + RemoveTool(AddOnButton) AddOnButton.TText = ""; AddOnButton.IsRegistered = false; end if self:IsDockletReady("DockletExtra") then - frame = self.db.SVDock.docklets.ExtraWindow + frame = SV.db.SVDock.docklets.ExtraWindow if frame ~= nil and frame ~= "None" and _G[frame] then UnregisterDocklet(frame) - self.db.SVDock.docklets.ExtraWindow = "None" + SV.db.SVDock.docklets.ExtraWindow = "None" end end - SuperDockletMain.FrameName = "None" - SuperDockletExtra.FrameName = "None" + SVUI_AddonDock1.FrameName = "None" + SVUI_AddonDock2.FrameName = "None" - local width = self.db.SVDock.dockRightWidth or 350; - local height = (self.db.SVDock.dockRightHeight or 180) - 22 + local width = SV.db.SVDock.dockRightWidth or 350; + local height = (SV.db.SVDock.dockRightHeight or 180) - 22 if self:IsDockletReady('DockletMain') then - if self:IsDockletReady("DockletExtra") and self.db.SVDock.docklets.enableExtra then + if self:IsDockletReady("DockletExtra") and SV.db.SVDock.docklets.enableExtra then width = width * 0.5; end - SuperDockletMain:ClearAllPoints() - SuperDockletMain:Size(width,height) - SuperDockletMain:Point('BOTTOMLEFT',RightSuperDock,'BOTTOMLEFT',1,1) - SuperDockletExtra:ClearAllPoints() - SuperDockletExtra:Size(width,height) - SuperDockletExtra:Point('BOTTOMLEFT',SuperDockletMain,'BOTTOMRIGHT',0,0) + SVUI_AddonDock1:ClearAllPoints() + SVUI_AddonDock1:Size(width,height) + SVUI_AddonDock1:Point('BOTTOMLEFT',RightSuperDock,'BOTTOMLEFT',1,1) + SVUI_AddonDock2:ClearAllPoints() + SVUI_AddonDock2:Size(width,height) + SVUI_AddonDock2:Point('BOTTOMLEFT',SVUI_AddonDock1,'BOTTOMRIGHT',0,0) end end end -function SV:RegisterDocklet(name, tooltip, texture, onclick, isdefault) +function MOD:RegisterDocklet(name, tooltip, texture, onclick, isdefault) local frame = _G[name]; if frame and (frame.IsObjectType and frame:IsObjectType("Frame")) and (frame.IsProtected and not frame:IsProtected()) then frame:ClearAllPoints() - frame:SetParent(SuperDockWindowRight) - frame:FillInner(SuperDockWindowRight, 4, 4) + frame:SetParent(RightSuperDockFrameHolder) + frame:FillInner(RightSuperDockFrameHolder, 4, 4) frame.FrameName = name; - tinsert(DOCKLET_CACHE, frame); - frame.listIndex = #DOCKLET_CACHE; - frame.ToolbarButton = self.SVDock:CreateBasicToolButton(tooltip, texture, onclick, name, isdefault) + tinsert(self.Docklets.FRAMES, frame); + frame.listIndex = #self.Docklets.FRAMES; + frame.ToolbarButton = CreateBasicToolButton(tooltip, texture, onclick, name, isdefault) end end -function SV:RegisterMainDocklet(name) +function MOD:RegisterMainDocklet(name) local frame = _G[name]; if (frame and (frame.IsObjectType and frame:IsObjectType("Frame")) and (frame.IsProtected and not frame:IsProtected())) then - SuperDockletMain.FrameName = name; + SVUI_AddonDock1.FrameName = name; SV.db.SVDock.docklets.MainWindow = name; frame:ClearAllPoints() - frame:SetParent(SuperDockletMain) - frame:SetAllPoints(SuperDockletMain) + frame:SetParent(SVUI_AddonDock1) + frame:SetAllPoints(SVUI_AddonDock1) frame.ToggleName = "SVUI_AddonDocklet"; - tinsert(DOCKLET_CACHE, frame); - frame.listIndex = #DOCKLET_CACHE; - self.AddTool(AddOnButton) + tinsert(self.Docklets.FRAMES, frame); + frame.listIndex = #self.Docklets.FRAMES; + AddTool(AddOnButton) AddOnButton.TText = ""; AddOnButton.IsRegistered = true - self.CurrentlyDocked[name] = true + SV.CurrentlyDocked[name] = true if not InCombatLockdown() and frame:IsShown() then frame:Hide() end end end -function SV:RegisterExtraDocklet(name) +function MOD:RegisterExtraDocklet(name) local frame = _G[name]; if (frame and (frame.IsObjectType and frame:IsObjectType("Frame")) and (frame.IsProtected and not frame:IsProtected())) then - SuperDockletExtra.FrameName = name; + SVUI_AddonDock2.FrameName = name; SV.db.SVDock.docklets.ExtraWindow = name; frame:ClearAllPoints() - frame:SetParent(SuperDockletExtra) - frame:SetAllPoints(SuperDockletExtra) + frame:SetParent(SVUI_AddonDock2) + frame:SetAllPoints(SVUI_AddonDock2) frame.ToggleName = "SVUI_AddonDocklet"; - tinsert(DOCKLET_CACHE, frame); - frame.listIndex = #DOCKLET_CACHE; + tinsert(self.Docklets.FRAMES, frame); + frame.listIndex = #self.Docklets.FRAMES; AddOnButton.TText = ""; - self.CurrentlyDocked[name] = true; + SV.CurrentlyDocked[name] = true; if not InCombatLockdown() and frame:IsShown() then frame:Hide() end end end @@ -1009,22 +989,18 @@ function MOD:UpdateSuperDock() local rightHeight = SV.db.SVDock.dockRightHeight or 180; local buttonsize = SV.db.SVDock.buttonSize or 22; local spacing = SV.db.SVDock.buttonSpacing or 4; - local statBarWidth = SV.db.SVDock.dockStatWidth or defaultStatBarWidth _G["LeftSuperDock"]:Size(leftWidth, leftHeight) - _G["SuperDockAlertLeft"]:Width(leftWidth) - _G["SuperDockWindowLeft"]:Size(leftWidth, leftHeight) + _G["LeftSuperDockAlert"]:Width(leftWidth) + _G["LeftSuperDockFrameHolder"]:Size(leftWidth, leftHeight) _G["RightSuperDock"]:Size(rightWidth, rightHeight) - _G["SuperDockAlertRight"]:Width(rightWidth) - _G["SuperDockWindowRight"]:Size(rightWidth, rightHeight) - _G["SuperDockBottomDataAnchor"]:Size(statBarWidth - 2, buttonsize - 8) - _G["BottomLeftDataPanel"]:Size((statBarWidth * 0.5) - 1, buttonsize - 8) - _G["BottomRightDataPanel"]:Size((statBarWidth * 0.5) - 1, buttonsize - 8) - - self:BottomPanelVisibility(); - self:TopPanelVisibility(); + _G["RightSuperDockAlert"]:Width(rightWidth) + _G["RightSuperDockFrameHolder"]:Size(rightWidth, rightHeight) + + self:BottomBorderVisibility(); + self:TopBorderVisibility(); self:UpdateDockBackdrops(); - SV:ReloadDocklets() + self:ReloadDocklets() end function MOD:UpdateDockBackdrops() @@ -1044,19 +1020,19 @@ function MOD:UpdateDockBackdrops() end end -function MOD:BottomPanelVisibility() +function MOD:BottomBorderVisibility() if SV.db.SVDock.bottomPanel then - self.BottomPanel:Show() + self.BottomBorder:Show() else - self.BottomPanel:Hide() + self.BottomBorder:Hide() end end -function MOD:TopPanelVisibility() +function MOD:TopBorderVisibility() if SV.db.SVDock.topPanel then - self.TopPanel:Show() + self.TopBorder:Show() else - self.TopPanel:Hide() + self.TopBorder:Hide() end end @@ -1076,14 +1052,13 @@ function MOD:Load() SV.cache.Docks.SuperDockFaded = false end - self:CreateSuperBorders() self:CreateDockPanels() + local width = RightSuperDock:GetWidth(); local height = RightSuperDock:GetHeight() - 22 - SuperDockWindowRight:Size(width, height) - SuperDockWindowRight:SetPoint("BOTTOMLEFT", SuperDockAlertRight, "TOPLEFT", 0, 0) - SuperDockWindowRight:SetScript("OnShow", Docklet_OnShow) - --SuperDockWindowRight:SetScript("OnHide", CycleDocklets) + RightSuperDockFrameHolder:Size(width, height) + RightSuperDockFrameHolder:SetPoint("BOTTOMLEFT", RightSuperDockAlert, "TOPLEFT", 0, 0) + RightSuperDockFrameHolder:SetScript("OnShow", Docklet_OnShow) if not InCombatLockdown()then CycleDocklets() @@ -1091,26 +1066,27 @@ function MOD:Load() hooksecurefunc(RightSuperDock, "SetSize", rightDockSizeHook) self:UpdateDockBackdrops() - SuperDockletMain:SetFrameLevel(SuperDockWindowRight:GetFrameLevel() + 50) - SuperDockletExtra:SetFrameLevel(SuperDockWindowRight:GetFrameLevel() + 50) + SVUI_AddonDock1:SetFrameLevel(RightSuperDockFrameHolder:GetFrameLevel() + 50) + SVUI_AddonDock2:SetFrameLevel(RightSuperDockFrameHolder:GetFrameLevel() + 50) - local size = SuperDockToolBarRight.currentSize; + local size = RightSuperDockToolBar.currentSize; - AddOnButton:SetParent(SuperDockToolBarRight) + AddOnButton:SetParent(RightSuperDockToolBar) AddOnButton:Size(size, size) AddOnButton:SetFramedButtonTemplate() - AddOnButton.icon = AddOnButton:CreateTexture(nil, "OVERLAY") - AddOnButton.icon:FillInner() - AddOnButton.icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-ADDON]]) + AddOnButton.Icon = AddOnButton:CreateTexture(nil, "OVERLAY") + AddOnButton.Icon:FillInner() + AddOnButton.Icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-ADDON]]) AddOnButton.TText = ""; AddOnButton.IsRegistered = false; - MOD:ActivateDockletButton(AddOnButton, AddonDockletToggle) + ActivateDockletButton(AddOnButton, AddonDockletToggle) AddOnButton:Hide() - SuperDockletMain:SetScript("OnShow", DockletFrame_OnShow) - SuperDockletExtra:SetScript("OnShow", DockletFrame_OnShow) - SV:ReloadDocklets(true) + SVUI_AddonDock1:SetScript("OnShow", DockletFrame_OnShow) + SVUI_AddonDock2:SetScript("OnShow", DockletFrame_OnShow) + self:ReloadDocklets(true) + SV.Timers:ExecuteTimer(self.LoadToolBarProfessions, 5) end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua index 3f726ff..0a067d2 100644 --- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua +++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua @@ -450,7 +450,7 @@ local function CreateHenchmenSubOptions(buttonIndex,optionIndex) end local function CreateHenchmenFrame() - HenchmenFrame:SetParent(SV.UIParent) + HenchmenFrame:SetParent(SV.Screen) HenchmenFrame:SetPoint("CENTER",UIParent,"CENTER",0,0) HenchmenFrame:SetWidth(500) HenchmenFrame:SetHeight(500) @@ -467,7 +467,7 @@ local function CreateHenchmenFrame() HenchmenFrame:Hide() - local HenchmenCalloutFrame = CreateFrame("Frame","HenchmenCalloutFrame",SV.UIParent) + local HenchmenCalloutFrame = CreateFrame("Frame","HenchmenCalloutFrame",SV.Screen) HenchmenCalloutFrame:SetPoint("BOTTOM",UIParent,"BOTTOM",100,150) HenchmenCalloutFrame:SetWidth(256) HenchmenCalloutFrame:SetHeight(128) @@ -479,7 +479,7 @@ local function CreateHenchmenFrame() HenchmenCalloutFramePic:SetAllPoints(HenchmenCalloutFrame) HenchmenCalloutFrame:Hide() - local HenchmenFrameBG = CreateFrame("Frame","HenchmenFrameBG",SV.UIParent) + local HenchmenFrameBG = CreateFrame("Frame","HenchmenFrameBG",SV.Screen) HenchmenFrameBG:SetAllPoints(WorldFrame) HenchmenFrameBG:SetBackdrop({bgFile = [[Interface\BUTTONS\WHITE8X8]]}) HenchmenFrameBG:SetBackdropColor(0,0,0,0.9) @@ -951,7 +951,7 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:Load() - local bubble = CreateFrame("Frame", "HenchmenSpeechBubble", SV.UIParent) + local bubble = CreateFrame("Frame", "HenchmenSpeechBubble", SV.Screen) bubble:SetSize(256,128) bubble:Point("BOTTOMRIGHT", RightSuperDockToggleButton, "TOPLEFT", 0, 0) bubble:SetFrameStrata("DIALOG") diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 9e01adb..dd00e58 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -349,7 +349,7 @@ local function SetLargeWorldMap() if InCombatLockdown() then return end if SV.db.SVMap.tinyWorldMap == true then - WorldMapFrame:SetParent(SV.UIParent) + WorldMapFrame:SetParent(SV.Screen) WorldMapFrame:EnableMouse(false) WorldMapFrame:EnableKeyboard(false) WorldMapFrame:SetScale(1) @@ -708,7 +708,7 @@ function MOD:Load() local mapHolder = SVUI_MinimapFrame mapHolder:SetFrameStrata("BACKGROUND") mapHolder.backdrop = mapHolder:CreateTexture(nil, "BACKGROUND", nil, -2) - mapHolder:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", -10, -10) + mapHolder:Point("TOPRIGHT", SV.Screen, "TOPRIGHT", -10, -10) mapHolder:Size(MM_WIDTH, MM_HEIGHT) mapHolder.backdrop:ClearAllPoints() mapHolder.backdrop:WrapOuter(mapHolder, 2) @@ -843,7 +843,7 @@ function MOD:Load() if(SV.db.SVMap.tinyWorldMap) then setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = SV.fubar }, { __index = _G })) - WorldMapFrame:SetParent(SV.UIParent) + WorldMapFrame:SetParent(SV.Screen) WorldMapFrame:SetFrameLevel(1) WorldMapFrame:SetFrameStrata('HIGH') WorldMapDetailFrame:SetFrameLevel(2) diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index fdfdb68..ad51d7a 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -153,7 +153,7 @@ local Vehicle_OnSetPoint = function(self,_,parent) if _G.VehicleSeatIndicator_MOVE then VehicleSeatIndicator:Point("BOTTOM", VehicleSeatIndicator_MOVE, "BOTTOM", 0, 0) else - VehicleSeatIndicator:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 22, -45) + VehicleSeatIndicator:Point("TOPLEFT", SV.Screen, "TOPLEFT", 22, -45) SV.Mentalo:Add(VehicleSeatIndicator, L["Vehicle Seat Frame"]) end VehicleSeatIndicator:SetScale(0.8) @@ -300,7 +300,7 @@ afrm:SetHeight(20); local AlertFramePostMove_Hook = function(forced) local b, c = SVUI_AlertFrame_MOVE:GetCenter() - local d = SV.UIParent:GetTop() + local d = SV.Screen:GetTop() if(c > (d / 2)) then POSITION = "TOP" ANCHOR_POINT = "BOTTOM" @@ -357,7 +357,7 @@ MIRROR BARS ]]-- local SetMirrorPosition = function(bar) local yOffset = mirrorYOffset[bar.type] - return bar:Point("TOP", SV.UIParent, "TOP", 0, -yOffset) + return bar:Point("TOP", SV.Screen, "TOP", 0, -yOffset) end local MirrorBar_OnUpdate = function(self, elapsed) @@ -391,7 +391,7 @@ local function MirrorBarRegistry(barType) if RegisteredMirrorBars[barType] then return RegisteredMirrorBars[barType] end - local bar = CreateFrame('StatusBar', nil, SV.UIParent) + local bar = CreateFrame('StatusBar', nil, SV.Screen) bar:SetPanelTemplate("Bar", false, 3, 3, 3) bar:SetScript("OnUpdate", MirrorBar_OnUpdate) local r, g, b = unpack(mirrorTypeColor[barType]) @@ -476,7 +476,7 @@ local Loot_OnHide = function(self) CloseLoot() end -local SVUI_LootFrameHolder = CreateFrame("Frame","SVUI_LootFrameHolder",SV.UIParent); +local SVUI_LootFrameHolder = CreateFrame("Frame","SVUI_LootFrameHolder",SV.Screen); local SVUI_LootFrame = CreateFrame('Button', 'SVUI_LootFrame', SVUI_LootFrameHolder); SVUI_LootFrameHolder:Point("TOPLEFT",36,-195); SVUI_LootFrameHolder:Width(150); @@ -708,7 +708,7 @@ end local function CreateRollFrame() UpdateLootUpvalues() - local rollFrame = CreateFrame("Frame",nil,SV.UIParent) + local rollFrame = CreateFrame("Frame",nil,SV.Screen) rollFrame:Size(LOOT_WIDTH,LOOT_HEIGHT) rollFrame:SetFixedPanelTemplate('Default') rollFrame:SetScript("OnEvent",LootRoll_OnEvent) @@ -1031,7 +1031,7 @@ function MOD:Load() NewHook(DurabilityFrame, "SetPoint", Dura_OnSetPoint) TicketStatusFrame:ClearAllPoints() - TicketStatusFrame:SetPoint("TOPLEFT", SV.UIParent, "TOPLEFT", 250, -5) + TicketStatusFrame:SetPoint("TOPLEFT", SV.Screen, "TOPLEFT", 250, -5) SV.Mentalo:Add(TicketStatusFrame, L["GM Ticket Frame"], nil, nil, nil, nil, "GM") HelpOpenTicketButton:SetParent(Minimap) HelpOpenTicketButton:ClearAllPoints() @@ -1046,8 +1046,8 @@ function MOD:Load() self:RegisterEvent('PLAYER_REGEN_DISABLED', ErrorFrameHandler) self:RegisterEvent('PLAYER_REGEN_ENABLED', ErrorFrameHandler) - SVUI_AlertFrame:SetParent(SV.UIParent) - SVUI_AlertFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, -18); + SVUI_AlertFrame:SetParent(SV.Screen) + SVUI_AlertFrame:SetPoint("TOP", SV.Screen, "TOP", 0, -18); SV.Mentalo:Add(SVUI_AlertFrame, L["Loot / Alert Frames"], nil, nil, AlertFramePostMove_Hook) NewHook('AlertFrame_FixAnchors', AlertFramePostMove_Hook) NewHook('AlertFrame_SetLootAnchors', _hook_AlertFrame_SetLootAnchors) @@ -1096,7 +1096,7 @@ function MOD:Load() self:RegisterEvent("MIRROR_TIMER_PAUSE", MirrorBarToggleHandler) self:RegisterEvent("START_TIMER", MirrorBarToggleHandler) - local exit = CreateFrame("Button", "SVUI_BailOut", SV.UIParent) + local exit = CreateFrame("Button", "SVUI_BailOut", SV.Screen) exit:Size(40, 40) exit:Point("TOPLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, -30) exit:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") @@ -1116,7 +1116,7 @@ function MOD:Load() SV.Mentalo:Add(exit, L["Bail Out"]) local altPower = CreateFrame("Frame", "SVUI_AltPowerBar", UIParent) - altPower:SetPoint("TOP", SV.UIParent, "TOP", 0, -18) + altPower:SetPoint("TOP", SV.Screen, "TOP", 0, -18) altPower:Size(128, 50) PlayerPowerBarAlt:ClearAllPoints() PlayerPowerBarAlt:SetPoint("CENTER", altPower, "CENTER") @@ -1124,9 +1124,9 @@ function MOD:Load() PlayerPowerBarAlt.ignoreFramePositionManager = true; SV.Mentalo:Add(altPower, L["Alternative Power"]) - local wsc = CreateFrame("Frame", "SVUI_WorldStateHolder", SV.UIParent) + local wsc = CreateFrame("Frame", "SVUI_WorldStateHolder", SV.Screen) wsc:SetSize(200, 45) - wsc:SetPoint("TOP", SV.UIParent, "TOP", 0, -100) + wsc:SetPoint("TOP", SV.Screen, "TOP", 0, -100) SV.Mentalo:Add(wsc, L["Capture Bars"]) NewHook("UIParent_ManageFramePositions", CaptureBarHandler) diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua index 4c41f7f..3aa88e7 100644 --- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua +++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua @@ -63,8 +63,8 @@ MOD.DisabledList = {}; MOD.StatListing = {[""] = "None"}; MOD.tooltip = CreateFrame("GameTooltip", "StatisticTooltip", UIParent, "GameTooltipTemplate") MOD.BGPanels = { - ["TopLeftDataPanel"] = {left = "Honor", middle = "Kills", right = "Assists"}, - ["TopRightDataPanel"] = {left = "Damage", middle = "Healing", right = "Deaths"} + ["SVUI_StatsBar1"] = {left = "Honor", middle = "Kills", right = "Assists"}, + ["SVUI_StatsBar2"] = {left = "Damage", middle = "Healing", right = "Deaths"} }; MOD.BGStats = { ["Name"] = {1, NAME}, @@ -663,16 +663,40 @@ function MOD:UnSet(parent) self.DisabledList[parent.StatParent] = true self:SetMenuLists() end + +function MOD:UpdateStatSize() + local rez = GetCVar("gxResolution"); + local gxWidth = tonumber(rez:match("(%d+)x%d+")); + local bw = gxWidth * 0.5 + local defaultStatBarWidth = min(bw, 800) + local buttonsize = LeftSuperDockToolBar.currentSize or 22 + local statBarWidth = SV.db.SVStats.dockStatWidth or defaultStatBarWidth + _G["SVUI_TopStatsDock"]:Size(statBarWidth - 2, buttonsize - 8) + _G["SVUI_StatsBar1"]:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + _G["SVUI_StatsBar2"]:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + _G["SVUI_BottomStatsDock"]:Size(statBarWidth - 2, buttonsize - 8) + _G["SVUI_StatsBar3"]:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + _G["SVUI_StatsBar4"]:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + self:Generate() +end --[[ ########################################################## BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() - self:Generate() + self:UpdateStatSize() end function MOD:Load() + local rez = GetCVar("gxResolution"); + local gxWidth = tonumber(rez:match("(%d+)x%d+")); + local bw = gxWidth * 0.5 + local defaultStatBarWidth = min(bw, 800) + local buttonsize = LeftSuperDockToolBar.currentSize or 22 + local spacing = LeftSuperDock.currentSpacing or 4 + local statBarWidth = SV.db.SVStats.dockStatWidth or defaultStatBarWidth + hexHighlight = SV:HexColor("highlight") or "FFFFFF" local hexClass = classColor.colorStr BGStatString = "|cff" .. hexHighlight .. "%s: |c" .. hexClass .. "%s|r"; @@ -686,15 +710,51 @@ function MOD:Load() self.Accountant[playerRealm]["tokens"] = self.Accountant[playerRealm]["tokens"] or {}; self.Accountant[playerRealm]["tokens"][playerName] = self.Accountant[playerRealm]["tokens"][playerName] or 738; + --TOP STAT HOLDERS + + local topanchor = CreateFrame("Frame", "SVUI_TopStatsDock", SV.Screen) + topanchor:Size(statBarWidth - 2, buttonsize - 8) + topanchor:Point("LEFT", TopSuperDockToolBar, "RIGHT", spacing, 0) + + local topleftdata = CreateFrame("Frame", "SVUI_StatsBar1", topanchor) + topleftdata:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + topleftdata:Point("LEFT", topanchor, "LEFT", 0, 0) + self:NewAnchor(topleftdata, 3, "ANCHOR_CURSOR", true) + SV.Mentalo:Add(topleftdata, L["Stats Dock 1"]) + + local toprightdata = CreateFrame("Frame", "SVUI_StatsBar2", topanchor) + toprightdata:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + toprightdata:Point("RIGHT", topanchor, "RIGHT", 0, 0) + self:NewAnchor(toprightdata, 3, "ANCHOR_CURSOR", true) + SV.Mentalo:Add(toprightdata, L["Stats Dock 2"]) + + --BOTTOM STAT HOLDERS + + local bottomanchor = CreateFrame("Frame", "SVUI_BottomStatsDock", SV.Screen) + bottomanchor:Size(statBarWidth - 2, buttonsize - 8) + bottomanchor:Point("BOTTOM", SV.Screen, "BOTTOM", 0, 2) + + local bottomleftdata = CreateFrame("Frame", "SVUI_StatsBar3", bottomanchor) + bottomleftdata:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + bottomleftdata:Point("LEFT", bottomanchor, "LEFT", 0, 0) + self:NewAnchor(bottomleftdata, 3, "ANCHOR_CURSOR") + SV.Mentalo:Add(bottomleftdata, L["Stats Dock 3"]) + + local bottomrightdata = CreateFrame("Frame", "SVUI_StatsBar4", bottomanchor) + bottomrightdata:Size((statBarWidth * 0.5) - 1, buttonsize - 8) + bottomrightdata:Point("RIGHT", bottomanchor, "RIGHT", 0, 0) + self:NewAnchor(bottomrightdata, 3, "ANCHOR_CURSOR") + SV.Mentalo:Add(bottomrightdata, L["Stats Dock 4"]) + self:LoadServerGold() self:CacheRepData() self:CacheTokenData() - StatMenuFrame:SetParent(SV.UIParent); + StatMenuFrame:SetParent(SV.Screen); StatMenuFrame:SetPanelTemplate("Transparent"); StatMenuFrame:Hide() - self.tooltip:SetParent(SV.UIParent) + self.tooltip:SetParent(SV.Screen) self.tooltip:SetFrameStrata("DIALOG") self.tooltip:HookScript("OnShow", _hook_TooltipOnShow) diff --git a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua index 5cc8bd9..e937009 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua @@ -94,7 +94,7 @@ SV.SystemAlert.SET_BN_BROADCAST={ preferredIndex = 3 }; -local menuFrame = CreateFrame("Frame", "FriendDatatextRightClickMenu", SV.UIParent, "UIDropDownMenuTemplate") +local menuFrame = CreateFrame("Frame", "FriendDatatextRightClickMenu", SV.Screen, "UIDropDownMenuTemplate") local menuList = { { text = OPTIONS_MENU, isTitle = true,notCheckable=true}, { text = INVITE, hasArrow = true,notCheckable=true, }, diff --git a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua index bc6dcb9..df4fc8e 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua @@ -75,7 +75,7 @@ local MobileFlagFormat = { [2] = function()return "|TInterface\\ChatFrame\\UI-ChatIcon-ArmoryChat-BusyMobile:14:14:0:0:16:16:0:16:0:16|t" end }; -local GuildDatatTextRightClickMenu = CreateFrame("Frame", "GuildDatatTextRightClickMenu", SV.UIParent, "UIDropDownMenuTemplate") +local GuildDatatTextRightClickMenu = CreateFrame("Frame", "GuildDatatTextRightClickMenu", SV.Screen, "UIDropDownMenuTemplate") local MenuMap = { {text = OPTIONS_MENU, isTitle = true, notCheckable = true}, diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index 396795e..125cbb4 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -587,7 +587,7 @@ local _hook_GameTooltip_SetDefaultAnchor = function(self, parent) elseif(RightSuperDock:GetAlpha() == 1 and RightSuperDock:IsShown()) then self:SetPoint("BOTTOMRIGHT", RightSuperDock, "TOPRIGHT", -44, 18) else - self:SetPoint("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", -44, 78) + self:SetPoint("BOTTOMRIGHT", SV.Screen, "BOTTOMRIGHT", -44, 78) end else local point = Pinpoint(SVUI_ToolTip_MOVE) @@ -865,7 +865,7 @@ function MOD:Load() NewHook(BNToastFrame, "SetPoint", _hook_BNToastOnShow) if not SV.db.SVTip.enable then return end - local anchor = CreateFrame("Frame", "SVUI_ToolTip", SV.UIParent) + local anchor = CreateFrame("Frame", "SVUI_ToolTip", SV.Screen) anchor:Point("BOTTOMRIGHT", RightSuperDock, "TOPRIGHT", 0, 60) anchor:Size(130, 20) anchor:SetFrameLevel(anchor:GetFrameLevel() + 50) diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index 1619fe5..2e4a39f 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -1199,7 +1199,9 @@ function MOD:ADDON_LOADED(event, addon) end function MOD:PLAYER_ENTERING_WORLD() - self:RefreshUnitFrames() + if(not SV.NeedsFrameAudit) then + self:RefreshUnitFrames() + end end local UnitFrameThreatIndicator_Hook = function(unit, unitFrame) @@ -1275,7 +1277,7 @@ function MOD:Load() if(not SV.db.SVUnit.enable) then return end self:RefreshUnitColors() - local SVUI_UnitFrameParent = CreateFrame("Frame", "SVUI_UnitFrameParent", SV.UIParent, "SecureHandlerStateTemplate") + local SVUI_UnitFrameParent = CreateFrame("Frame", "SVUI_UnitFrameParent", SV.Screen, "SecureHandlerStateTemplate") RegisterStateDriver(SVUI_UnitFrameParent, "visibility", "[petbattle] hide; show") self:CanClassDispel() diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index a478285..dbbcce4 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -319,7 +319,7 @@ CONSTRUCTORS["player"] = function(self, unit) self.HealPrediction = MOD:CreateHealPrediction(self, true) self.AuraBars = MOD:CreateAuraBarHeader(self, key) self.CombatFade = true; - self:Point("BOTTOMLEFT", SV.UIParent, "BOTTOM", -413, 182) + self:Point("BOTTOMLEFT", SV.Screen, "BOTTOM", -413, 182) SV.Mentalo:Add(self, L["Player Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia @@ -375,7 +375,7 @@ local UpdateTargetFrame = function(self) if db.combobar.autoHide then comboBar:SetParent(self) else - comboBar:SetParent(SV.UIParent) + comboBar:SetParent(SV.Screen) end if comboBar.Avatar then @@ -435,7 +435,7 @@ CONSTRUCTORS["target"] = function(self, unit) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self.XRay = MOD:CreateXRay(self) self.XRay:SetPoint("TOPRIGHT", 12, 12) - self:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOM", 413, 182) + self:Point("BOTTOMRIGHT", SV.Screen, "BOTTOM", 413, 182) SV.Mentalo:Add(self, L["Target Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia @@ -477,7 +477,7 @@ CONSTRUCTORS["targettarget"] = function(self, unit) self.Debuffs = MOD:CreateDebuffs(self, key) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } - self:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 213) + self:Point("BOTTOM", SV.Screen, "BOTTOM", 0, 213) SV.Mentalo:Add(self, L["TargetTarget Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia @@ -528,7 +528,7 @@ CONSTRUCTORS["pet"] = function(self, unit) self.AuraWatch = MOD:CreateAuraWatch(self, key) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } - self:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 182) + self:Point("BOTTOM", SV.Screen, "BOTTOM", 0, 182) SV.Mentalo:Add(self, L["Pet Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdatePetFrame @@ -754,7 +754,7 @@ CONSTRUCTORS["boss"] = function(self, unit) self:SetAttribute("type2", "focus") if(not _G["SVUI_Boss_MOVE"]) then - self:Point("RIGHT", SV.UIParent, "RIGHT", -105, 0) + self:Point("RIGHT", SV.Screen, "RIGHT", -105, 0) SV.Mentalo:Add(self, L["Boss Frames"], nil, nil, nil, "ALL, PARTY, RAID10, RAID25, RAID40", "SVUI_Boss") else self:Point("TOPRIGHT", lastBossFrame, "BOTTOMRIGHT", 0, -20) @@ -922,7 +922,7 @@ CONSTRUCTORS["arena"] = function(self, unit) end if(not _G["SVUI_Arena_MOVE"]) then - self:Point("RIGHT", SV.UIParent, "RIGHT", -105, 0) + self:Point("RIGHT", SV.Screen, "RIGHT", -105, 0) SV.Mentalo:Add(self, L["Arena Frames"], nil, nil, nil, "ALL, ARENA", "SVUI_Arena") else self:Point("TOPRIGHT", lastArenaFrame, "BOTTOMRIGHT", 0, -20) diff --git a/Interface/AddOns/SVUI/packages/unit/groups.lua b/Interface/AddOns/SVUI/packages/unit/groups.lua index eb39ac0..fd30445 100644 --- a/Interface/AddOns/SVUI/packages/unit/groups.lua +++ b/Interface/AddOns/SVUI/packages/unit/groups.lua @@ -251,13 +251,14 @@ local PartyVisibility = function(self, event) end UpdateTemplates["party"] = function(self) + if(SV.NeedsFrameAudit) then return end local token = self.___groupkey local db = SV.db.SVUnit[token] local groupFrame = self:GetParent() if not groupFrame.positioned then groupFrame:ClearAllPoints() - groupFrame:Point("LEFT",SV.UIParent,"LEFT",40,0) + groupFrame:Point("LEFT",SV.Screen,"LEFT",40,0) SV.Mentalo:Add(groupFrame, L['Party Frames'], nil, nil, nil, 'ALL,PARTY,ARENA'); groupFrame:RegisterEvent("PLAYER_ENTERING_WORLD") groupFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA") @@ -270,6 +271,7 @@ UpdateTemplates["party"] = function(self) local index = 1; local attIndex = ("child%d"):format(index) local childFrame = self:GetAttribute(attIndex) + if(not childFrame) then return end local childName = childFrame:GetName() local petFrame = _G[("%sPet"):format(childName)] local targetFrame = _G[("%sTarget"):format(childName)] @@ -497,13 +499,15 @@ local RaidVisibility = { local RaidUpdatePrototype = function(token) return function(self) + if(SV.NeedsFrameAudit) then return end local db = SV.db.SVUnit[token] local groupFrame = self:GetParent() - if not groupFrame.positioned then + if not groupFrame.positioned then + local moverName = (token .. " Frames"):gsub("(.)", upper, 1) groupFrame:ClearAllPoints() - groupFrame:Point("LEFT", SV.UIParent, "LEFT", 4, 0) - SV.Mentalo:Add(groupFrame, L["Raid Frames"]) + groupFrame:Point("LEFT", SV.Screen, "LEFT", 4, 0) + SV.Mentalo:Add(groupFrame, moverName) groupFrame:RegisterEvent("PLAYER_ENTERING_WORLD") groupFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA") groupFrame:SetScript("OnEvent", RaidVisibility[token]) @@ -515,6 +519,7 @@ local RaidUpdatePrototype = function(token) local index = 1; local attIndex = ("child%d"):format(index) local childFrame = self:GetAttribute(attIndex) + if(not childFrame) then return end local childName = childFrame:GetName() local petFrame = _G[("%sPet"):format(childName)] local targetFrame = _G[("%sTarget"):format(childName)] @@ -666,13 +671,14 @@ local RaidPetVisibility = function(self, event) end UpdateTemplates["raidpet"] = function(self) + if(SV.NeedsFrameAudit) then return end local token = self.___key local db = SV.db.SVUnit[token] local groupFrame = self:GetParent() if not groupFrame.positioned then groupFrame:ClearAllPoints() - groupFrame:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", 4, 433) + groupFrame:Point("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", 4, 433) SV.Mentalo:Add(groupFrame, L["Raid Pet Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") groupFrame:RegisterEvent("PLAYER_ENTERING_WORLD") groupFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA") @@ -685,6 +691,7 @@ UpdateTemplates["raidpet"] = function(self) local index = 1; local attIndex = ("child%d"):format(index) local childFrame = self:GetAttribute(attIndex) + if(not childFrame) then return end local childName = childFrame:GetName() local petFrame = _G[("%sPet"):format(childName)] local targetFrame = _G[("%sTarget"):format(childName)] @@ -798,6 +805,7 @@ local TankUnitUpdate = function(self) end UpdateTemplates["tank"] = function(self) + if(SV.NeedsFrameAudit) then return end local token = "tank" local db = SV.db.SVUnit[token] @@ -821,7 +829,7 @@ UpdateTemplates["tank"] = function(self) if not self.positioned then self:ClearAllPoints() - self:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 4, -40) + self:Point("TOPLEFT", SV.Screen, "TOPLEFT", 4, -40) SV.Mentalo:Add(self, L["Tank Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") self.Avatar.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) @@ -916,6 +924,7 @@ local AssistUnitUpdate = function(self) end UpdateTemplates["assist"] = function(self) + if(SV.NeedsFrameAudit) then return end local token = "assist" local db = SV.db.SVUnit[token] @@ -933,7 +942,7 @@ UpdateTemplates["assist"] = function(self) if not self.positioned then self:ClearAllPoints() - self:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 4, -140) + self:Point("TOPLEFT", SV.Screen, "TOPLEFT", 4, -140) SV.Mentalo:Add(self, L["Assist Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") self.Avatar.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) diff --git a/Interface/AddOns/SVUI/scripts/comix.lua b/Interface/AddOns/SVUI/scripts/comix.lua index 379291a..519cfbf 100644 --- a/Interface/AddOns/SVUI/scripts/comix.lua +++ b/Interface/AddOns/SVUI/scripts/comix.lua @@ -127,7 +127,7 @@ function Comix:LaunchPopup() local step1_y = random(-100, 100); if(step1_y > -30 and step1_y < 30) then step1_y = step1_y * 3 end self.Basic.tex:SetTexCoord(coords[1],coords[2],coords[3],coords[4]) - self.Basic:Point("CENTER", SV.UIParent, "CENTER", step1_x, step1_y) + self.Basic:Point("CENTER", SV.Screen, "CENTER", step1_x, step1_y) self.Basic.anim:Play() end @@ -169,10 +169,10 @@ local Comix_OnUpdate = function() Comix:ReadyState(true) end local Toasty_OnUpdate = function(self) Comix:ReadyState(true); self.parent:SetAlpha(0) end local function LoadSVComix() - local basic = CreateFrame("Frame", "ComixBasicPanel", SV.UIParent) + local basic = CreateFrame("Frame", "ComixBasicPanel", SV.Screen) basic:SetSize(100, 100) basic:SetFrameStrata("DIALOG") - basic:Point("CENTER", SV.UIParent, "CENTER", 0, -50) + basic:Point("CENTER", SV.Screen, "CENTER", 0, -50) basic.tex = basic:CreateTexture(nil, "ARTWORK") basic.tex:FillInner(basic) basic.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE1]]) @@ -183,10 +183,10 @@ local function LoadSVComix() Comix.Basic = basic - local deluxe = CreateFrame("Frame", "ComixDeluxePanel", SV.UIParent) + local deluxe = CreateFrame("Frame", "ComixDeluxePanel", SV.Screen) deluxe:SetSize(100, 100) deluxe:SetFrameStrata("DIALOG") - deluxe:Point("CENTER", SV.UIParent, "CENTER", 0, -50) + deluxe:Point("CENTER", SV.Screen, "CENTER", 0, -50) deluxe.tex = deluxe:CreateTexture(nil, "ARTWORK") deluxe.tex:FillInner(deluxe) deluxe.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE2]]) @@ -197,10 +197,10 @@ local function LoadSVComix() Comix.Deluxe = deluxe - local premium = CreateFrame("Frame", "ComixPremiumPanel", SV.UIParent) + local premium = CreateFrame("Frame", "ComixPremiumPanel", SV.Screen) premium:SetSize(100, 100) premium:SetFrameStrata("DIALOG") - premium:Point("CENTER", SV.UIParent, "CENTER", 0, -50) + premium:Point("CENTER", SV.Screen, "CENTER", 0, -50) premium.tex = premium:CreateTexture(nil, "ARTWORK") premium.tex:FillInner(premium) premium.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE3]]) @@ -209,10 +209,10 @@ local function LoadSVComix() premium:SetAlpha(0) premium.anim[3]:SetScript("OnFinished", Comix_OnUpdate) - local bg = CreateFrame("Frame", "ComixPremiumPanelBG", SV.UIParent) + local bg = CreateFrame("Frame", "ComixPremiumPanelBG", SV.Screen) bg:SetSize(128, 128) bg:SetFrameStrata("BACKGROUND") - bg:Point("CENTER", SV.UIParent, "CENTER", 0, -50) + bg:Point("CENTER", SV.Screen, "CENTER", 0, -50) bg.tex = bg:CreateTexture(nil, "ARTWORK") bg.tex:FillInner(bg) bg.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE3-BG]]) diff --git a/Interface/AddOns/SVUI/scripts/ego.lua b/Interface/AddOns/SVUI/scripts/ego.lua index c8a591a..130400b 100644 --- a/Interface/AddOns/SVUI/scripts/ego.lua +++ b/Interface/AddOns/SVUI/scripts/ego.lua @@ -57,7 +57,7 @@ local function LoadSVEgo() local EgoFrame = CreateFrame("Frame", "SVUI_EgoFrame", UIParent); EgoFrame:SetParent(GameMenuFrame) EgoFrame:SetFrameLevel(0) - EgoFrame:SetAllPoints(SV.UIParent) + EgoFrame:SetAllPoints(SV.Screen) EgoFrame.BG1 = EgoFrame:CreateTexture(nil, "BACKGROUND", nil, -7) EgoFrame.BG1:SetPoint("TOPLEFT", EgoFrame, "TOPLEFT", 0, 0) diff --git a/Interface/AddOns/SVUI/scripts/misc.lua b/Interface/AddOns/SVUI/scripts/misc.lua index 2880fdf..abd9a14 100644 --- a/Interface/AddOns/SVUI/scripts/misc.lua +++ b/Interface/AddOns/SVUI/scripts/misc.lua @@ -357,8 +357,8 @@ end local function RaidMarkShowIcons() if not UnitExists("target") or UnitIsDead("target") then return end local x,y = GetCursorPosition() - local scale = SV.UIParent:GetEffectiveScale() - RaidMarkFrame:SetPoint("CENTER", SV.UIParent, "BOTTOMLEFT", (x / scale), (y / scale)) + local scale = SV.Screen:GetEffectiveScale() + RaidMarkFrame:SetPoint("CENTER", SV.Screen, "BOTTOMLEFT", (x / scale), (y / scale)) RaidMarkFrame:Show() end @@ -475,8 +475,8 @@ end local function CreateTotemBar() if(not SV.db.totems.enable) then return; end local xOffset = SV.db.SVDock.dockLeftWidth + 12 - TotemBar = CreateFrame("Frame", "SVUI_TotemBar", SV.UIParent) - TotemBar:SetPoint("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", xOffset, 40) + TotemBar = CreateFrame("Frame", "SVUI_TotemBar", SV.Screen) + TotemBar:SetPoint("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", xOffset, 40) for i = 1, MAX_TOTEMS do local id = priorities[i] local totem = CreateFrame("Button", "TotemBarTotem"..id, TotemBar) @@ -625,7 +625,7 @@ end local function LoadThreatBar() if(SV.db.general.threatbar == true) then local anchor = _G.SVUI_Target - local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SV.UIParent); + local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SV.Screen); ThreatBar:SetStatusBarTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Doodads\\THREAT-BAR") ThreatBar:SetSize(50,100) ThreatBar:SetFrameStrata('MEDIUM') diff --git a/Interface/AddOns/SVUI/scripts/questwatch.lua b/Interface/AddOns/SVUI/scripts/questwatch.lua index ac584d2..fcaa77e 100644 --- a/Interface/AddOns/SVUI/scripts/questwatch.lua +++ b/Interface/AddOns/SVUI/scripts/questwatch.lua @@ -58,7 +58,7 @@ local L = SV.L LOCAL VARS ########################################################## ]]-- -local SuperDockWindowRight, QuestFrame, ObjectiveTrackerFrame; +local RightSuperDockFrameHolder, QuestFrame, ObjectiveTrackerFrame; local ICON_FILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-QUESTS]] local OBJECTIVE_TRACKER_LINE_WIDTH = _G.OBJECTIVE_TRACKER_LINE_WIDTH; --[[ @@ -67,14 +67,14 @@ CORE FUNCTIONS ########################################################## ]]-- local QuestFrame_OnEvent = function(self, event) - if(event == "QUEST_AUTOCOMPLETE" and SuperDockWindowRight and QuestFrame) then - if SuperDockWindowRight.FrameName and _G[SuperDockWindowRight.FrameName] and _G[SuperDockWindowRight.FrameName]:IsShown() then return end + if(event == "QUEST_AUTOCOMPLETE" and RightSuperDockFrameHolder and QuestFrame) then + if RightSuperDockFrameHolder.FrameName and _G[RightSuperDockFrameHolder.FrameName] and _G[RightSuperDockFrameHolder.FrameName]:IsShown() then return end if not QuestFrame:IsShown() then - SuperDockWindowRight.FrameName = "SVUI_QuestFrame" - if not SuperDockWindowRight:IsShown()then - SuperDockWindowRight:Show() + RightSuperDockFrameHolder.FrameName = "SVUI_QuestFrame" + if not RightSuperDockFrameHolder:IsShown()then + RightSuperDockFrameHolder:Show() end - SV:CycleDocklets() + SV.SVDock:CycleDocklets() QuestFrame:Show() if(QuestFrame.ToolbarButton) then QuestFrame.ToolbarButton.IsOpen = true; @@ -85,7 +85,7 @@ local QuestFrame_OnEvent = function(self, event) end local function CreateQuestFrame() - SuperDockWindowRight = _G.SuperDockWindowRight + RightSuperDockFrameHolder = _G.RightSuperDockFrameHolder ObjectiveTrackerFrame = _G.ObjectiveTrackerFrame if(not ObjectiveTrackerFrame) then return end if(not SV.db.general.questWatch) then @@ -126,11 +126,11 @@ local function CreateQuestFrame() else local bgTex = [[Interface\BUTTONS\WHITE8X8]] local bdTex = SV.Media.bar.glow - local WIDTH, HEIGHT = SuperDockWindowRight:GetSize() + local WIDTH, HEIGHT = RightSuperDockFrameHolder:GetSize() - QuestFrame = CreateFrame("Frame", "SVUI_QuestFrame", SuperDockWindowRight); + QuestFrame = CreateFrame("Frame", "SVUI_QuestFrame", RightSuperDockFrameHolder); QuestFrame:SetFrameStrata("BACKGROUND"); - SV:RegisterDocklet("SVUI_QuestFrame", "Quest Watch", ICON_FILE, false, true) + SV.SVDock:RegisterDocklet("SVUI_QuestFrame", "Quest Watch", ICON_FILE, false, true) local listFrame = CreateFrame("ScrollFrame", nil, QuestFrame); listFrame:SetPoint("TOPLEFT", QuestFrame, -62, 0); diff --git a/Interface/AddOns/SVUI/scripts/raid.lua b/Interface/AddOns/SVUI/scripts/raid.lua index 40c6504..ac43da5 100644 --- a/Interface/AddOns/SVUI/scripts/raid.lua +++ b/Interface/AddOns/SVUI/scripts/raid.lua @@ -94,8 +94,8 @@ local function ToggleRaidUtil(event) end if CheckRaidStatus() then - local width = SuperDockToolBarTop.openWidth - SuperDockToolBarTop:SetWidth(width) + local width = TopSuperDockToolBar.openWidth + TopSuperDockToolBar:SetWidth(width) if RaidUtilityPanel.toggled == true then SVUI_RaidTools:Hide() RaidUtilityPanel:Show() @@ -104,7 +104,7 @@ local function ToggleRaidUtil(event) RaidUtilityPanel:Hide() end else - SuperDockToolBarTop:SetWidth(1) + TopSuperDockToolBar:SetWidth(1) SVUI_RaidTools:Hide() RaidUtilityPanel:Hide() end @@ -121,20 +121,20 @@ RaidUtilFrame:SetScript("OnEvent", ToggleRaidUtil) local function LoadRaidUtility() local buttonsize = SV.db.SVDock.buttonSize or 22; --Create main frame - local RaidUtilityPanel = CreateFrame("Frame", "RaidUtilityPanel", SV.UIParent, "SecureHandlerClickTemplate") + local RaidUtilityPanel = CreateFrame("Frame", "RaidUtilityPanel", SV.Screen, "SecureHandlerClickTemplate") RaidUtilityPanel:SetPanelTemplate('Transparent') RaidUtilityPanel:Width(120) RaidUtilityPanel:Height(PANEL_HEIGHT) - RaidUtilityPanel:SetPoint("TOPLEFT", SuperDockToolBarTop, "BOTTOMLEFT", 0, -2) + RaidUtilityPanel:SetPoint("TOPLEFT", TopSuperDockToolBar, "BOTTOMLEFT", 0, -2) RaidUtilityPanel:SetFrameLevel(3) RaidUtilityPanel.toggled = false RaidUtilityPanel:SetFrameStrata("HIGH") SV:AddToDisplayAudit(RaidUtilityPanel) --Show Button - local SVUI_RaidTools = CreateFrame("Button", "SVUI_RaidTools", SV.UIParent, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate") + local SVUI_RaidTools = CreateFrame("Button", "SVUI_RaidTools", SV.Screen, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate") SVUI_RaidTools:Size(buttonsize, buttonsize) - SVUI_RaidTools:Point("CENTER", SuperDockToolBarTop, "CENTER", 0, 0) + SVUI_RaidTools:Point("CENTER", TopSuperDockToolBar, "CENTER", 0, 0) SVUI_RaidTools.icon = SVUI_RaidTools:CreateTexture(nil,"OVERLAY",nil) SVUI_RaidTools.icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-RAIDTOOL]]) SVUI_RaidTools.icon:Point("TOPLEFT", SVUI_RaidTools, "TOPLEFT", 1, -1) @@ -190,13 +190,13 @@ local function LoadRaidUtility() self:StopMovingOrSizing() local point = self:GetPoint() local xOffset = self:GetCenter() - local screenWidth = SV.UIParent:GetWidth() / 2 + local screenWidth = SV.Screen:GetWidth() / 2 xOffset = xOffset - screenWidth self:ClearAllPoints() if find(point, "BOTTOM") then - self:SetPoint('BOTTOM', SV.UIParent, 'BOTTOM', xOffset, -1) + self:SetPoint('BOTTOM', SV.Screen, 'BOTTOM', xOffset, -1) else - self:SetPoint('TOP', SV.UIParent, 'TOP', xOffset, 1) + self:SetPoint('TOP', SV.Screen, 'TOP', xOffset, 1) end end) diff --git a/Interface/AddOns/SVUI/setup/installer.lua b/Interface/AddOns/SVUI/setup/installer.lua index af7a5dd..22d0631 100644 --- a/Interface/AddOns/SVUI/setup/installer.lua +++ b/Interface/AddOns/SVUI/setup/installer.lua @@ -279,7 +279,7 @@ function SV.Setup:UserScreen(rez, preserve) UFMoveTopQuadrant(true) UFMoveRightQuadrant(true) end - SV.ghettoMonitor = true + SV.LowRez = true else SV:ResetData("SVDock") SV:ResetData("SVAura") @@ -289,7 +289,7 @@ function SV.Setup:UserScreen(rez, preserve) UFMoveTopQuadrant() UFMoveRightQuadrant() end - SV.ghettoMonitor = nil + SV.LowRez = nil end if(not preserve and not mungs) then diff --git a/Interface/AddOns/SVUI/setup/presets.lua b/Interface/AddOns/SVUI/setup/presets.lua index e62d239..7a7d84b 100644 --- a/Interface/AddOns/SVUI/setup/presets.lua +++ b/Interface/AddOns/SVUI/setup/presets.lua @@ -71,7 +71,7 @@ local hasOldConfigs = function() end local isLowRez = function() - if SV.ghettoMonitor then + if SV.LowRez then return L["This resolution requires that you change some settings to get everything to fit on your screen."].." "..L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."].." "..L["You may need to further alter these settings depending how low your resolution is."] else return L["This resolution doesn't require that you change settings for the UI to fit on your screen."].." "..L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."].." "..L["This is completely optional."] @@ -1201,7 +1201,7 @@ local function LoadPageData() { ["SubTitle"] = RESOLUTION, - ["Desc1"] = (L["Your current resolution is %s, this is considered a %s resolution."]):format(GetCVar("gxResolution"), (SV.ghettoMonitor and LOW or HIGH)), + ["Desc1"] = (L["Your current resolution is %s, this is considered a %s resolution."]):format(GetCVar("gxResolution"), (SV.LowRez and LOW or HIGH)), ["Desc2"] = isLowRez, ["Desc3"] = L["CHOOSE_OR_DIE"], diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 480920f..7fc39ad 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -340,7 +340,7 @@ local SysPop_Move = function(self) if ( lastFrame ) then self:SetPoint("TOP", lastFrame, "BOTTOM", 0, -4); else - self:SetPoint("TOP", SV.UIParent, "TOP", 0, -100); + self:SetPoint("TOP", SV.Screen, "TOP", 0, -100); end tinsert(SV.ActiveAlerts, self); end @@ -555,7 +555,7 @@ local SysPop_Find = function(which, data) end for index = 1, MAX_STATIC_POPUPS, 1 do local frame = _G["SVUI_SystemAlert"..index]; - if ( frame:IsShown() and (frame.which == which) and (not info.multiple or (frame.data == data)) ) then + if (frame and frame:IsShown() and (frame.which == which) and (not info.multiple or (frame.data == data)) ) then return frame; end end @@ -644,7 +644,7 @@ function SV:StaticPopup_Show(which, text_arg1, text_arg2, data) end for i = index, MAX_STATIC_POPUPS do local frame = _G["SVUI_SystemAlert"..i]; - if ( not frame:IsShown() ) then + if (frame and not frame:IsShown() ) then dialog = frame; break; end @@ -916,7 +916,7 @@ function SV:LoadSystemAlerts() SV.Animate:Orbit(configAlert.bg, 10, false, true) end for i = 1, 4 do - local alert = CreateFrame("Frame", "SVUI_SystemAlert"..i, SV.UIParent, "StaticPopupTemplate") + local alert = CreateFrame("Frame", "SVUI_SystemAlert"..i, SV.Screen, "StaticPopupTemplate") alert:SetID(i) alert:SetScript("OnShow", SysPop_Event_Show) alert:SetScript("OnHide", SysPop_Event_Hide) diff --git a/Interface/AddOns/SVUI/system/configs.lua b/Interface/AddOns/SVUI/system/configs.lua index edfc62a..8756ac2 100644 --- a/Interface/AddOns/SVUI/system/configs.lua +++ b/Interface/AddOns/SVUI/system/configs.lua @@ -19,6 +19,10 @@ GET ADDON DATA local SV = select(2, ...) local playerClass = select(2, UnitClass("player")); +local rez = GetCVar("gxResolution"); +local gxWidth = tonumber(rez:match("(%d+)x%d+")); +local bw = gxWidth * 0.5 +local defaultStatBarWidth = min(bw, 800) local filterClass = playerClass or "NONE" @@ -469,7 +473,6 @@ SV.configs["SVDock"] = { ["dockLeftHeight"] = 224, ["dockRightWidth"] = 412, ["dockRightHeight"] = 224, - ["dockStatWidth"] = defaultStatBarWidth, ["buttonSize"] = 30, ["buttonSpacing"] = 4, ["leftDockBackdrop"] = true, @@ -630,23 +633,24 @@ SV.configs["SVStats"] = { ["fontOutline"] = "OUTLINE", ["showBackground"] = true, ["shortGold"] = true, + ["dockStatWidth"] = defaultStatBarWidth, ["panels"] = { - ["BottomRightDataPanel"] = { + ["SVUI_StatsBar4"] = { ["right"] = "Bags", ["left"] = "Friends", ["middle"] = "Guild", }, - ["BottomLeftDataPanel"] = { + ["SVUI_StatsBar3"] = { ["left"] = "Time", ["middle"] = "System", ["right"] = "Gold", }, - ["TopLeftDataPanel"] = { + ["SVUI_StatsBar1"] = { ["left"] = "Durability Bar", ["middle"] = "Reputation Bar", ["right"] = "Experience Bar", }, - ["TopRightDataPanel"] = { + ["SVUI_StatsBar2"] = { ["left"] = "None", ["middle"] = "None", ["right"] = "None", @@ -2414,7 +2418,7 @@ SV.configs["SVUnit"] = { ["gridAllowed"] = true, ["rangeCheck"] = true, ["threatEnabled"] = true, - ["visibility"] = "[group:raid] show; hide", + ["visibility"] = "[@raid6, noexists][@raid11, exists][nogroup] hide;show", ["showBy"] = "RIGHT_DOWN", ["wrapXOffset"] = 8, ["wrapYOffset"] = 8, @@ -2563,7 +2567,7 @@ SV.configs["SVUnit"] = { ["gridAllowed"] = true, ["rangeCheck"] = true, ["threatEnabled"] = true, - ["visibility"] = "[group:raid] show; hide", + ["visibility"] = "[@raid11, noexists][@raid26, exists][nogroup] hide;show", ["showBy"] = "RIGHT_DOWN", ["wrapXOffset"] = 8, ["wrapYOffset"] = 8, @@ -2711,7 +2715,7 @@ SV.configs["SVUnit"] = { ["gridAllowed"] = true, ["rangeCheck"] = true, ["threatEnabled"] = true, - ["visibility"] = "[group:raid] show; hide", + ["visibility"] = "[@raid26, noexists][nogroup] hide;show", ["showBy"] = "RIGHT_DOWN", ["wrapXOffset"] = 8, ["wrapYOffset"] = 8, diff --git a/Interface/AddOns/SVUI/system/core.lua b/Interface/AddOns/SVUI/system/core.lua index 587d6f9..c1a4d9a 100644 --- a/Interface/AddOns/SVUI/system/core.lua +++ b/Interface/AddOns/SVUI/system/core.lua @@ -222,8 +222,6 @@ SVUI.ClassRole = "" SVUI.UnitRole = "NONE" SVUI.ConfigurationMode = false SVUI.EffectiveScale = 1 -SVUI.ActualHeight = actualHeight -SVUI.ActualWidth = actualWidth SVUI.yScreenArea = (actualHeight * 0.33) SVUI.xScreenArea = (actualWidth * 0.33) @@ -235,10 +233,10 @@ SVUI.Timers = LibSuperVillain("Timers"); --[[ UTILITY FRAMES ]]-- -SVUI.UIParent = CreateFrame("Frame", "SVUIParent", UIParent); -SVUI.UIParent:SetFrameLevel(UIParent:GetFrameLevel()); -SVUI.UIParent:SetPoint("CENTER", UIParent, "CENTER"); -SVUI.UIParent:SetSize(UIParent:GetSize()); +SVUI.Screen = CreateFrame("Frame", "SVUIParent", UIParent); +SVUI.Screen:SetFrameLevel(UIParent:GetFrameLevel()); +SVUI.Screen:SetPoint("CENTER", UIParent, "CENTER"); +SVUI.Screen:SetSize(UIParent:GetSize()); SVUI.Cloaked = CreateFrame("Frame", nil, UIParent); SVUI.Cloaked:Hide(); @@ -396,7 +394,7 @@ function SVUI:TaintHandler(taint, sourceName, sourceFunc) end function SVUI:VersionCheck() - local minimumVersion = 4.06; + local minimumVersion = 5.0; local installedVersion = SVLib:GetSafeData("install_version"); if(installedVersion) then if(type(installedVersion) == "string") then @@ -413,10 +411,10 @@ end function SVUI:RefreshEverything(bypass) self:RefreshAllSystemMedia(); - self.UIParent:Hide(); + self.Screen:Hide(); self.Mentalo:SetPositions(); SVLib:RefreshAll(); - self.UIParent:Show(); + self.Screen:Show(); if not bypass then self:VersionCheck() end @@ -449,14 +447,10 @@ function SVUI:PET_BATTLE_CLOSE() end function SVUI:PET_BATTLE_OPENING_START() + print("PET_BATTLE_OPENING_START") self:FlushDisplayAudit() end -function SVUI:PET_BATTLE_CLOSE() - self:PushDisplayAudit() - SVLib:LiveUpdate() -end - function SVUI:PLAYER_REGEN_DISABLED() local forceClosed = false; @@ -530,7 +524,7 @@ function SVUI:Load() self.DisplaySettings.screenwidth = gxWidth end - self:UI_SCALE_CHANGED(); + self:UI_SCALE_CHANGED() self:RefreshSystemFonts(); self:LoadSystemAlerts(); @@ -541,7 +535,7 @@ end function SVUI:Initialize() SVLib:Launch(); - self:UI_SCALE_CHANGED("PLAYER_LOGIN"); + self:UI_SCALE_CHANGED("PLAYER_LOGIN") self:PlayerInfoUpdate(); self.Mentalo:Initialize() self:VersionCheck() diff --git a/Interface/AddOns/SVUI/system/framework.lua b/Interface/AddOns/SVUI/system/framework.lua index b3076d3..7898163 100644 --- a/Interface/AddOns/SVUI/system/framework.lua +++ b/Interface/AddOns/SVUI/system/framework.lua @@ -90,42 +90,53 @@ function SV:UI_SCALE_CHANGED(event) SCREEN_MOD = gxMod / scale; - self.ghettoMonitor = nil - - if gxWidth < 1600 then - self.ghettoMonitor = true; - elseif gxWidth >= 3840 then - local width = gxWidth; - local height = gxHeight; + if(gxWidth < 1600) then + self.LowRez = true; + elseif(gxWidth >= 3840) then + self.LowRez = nil if(self.db.general.multiMonitor) then - if width >= 9840 then width = 3280; end - if width >= 7680 and width < 9840 then width = 2560; end - if width >= 5760 and width < 7680 then width = 1920; end - if width >= 5040 and width < 5760 then width = 1680; end - if width >= 4800 and width < 5760 and height == 900 then width = 1600; end - if width >= 4320 and width < 4800 then width = 1440; end - if width >= 4080 and width < 4320 then width = 1360; end - if width >= 3840 and width < 4080 then width = 1224; end - if width < 1600 then - self.ghettoMonitor = true; + if(gxWidth < 4080) then + evalwidth = 1224; + elseif(gxWidth < 4320) then + evalwidth = 1360; + elseif(gxWidth < 4800) then + evalwidth = 1440; + elseif(gxWidth < 5760) then + if(gxHeight == 900) then evalwidth = 1600 else evalwidth = 1680 end + elseif(gxWidth < 7680) then + evalwidth = 1920; + elseif(gxWidth < 9840) then + evalwidth = 2560; + elseif(gxWidth > 9839) then + evalwidth = 3280; end else - if width >= 9840 then width = 9840; end - if width >= 7680 and width < 9840 then width = 7680; end - if width >= 5760 and width < 7680 then width = 5760; end - if width >= 5040 and width < 5760 then width = 5040; end - if width >= 4800 and width < 5040 then width = 4800; end - if width >= 4320 and width < 4800 then width = 4320; end - if width >= 4080 and width < 4320 then width = 4080; end - if width >= 3840 and width < 4080 then width = 3840; end + if(gxWidth < 4080) then + evalwidth = 3840; + elseif(gxWidth < 4320) then + evalwidth = 4080; + elseif(gxWidth < 4800) then + evalwidth = 4320; + elseif(gxWidth < 5040) then + evalwidth = 4800; + elseif(gxWidth < 5760) then + evalwidth = 5040; + elseif(gxWidth < 7680) then + evalwidth = 5760; + elseif(gxWidth < 9840) then + evalwidth = 7680; + elseif(gxWidth > 9839) then + evalwidth = 9840; + end end - - evalwidth = width; end - if(parsefloat(UIParent:GetScale(),5) ~= parsefloat(scale,5) and (event == 'PLAYER_LOGIN')) then - SetCVar("useUiScale",1) - SetCVar("uiScale",scale) + local testScale1 = parsefloat(UIParent:GetScale(), 5) + local testScale2 = parsefloat(scale, 5) + + if(event == "PLAYER_LOGIN" and (testScale1 ~= testScale2)) then + SetCVar("useUiScale", 1) + SetCVar("uiScale", scale) WorldMapFrame.hasTaint = true; end @@ -138,32 +149,32 @@ function SV:UI_SCALE_CHANGED(event) if evalwidth then local width = evalwidth local height = gxHeight; - if not self.db.general.autoScale or height > 1200 then + if(not self.db.general.autoScale or height > 1200) then height = UIParent:GetHeight(); local ratio = gxHeight / height; width = evalwidth / ratio; end - self.UIParent:SetSize(width, height); + self.Screen:SetSize(width, height); else - self.UIParent:SetSize(UIParent:GetSize()); + self.Screen:SetSize(UIParent:GetSize()); end - self.UIParent:ClearAllPoints() - self.UIParent:SetPoint("CENTER") - - local change = abs((parsefloat(UIParent:GetScale(),5) * 100) - (parsefloat(scale,5) * 100)) - if(event == 'UI_SCALE_CHANGED' and change > 1 and self.db.general.autoScale) then - self:StaticPopup_Show('FAILED_UISCALE') - elseif(event == 'UI_SCALE_CHANGED' and change > 1) then - self:StaticPopup_Show('RL_CLIENT') - end + self.Screen:ClearAllPoints() + self.Screen:SetPoint("CENTER") - self.UIParent:UnregisterEvent('PLAYER_LOGIN') + local change = abs((testScale1 * 100) - (testScale2 * 100)) + if(change > 1) then + if(self.db.general.autoScale) then + self:StaticPopup_Show('FAILED_UISCALE') + else + self:StaticPopup_Show('RL_CLIENT') + end + end - self.EffectiveScale = self.UIParent:GetEffectiveScale() - self.ActualHeight = self.UIParent:GetHeight() - self.ActualWidth = self.UIParent:GetWidth() - end + self.EffectiveScale = self.Screen:GetEffectiveScale() + self.ActualHeight = self.Screen:GetHeight() + self.ActualWidth = self.Screen:GetWidth() + end end local function scaled(value) diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index 1f1e0cf..aaa5339 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -50,7 +50,7 @@ local MentaloUpdateHandler = CreateFrame("Frame", nil) local Sticky = {}; Sticky.Frames = {}; -Sticky.Frames[1] = SV.UIParent; +Sticky.Frames[1] = SV.Screen; Sticky.scripts = Sticky.scripts or {} Sticky.rangeX = 15 Sticky.rangeY = 15 @@ -240,7 +240,7 @@ local function CurrentPosition(frame) end local function GrabUsableRegions(frame) - local parent = frame or SV.UIParent + local parent = frame or SV.Screen local right = parent:GetRight() local top = parent:GetTop() local center = parent:GetCenter() @@ -302,7 +302,7 @@ end |__/ |__/ |__/|________/ |__/ |__/|__/ |__/|__/ \__/|_______/ --]] -local TheHand = CreateFrame("Frame", "SVUI_HandOfMentalo", SV.UIParent) +local TheHand = CreateFrame("Frame", "SVUI_HandOfMentalo", SV.Screen) TheHand:SetFrameStrata("DIALOG") TheHand:SetFrameLevel(99) TheHand:SetClampedToScreen(true) @@ -327,8 +327,8 @@ local TheHand_OnUpdate = function(self, elapsed) if self.elapsedTime > 0.1 then self.elapsedTime = 0 local x, y = GetCursorPosition() - local scale = SV.UIParent:GetEffectiveScale() - self:SetPoint("CENTER", SV.UIParent, "BOTTOMLEFT", (x / scale) + 50, (y / scale) + 50) + local scale = SV.Screen:GetEffectiveScale() + self:SetPoint("CENTER", SV.Screen, "BOTTOMLEFT", (x / scale) + 50, (y / scale) + 50) end end @@ -456,7 +456,7 @@ local Movable_OnDragStop = function(self) end self:ClearAllPoints() - self:Point(newAnchor, SV.UIParent, newAnchor, cX, cY) + self:Point(newAnchor, SV.Screen, newAnchor, cX, cY) Mentalo:SaveMovable(self.name) @@ -531,7 +531,7 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) if self.Frames[moveName].Created then return end if raised == nil then raised = true end - local movable = CreateFrame("Button", moveName, SV.UIParent) + local movable = CreateFrame("Button", moveName, SV.Screen) movable:SetFrameLevel(frame:GetFrameLevel() + 1) movable:SetClampedToScreen(true) movable:SetWidth(frame:GetWidth()) @@ -553,7 +553,7 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) local anchor1, anchorParent, anchor2, xPos, yPos = split("\031", CurrentPosition(frame)) if(SV.cache.Anchors and SV.cache.Anchors[moveName]) then if(type(SV.cache.Anchors[moveName]) == "table") then - movable:SetPoint(SV.cache.Anchors[moveName]["p"], SV.UIParent, SV.cache.Anchors[moveName]["p2"], SV.cache.Anchors[moveName]["p3"], SV.cache.Anchors[moveName]["p4"]) + movable:SetPoint(SV.cache.Anchors[moveName]["p"], SV.Screen, SV.cache.Anchors[moveName]["p2"], SV.cache.Anchors[moveName]["p3"], SV.cache.Anchors[moveName]["p4"]) SV.cache.Anchors[moveName] = CurrentPosition(movable) movable:ClearAllPoints() end diff --git a/Interface/AddOns/SVUI/system/utilities.lua b/Interface/AddOns/SVUI/system/utilities.lua index 396b76f..4ed4592 100644 --- a/Interface/AddOns/SVUI/system/utilities.lua +++ b/Interface/AddOns/SVUI/system/utilities.lua @@ -221,7 +221,7 @@ end function SV:AnchorToCursor(frame) local x, y = GetCursorPosition() local vHold = self.yScreenArea - local scale = self.EffectiveScale + local scale = self.Screen:GetEffectiveScale() local initialAnchor = "CENTER" local mod = 0 @@ -234,7 +234,7 @@ function SV:AnchorToCursor(frame) end frame:ClearAllPoints() - frame:SetPoint(initialAnchor, SV.UIParent, "BOTTOMLEFT", (x / scale), (y / scale) + mod) + frame:SetPoint(initialAnchor, SV.Screen, "BOTTOMLEFT", (x / scale), (y / scale) + mod) end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/system/visibility.lua b/Interface/AddOns/SVUI/system/visibility.lua index 8383d94..c5dd4f8 100644 --- a/Interface/AddOns/SVUI/system/visibility.lua +++ b/Interface/AddOns/SVUI/system/visibility.lua @@ -44,23 +44,23 @@ FRAME VISIBILITY MANAGEMENT ########################################################## ]]-- function SV:AddToDisplayAudit(frame) - if frame.IsVisible and frame.GetParent then + if(frame.GetParent) then DisplayFrames[frame] = frame:GetParent() end end function SV:FlushDisplayAudit() + self.NeedsFrameAudit = true if(InCombatLockdown()) then return end for frame, _ in pairs(DisplayFrames)do frame:SetParent(self.Cloaked) end - self.NeedsFrameAudit = true end function SV:PushDisplayAudit() if(InCombatLockdown()) then return end - for frame, parent in pairs(DisplayFrames)do - frame:SetParent(parent or self.UIParent) + for frame, parent in pairs(DisplayFrames) do + frame:SetParent(parent or self.Screen) end self.NeedsFrameAudit = false end diff --git a/Interface/AddOns/SVUI/xml/screen.lua b/Interface/AddOns/SVUI/xml/screen.lua new file mode 100644 index 0000000..bec319f --- /dev/null +++ b/Interface/AddOns/SVUI/xml/screen.lua @@ -0,0 +1,119 @@ +function SVUIScreenOnLoad(self) + local macWidth = math.floor(GetScreenWidth() * 100 + .5) / 100; + self:SetAttribute("MAC_DISPLAY_WIDTH", macWidth); + + local macHeight = math.floor(GetScreenHeight() * 100 + .5) / 100; + self:SetAttribute("MAC_DISPLAY_HEIGHT", macHeight); + + local effectiveScale = GetScreenHeightScale() + self:SetAttribute("EFFECTIVE_SCALE", effectiveScale); + + local activeScale + local autoScale = self:GetAttribute("AUTO_SCALE"); + if(autoScale) then + activeScale = math.max(0.64, math.min(1.15, GetScreenHeightScale())); + else + activeScale = math.max(0.64, math.min(1.15, GetCVar("uiScale") or UIParent:GetScale() or GetScreenHeightScale())); + end + self:SetAttribute("ACTIVE_SCALE", activeScale); + + local modScale = effectiveScale / activeScale + self:SetAttribute("MODIFIED_SCALE", modScale); + + self:RegisterEvent("PLAYER_LOGIN"); + self:RegisterEvent("UI_SCALE_CHANGED"); +end + +function SVUIScreenOnEvent(self, event) + local rez = GetCVar("gxResolution") + local height = rez:match("%d+x(%d+)") + local width = rez:match("(%d+)x%d+") + local gxHeight = tonumber(height) + local gxWidth = tonumber(width) + local evalwidth; + + local macWidth = math.floor(GetScreenWidth() * 100 + .5) / 100; + self:SetAttribute("MAC_DISPLAY_WIDTH", macWidth); + local macHeight = math.floor(GetScreenHeight() * 100 + .5) / 100; + self:SetAttribute("MAC_DISPLAY_HEIGHT", macHeight); + local effectiveScale = GetScreenHeightScale() + self:SetAttribute("EFFECTIVE_SCALE", effectiveScale); + + local activeScale + local autoScale = self:GetAttribute("AUTO_SCALE"); + if(autoScale) then + activeScale = math.max(0.64, math.min(1.15, GetScreenHeightScale())); + else + activeScale = math.max(0.64, math.min(1.15, GetCVar("uiScale") or UIParent:GetScale() or GetScreenHeightScale())); + end + self:SetAttribute("ACTIVE_SCALE", activeScale); + + local modScale = effectiveScale / activeScale + self:SetAttribute("MODIFIED_SCALE", modScale); + + if(IsMacClient()) then + macHeight = self:GetAttribute("MAC_DISPLAY_HEIGHT"); + macWidth = self:GetAttribute("MAC_DISPLAY_WIDTH"); + if(gxHeight ~= macHeight or gxWidth ~= macWidth) then + gxHeight = macHeight + gxWidth = macWidth + end + end + + if(gxWidth < 1600) then + self.LowRez = true; + elseif(gxWidth >= 3840) then + self.LowRez = nil + if(self:GetAttribute("MULTI_MONITOR")) then + if(gxWidth < 4080) then + evalwidth = 1224; + elseif(gxWidth < 4320) then + evalwidth = 1360; + elseif(gxWidth < 4800) then + evalwidth = 1440; + elseif(gxWidth < 5760) then + if(gxHeight == 900) then evalwidth = 1600 else evalwidth = 1680 end + elseif(gxWidth < 7680) then + evalwidth = 1920; + elseif(gxWidth < 9840) then + evalwidth = 2560; + elseif(gxWidth > 9839) then + evalwidth = 3280; + end + else + if(gxWidth < 4080) then + evalwidth = 3840; + elseif(gxWidth < 4320) then + evalwidth = 4080; + elseif(gxWidth < 4800) then + evalwidth = 4320; + elseif(gxWidth < 5040) then + evalwidth = 4800; + elseif(gxWidth < 5760) then + evalwidth = 5040; + elseif(gxWidth < 7680) then + evalwidth = 5760; + elseif(gxWidth < 9840) then + evalwidth = 7680; + elseif(gxWidth > 9839) then + evalwidth = 9840; + end + end + end + + self:ClearAllPoints(); + + if evalwidth then + local width = evalwidth + local height = gxHeight; + if(not autoScale or height > 1200) then + height = UIParent:GetHeight(); + local ratio = gxHeight / height; + width = evalwidth / ratio; + end + self:SetSize(width, height); + self:SetPoint("CENTER"); + else + self:SetAllPoints(UIParent); + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/xml/screen.xml b/Interface/AddOns/SVUI/xml/screen.xml new file mode 100644 index 0000000..7e582df --- /dev/null +++ b/Interface/AddOns/SVUI/xml/screen.xml @@ -0,0 +1,18 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="screen.lua"/> + <Frame name="SVUIParent" setAllPoints="true" frameStrata="MEDIUM"> + <Attributes> + <Attribute name="MAC_DISPLAY_HEIGHT" type="number" value="768"/> + <Attribute name="MAC_DISPLAY_WIDTH" type="number" value="1024"/> + <Attribute name="EFFECTIVE_SCALE" type="number" value="1"/> + <Attribute name="ACTIVE_SCALE" type="number" value="1"/> + <Attribute name="MODIFIED_SCALE" type="number" value="1"/> + <Attribute name="AUTO_SCALE" type="boolean" value="true"/> + <Attribute name="MULTI_MONITOR" type="boolean" value="false"/> + </Attributes> + <Scripts> + <OnLoad function="SVUIScreenOnLoad"/> + <OnEvent function="SVUIScreenOnEvent"/> + </Scripts> + </Frame> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/xml/widgets.xml b/Interface/AddOns/SVUI/xml/widgets.xml index 4604030..7f08346 100644 --- a/Interface/AddOns/SVUI/xml/widgets.xml +++ b/Interface/AddOns/SVUI/xml/widgets.xml @@ -1,4 +1,23 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Button name="SVUI_DockletButtonTemplate" virtual="true"> + <Size x="22" y="22"/> + <Attributes> + <Attribute name="tipText" type="string" value="Toggle" /> + <Attribute name="ownerFrame" type="string" value="" /> + <Attribute name="bgGradient" type="string" value="default" /> + <Attribute name="iconGradient" type="string" value="icon" /> + </Attributes> + <Layers> + <Layer level="OVERLAY"> + <Texture parentKey="Icon" file="Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT"> + <Anchors> + <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="2" y="-2" /> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-2" y="2" /> + </Anchors> + </Texture> + </Layer> + </Layers> + </Button> <Frame name="SVUI_ShadowTemplate" virtual="true"> <Attributes> <Attribute name="shadowAlpha" type="number" value="0.5" /> diff --git a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua index 7c628df..978c6c9 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua @@ -27,24 +27,17 @@ local AddonName, AddonObject = ... assert(LibSuperVillain, AddonName .. " requires LibSuperVillain") -local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "ChatOMatic_Profile", nil, "ChatOMatic_Cache") - -local Schema = PLUGIN.Schema; -local SV = _G["SVUI"]; -local L = SV.L ---[[ -########################################################## -CONFIG DATA -########################################################## -]]-- -PLUGIN.configs = { +AddonObject.configs = { ["saveChats"] = false, ["service"] = true, - ["autoAnswer"] = false, - ["prefix"] = true + ["autoAnswer"] = false, + ["prefix"] = true } -PLUGIN.db = PLUGIN.configs; +local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "ChatOMatic_Profile", nil, "ChatOMatic_Cache") +local Schema = PLUGIN.Schema; +local SV = _G["SVUI"]; +local L = SV.L --[[ ########################################################## CONFIG OPTIONS diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc index 371c392..464163a 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI |r|cffFFEF00Chat-O-Matic|r ## Notes: Supervillain UI [|cff9911FFVarious Chat Gadgets|r] ## SavedVariables: ChatOMatic_Data diff --git a/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua b/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua index 705452a..b5fad1c 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua +++ b/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua @@ -903,11 +903,11 @@ function PLUGIN:EnableAnsweringService() self:RegisterEvent("CHAT_MSG_IGNORED") self:RegisterUpdate("PhoneTimeUpdate", 4) - local buttonsize = SuperDockToolBarLeft.currentSize + local buttonsize = LeftSuperDockToolBar.currentSize local docklet = CreateFrame("Button", nil, UIParent) - docklet:SetParent(SuperDockToolBarLeft) - docklet:Point("LEFT", SuperDockToolBarLeft, "LEFT", 3, 0) + docklet:SetParent(LeftSuperDockToolBar) + docklet:Point("LEFT", LeftSuperDockToolBar, "LEFT", 3, 0) docklet:Size(buttonsize, buttonsize) docklet:SetFramedButtonTemplate() docklet.icon = docklet:CreateTexture(nil, "OVERLAY") @@ -917,9 +917,9 @@ function PLUGIN:EnableAnsweringService() docklet.TText = L["Show / Hide Phone Lines"] docklet:RegisterForClicks("AnyUp") - SV.SVDock:ActivateDockletButton(docklet, AnsweringOnClick) + --SV.SVDock:ActivateDockletButton(docklet, AnsweringOnClick) - SuperDockToolBarLeft:SetWidth(buttonsize + 4) + LeftSuperDockToolBar:SetWidth(buttonsize + 4) self.Docklet = docklet diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc index 1a96515..1970f4f 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI |r|cffFFEF00Config-O-Matic|r ## Notes: Supervillain UI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua index 995723b..db67dce 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua @@ -183,6 +183,7 @@ SV.Options.args.SVAura = { order = 3, type = "toggle", name = L["Disabled Blizzard"], + disabled = function() return not SV.db.SVAura.enable end, get = function(a)return SV.db.SVAura.disableBlizzard end, set = function(a,b)SV.db.SVAura.disableBlizzard = b;SV:StaticPopup_Show("RL_CLIENT")end }, @@ -191,6 +192,7 @@ SV.Options.args.SVAura = { type = "group", name = L["Options"], childGroups = "tree", + disabled = function() return not SV.db.SVAura.enable end, args = { common = { order = 10, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua index a739d2a..76c29dc 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua @@ -59,7 +59,7 @@ SV.Options.args.SVDock.args["common"] = { name = L['Bottom Panel'], desc = L['Display a border across the bottom of the screen.'], get = function(j)return SV.db.SVDock.bottomPanel end, - set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:BottomPanelVisibility()end + set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:BottomBorderVisibility()end }, topPanel = { order = 2, @@ -67,22 +67,7 @@ SV.Options.args.SVDock.args["common"] = { name = L['Top Panel'], desc = L['Display a border across the top of the screen.'], get = function(j)return SV.db.SVDock.topPanel end, - set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:TopPanelVisibility()end - }, - dockStatWidth = { - order = 3, - type = "range", - name = L["Bottom Stats Width"], - desc = L["PANEL_DESC"], - min = 150, - max = 1200, - step = 1, - width = "full", - get = function()return SV.db.SVDock.dockStatWidth end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateSuperDock(true) - end, + set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:TopBorderVisibility()end }, } }; diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua index 590e554..1daec14 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua @@ -78,8 +78,22 @@ SV.Options.args.SVStats = { type = "toggle", name = L["Shortened Gold Text"], }, - fontGroup = { + dockStatWidth = { order = 7, + type = "range", + name = L["Stats Width"], + desc = L["PANEL_DESC"], + min = 150, + max = 1200, + step = 1, + width = "full", + set = function(key,value) + MOD:ChangeDBVar(value, key[#key]); + MOD:UpdateStatSize(); + end, + }, + fontGroup = { + order = 8, type = "group", guiInline = true, name = L["Fonts"], diff --git a/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua b/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua index 4f865ca..12d7d78 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua @@ -50,10 +50,10 @@ if gameLocale == "enUS" then L["reset"] = "Reset Profile" L["reset_desc"] = "Reset the current profile back to its default values, in case your configuration is broken, or you simply want to start over." L["reset_sub"] = "Reset the current profile to the default" - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "frFR" then L["AURAS_DESC"] = "Configure les icônes qui apparaissent près de la Minicarte." @@ -86,10 +86,10 @@ if gameLocale == "frFR" then L["reset"] = "Réinitialiser le profil" L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase." L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut." - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "deDE" then L["AURAS_DESC"] = "Konfiguriere die Symbole für die Stärkungs- und Schwächungszauber nahe der Minimap." @@ -121,10 +121,10 @@ if gameLocale == "deDE" then L["reset"] = "Profil zurücksetzen" L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zurück, für den Fall das mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst." L["reset_sub"] = "Das aktuelle Profil auf Standard zurücksetzen." - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "itIT" then L["AURAS_DESC"] = "Configure the aura icons that appear near the minimap." @@ -157,10 +157,10 @@ if gameLocale == "itIT" then L["reset"] = "Reimposta Profilo" L["reset_desc"] = "Riporta il tuo profilo attivo alle sue impostazioni di default, nel caso in cui la tua configurazione si sia corrotta, o semplicemente tu voglia re-inizializzarla." L["reset_sub"] = "Reimposta il profilo ai suoi valori di default." - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "koKR" then L["AURAS_DESC"] = "Configure the aura icons that appear near the minimap." @@ -193,10 +193,10 @@ if gameLocale == "koKR" then L["reset"] = "프로필 초기화" L["reset_desc"] = "단순히 다시 새롭게 구성을 원하는 경우, 현재 프로필을 기본값으로 초기화 합니다." L["reset_sub"] = "현재의 프로필을 기본값으로 초기화 합니다" - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "ptBR" then L["AURAS_DESC"] = "Configurar os ícones das auras que aparecem perto do minimapa." @@ -210,10 +210,10 @@ if gameLocale == "ptBR" then L["TOGGLEART_DESC"] = "Ativa / Desativa a aparência deste quadro." L["TOOLTIP_DESC"] = "Opções de configuração para a Tooltip." L["TEXT_FORMAT_DESC"] = "Select the formatting of this text" - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "ruRU" then L["AURAS_DESC"] = "Настройка иконок эффектов, находящихся у миникарты." @@ -246,10 +246,10 @@ if gameLocale == "ruRU" then L["reset"] = "Сброс профиля" L["reset_desc"] = "Если ваша конфигурации испорчена или если вы хотите настроить всё заново - сбросьте текущий профиль на стандартные значения." L["reset_sub"] = "Сброс текущего профиля на стандартный" - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "esES" or gameLocale == "esMX" then L["AURAS_DESC"] = "Configura los iconos de las auras que aparecen cerca del minimapa." @@ -282,10 +282,10 @@ if gameLocale == "esES" or gameLocale == "esMX" then L["reset"] = "Reiniciar Perfil" L["reset_desc"] = "Reinicia el perfil actual a los valores por defectos, en caso de que se haya estropeado la configuración o quieras volver a empezar de nuevo." L["reset_sub"] = "Reinicar el perfil actual al de por defecto" - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "zhTW" then L["AURAS_DESC"] = "小地圖旁的光環圖示設定." @@ -318,10 +318,10 @@ if gameLocale == "zhTW" then L["reset"] = "重置設定檔" L["reset_desc"] = "將當前的設定檔恢復到它的預設值,用於你的設定檔損壞,或者你只是想重來的情況。" L["reset_sub"] = "將當前的設定檔恢復為預設值" - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end if gameLocale == "zhCN" then L["AURAS_DESC"] = "小地图旁的光环图标设置." @@ -354,8 +354,8 @@ if gameLocale == "zhCN" then L["reset"] = "重置配置文件" L["reset_desc"] = "将当前的配置文件恢复到它的默认值,用于你的配置文件损坏,或者你只是想重来的情况。" L["reset_sub"] = "将当前的配置文件恢复为默认值" - L["BottomRightDataPanel"] = "Bottom Bar Right" - L["BottomLeftDataPanel"] = "Bottom Bar Left" - L["TopLeftDataPanel"] = "Top Bar Left" - L["TopRightDataPanel"] = "Top Bar Right" + L["SVUI_StatsBar4"] = "Bottom Bar Right" + L["SVUI_StatsBar3"] = "Bottom Bar Left" + L["SVUI_StatsBar1"] = "Top Bar Left" + L["SVUI_StatsBar2"] = "Top Bar Right" end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua index 86d5ef7..509db7b 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/Loader.lua @@ -27,17 +27,7 @@ local AddonName, AddonObject = ... assert(LibSuperVillain, AddonName .. " requires LibSuperVillain") -local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "CraftOMatic_Profile", nil, "CraftOMatic_Cache") - -local Schema = PLUGIN.Schema; -local SV = _G["SVUI"]; -local L = SV.L ---[[ -########################################################## -CONFIG DATA -########################################################## -]]-- -PLUGIN.configs = { +AddonObject.configs = { ["fontSize"] = 12, ["farming"] = { ["buttonsize"] = 35, @@ -54,7 +44,10 @@ PLUGIN.configs = { }, } -PLUGIN.db = table.copy(PLUGIN.configs); +local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "CraftOMatic_Profile", nil, "CraftOMatic_Cache") +local Schema = PLUGIN.Schema; +local SV = _G["SVUI"]; +local L = SV.L --[[ ########################################################## CONFIG OPTIONS diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua index 3affcd0..cd302ad 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua @@ -343,7 +343,7 @@ local ModeAlert_OnHide = function() SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end - SuperDockAlertRight:Deactivate() + RightSuperDockAlert:Deactivate() end local ModeAlert_OnShow = function(self) @@ -353,7 +353,7 @@ local ModeAlert_OnShow = function(self) return; end SV:SecureFadeIn(self, 0.3, 0, 1) - SuperDockAlertRight:Activate(self) + RightSuperDockAlert:Activate(self) end local ModeAlert_OnMouseDown = function(self) @@ -392,16 +392,16 @@ function PLUGIN:Load() self.InModeGear = false; local ALERT_HEIGHT = 60; - local DOCK_WIDTH = SuperDockWindowRight:GetWidth(); - local DOCK_HEIGHT = SuperDockWindowRight:GetHeight(); + local DOCK_WIDTH = RightSuperDockFrameHolder:GetWidth(); + local DOCK_HEIGHT = RightSuperDockFrameHolder:GetHeight(); local DOCKLET_WIDTH = DOCK_WIDTH - 4 local DOCKLET_HEIGHT = DOCK_HEIGHT - 4 local BUTTON_SIZE = (DOCK_HEIGHT * 0.25) - 4; - local modesDocklet = CreateFrame("Frame", "SVUI_ModesDockFrame", SuperDockWindowRight) + local modesDocklet = CreateFrame("Frame", "SVUI_ModesDockFrame", RightSuperDockFrameHolder) modesDocklet:SetWidth(DOCKLET_WIDTH); modesDocklet:SetHeight(DOCKLET_HEIGHT); - modesDocklet:SetPoint("CENTER",SuperDockWindowRight,"CENTER",0,0); + modesDocklet:SetPoint("CENTER",RightSuperDockFrameHolder,"CENTER",0,0); local modesToolBar = CreateFrame("Frame", "SVUI_ModesDockToolBar", modesDocklet) modesToolBar:SetWidth(BUTTON_SIZE + 4); @@ -456,8 +456,8 @@ function PLUGIN:Load() mode1Button:SetScript('OnLeave', ModeButton_OnLeave) mode1Button:SetScript('OnMouseDown', ModeButton_OnMouseDown) - local ModeAlert = CreateFrame("Frame", nil, SuperDockAlertRight) - ModeAlert:SetAllPoints(SuperDockAlertRight) + local ModeAlert = CreateFrame("Frame", nil, RightSuperDockAlert) + ModeAlert:SetAllPoints(RightSuperDockAlert) ModeAlert:SetBackdrop({ bgFile = [[Interface\AddOns\SVUI\assets\artwork\Bars\HALFTONE]], edgeFile = [[Interface\BUTTONS\WHITE8X8]], @@ -545,7 +545,7 @@ function PLUGIN:Load() self.LogWindow = log self.Docklet = modesDocklet - SV:RegisterDocklet("SVUI_ModesDockFrame", self.TitleID, ICON_FILE, false) + SV.SVDock:RegisterDocklet("SVUI_ModesDockFrame", self.TitleID, ICON_FILE, false) self.Docklet:Hide() diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc index a86cba0..fe02c04 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI |r|cffFFEF00Craft-O-Matic|r ## Notes: Supervillain UI [|cff9911FFProfession Tools|r]. ## SavedVariablesPerCharacter: CraftOMatic_Profile, CraftOMatic_Cache diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua index 365a57c..8395a29 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua @@ -608,8 +608,8 @@ function PLUGIN:PrepareFarmingTools() local BUTTONSIZE = self.db.farming.buttonsize or 35; -- SEEDS - local farmSeedBarAnchor = CreateFrame("Frame", "FarmSeedBarAnchor", SV.UIParent) - farmSeedBarAnchor:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", -40, -300) + local farmSeedBarAnchor = CreateFrame("Frame", "FarmSeedBarAnchor", SV.Screen) + farmSeedBarAnchor:Point("TOPRIGHT", SV.Screen, "TOPRIGHT", -40, -300) farmSeedBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or ((BUTTONSIZE + BUTTONSPACE) * 8), horizontal and ((BUTTONSIZE + BUTTONSPACE) * 8) or ((BUTTONSIZE + BUTTONSPACE) * 10)) for i = 1, NUM_SEED_BARS do local seedBar = CreateFrame("Frame", "FarmSeedBar"..i, farmSeedBarAnchor) @@ -620,7 +620,7 @@ function PLUGIN:PrepareFarmingTools() SV.Mentalo:Add(farmSeedBarAnchor, "Farming Seeds") -- FARM TOOLS - local farmToolBarAnchor = CreateFrame("Frame", "FarmToolBarAnchor", SV.UIParent) + local farmToolBarAnchor = CreateFrame("Frame", "FarmToolBarAnchor", SV.Screen) farmToolBarAnchor:Point("TOPRIGHT", farmSeedBarAnchor, horizontal and "BOTTOMRIGHT" or "TOPLEFT", horizontal and 0 or -(BUTTONSPACE * 2), horizontal and -(BUTTONSPACE * 2) or 0) farmToolBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) local farmToolBar = CreateFrame("Frame", "FarmToolBar", farmToolBarAnchor) @@ -630,7 +630,7 @@ function PLUGIN:PrepareFarmingTools() SV.Mentalo:Add(farmToolBarAnchor, "Farming Tools") -- PORTALS - local farmPortalBarAnchor = CreateFrame("Frame", "FarmPortalBarAnchor", SV.UIParent) + local farmPortalBarAnchor = CreateFrame("Frame", "FarmPortalBarAnchor", SV.Screen) farmPortalBarAnchor:Point("TOPRIGHT", farmToolBarAnchor, horizontal and "BOTTOMRIGHT" or "TOPLEFT", horizontal and 0 or -(BUTTONSPACE * 2), horizontal and -(BUTTONSPACE * 2) or 0) farmPortalBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) local farmPortalBar = CreateFrame("Frame", "FarmPortalBar", farmPortalBarAnchor) diff --git a/Interface/AddOns/SVUI_FightOMatic/Loader.lua b/Interface/AddOns/SVUI_FightOMatic/Loader.lua index 0953aed..d6f1209 100644 --- a/Interface/AddOns/SVUI_FightOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_FightOMatic/Loader.lua @@ -27,23 +27,16 @@ local AddonName, AddonObject = ... assert(LibSuperVillain, AddonName .. " requires LibSuperVillain") -local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "FightOMatic_Profile", nil, "FightOMatic_Cache") +AddonObject.configs = { + ["annoyingEmotes"] = false, +} +local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "FightOMatic_Profile", nil, "FightOMatic_Cache") local Schema = PLUGIN.Schema; local SV = _G["SVUI"]; local L = SV.L --[[ ########################################################## -CONFIG DATA -########################################################## -]]-- -PLUGIN.configs = { - ["annoyingEmotes"] = false, -} - -PLUGIN.db = table.copy(PLUGIN.configs); ---[[ -########################################################## CONFIG OPTIONS ########################################################## ]]-- diff --git a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua index 54e871e..cbbb54e 100644 --- a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua +++ b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.lua @@ -364,7 +364,7 @@ local function ClearCacheScans() end local function ClearSavedScans() - PLUGIN.cache = {} + wipe(PLUGIN.cache) end local function EnemyAlarm(name, class, colors, kos) @@ -900,7 +900,7 @@ local FightOMaticAlert_OnHide = function() SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end - SuperDockAlertRight:Deactivate() + RightSuperDockAlert:Deactivate() end local FightOMaticAlert_OnShow = function(self) @@ -910,7 +910,7 @@ local FightOMaticAlert_OnShow = function(self) return; end SV:SecureFadeIn(self, 0.3, 0, 1) - SuperDockAlertRight:Activate(self) + RightSuperDockAlert:Activate(self) end local FightOMaticAlert_OnMouseDown = function(self) @@ -993,20 +993,22 @@ BUILD FUNCTION ########################################################## ]]-- function PLUGIN:Load() + self.cache = self.cache or {} + local ALERT_HEIGHT = 60; - local DOCK_WIDTH = SuperDockWindowRight:GetWidth(); - local DOCK_HEIGHT = SuperDockWindowRight:GetHeight(); + local DOCK_WIDTH = RightSuperDockFrameHolder:GetWidth(); + local DOCK_HEIGHT = RightSuperDockFrameHolder:GetHeight(); local BUTTON_SIZE = (DOCK_HEIGHT * 0.25) - 4; self.HitBy = false; self.Scanning = false; self.InPVP = false - local holder = CreateFrame("Frame", "SVUI_FightOMaticDock", SuperDockWindowRight) + local holder = CreateFrame("Frame", "SVUI_FightOMaticDock", RightSuperDockFrameHolder) holder:SetFrameStrata("BACKGROUND") holder:SetWidth(DOCK_WIDTH - 4); holder:SetHeight(DOCK_HEIGHT - 4); - holder:SetPoint("CENTER",SuperDockWindowRight,"CENTER",0,0); + holder:SetPoint("CENTER",RightSuperDockFrameHolder,"CENTER",0,0); local toolBar = CreateFrame("Frame", "SVUI_FightOMaticToolBar", holder) toolBar:SetWidth(BUTTON_SIZE + 4); @@ -1127,7 +1129,7 @@ function PLUGIN:Load() MakeUtilityWindow() MakeInfoWindow() - SV:RegisterDocklet("SVUI_FightOMaticDock", self.TitleID, ICON_FILE) + SV.SVDock:RegisterDocklet("SVUI_FightOMaticDock", self.TitleID, ICON_FILE) holder:Hide() diff --git a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc index a95517c..c806648 100644 --- a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc +++ b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI |r|cffFFEF00Fight-O-Matic|r ## Notes: Supervillain UI [|cff9911FFPvP Tools|r]. ## SavedVariablesPerCharacter: FightOMatic_Profile, FightOMatic_Cache diff --git a/Interface/AddOns/SVUI_LogOMatic/Loader.lua b/Interface/AddOns/SVUI_LogOMatic/Loader.lua index b00375d..c0552fc 100644 --- a/Interface/AddOns/SVUI_LogOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_LogOMatic/Loader.lua @@ -27,16 +27,10 @@ local AddonName, AddonObject = ... assert(LibSuperVillain, AddonName .. " requires LibSuperVillain") -local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "LogOMatic_Profile") ---[[ -########################################################## -CONFIG DATA -########################################################## -]]-- -PLUGIN.configs = { - ["incompatible"] = { - ["Altoholic"] = true, - }, +AddonObject.configs = { + ["incompatible"] = { + ["Altoholic"] = true, + }, } -PLUGIN.db = table.copy(PLUGIN.configs); \ No newline at end of file +local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "LogOMatic_Profile") \ No newline at end of file diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc index 87c5626..06bdf22 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI |r|cffFFEF00Log-O-Matic|r ## Notes: Supervillain UI [|cff9911FFData Logging|r]. ## SavedVariables: LogOMatic_Data diff --git a/Interface/AddOns/SVUI_StyleOMatic/Loader.lua b/Interface/AddOns/SVUI_StyleOMatic/Loader.lua index ee266a1..2fa82f1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/Loader.lua @@ -27,17 +27,7 @@ local AddonName, AddonObject = ... assert(LibSuperVillain, AddonName .. " requires LibSuperVillain") -local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "StyleOMatic_Profile", "StyleOMatic_Global") - -local Schema = PLUGIN.Schema; -local SV = _G["SVUI"]; -local L = SV.L ---[[ -########################################################## -CONFIG DATA -########################################################## -]]-- -PLUGIN.configs = { +AddonObject.configs = { ["blizzard"] = { ["enable"] = true, ["bags"] = true, @@ -122,7 +112,10 @@ PLUGIN.configs = { } }; -PLUGIN.db = table.copy(PLUGIN.configs); +local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "StyleOMatic_Profile", "StyleOMatic_Global") +local Schema = PLUGIN.Schema; +local SV = _G["SVUI"]; +local L = SV.L --[[ ########################################################## CONFIG OPTIONS diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index b056b7f..e60e56c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -262,83 +262,83 @@ OPTIONS CREATION ########################################################## ]]-- local RegisterAddonDocklets = function() - local MAIN = _G["SuperDockletMain"]; - local EXTRA = _G["SuperDockletExtra"]; + local MAIN = _G["SVUI_AddonDock1"]; + local EXTRA = _G["SVUI_AddonDock2"]; local main = SV.db.SVDock.docklets.DockletMain; local alternate = SV.db.SVDock.docklets.enableExtra and SV.db.SVDock.docklets.DockletExtra or ""; local tipLeft, tipRight = "", ""; if main == nil or main == "None" then return end if find(main, "Skada") or find(alternate, "Skada") then - if SV:IsDockletReady("Skada") then + if SV.SVDock:IsDockletReady("Skada") then PLUGIN:Docklet_Skada() if find(alternate, "Skada") and EXTRA.FrameName ~= "SkadaHolder2" then tipRight = "and Skada"; - SV:RegisterExtraDocklet("SkadaHolder2") + SV.SVDock:RegisterExtraDocklet("SkadaHolder2") PLUGIN.DockedParent["Skada"] = EXTRA end if find(main, "Skada") and MAIN.FrameName ~= "SkadaHolder" then tipLeft = "Skada"; - SV:RegisterMainDocklet("SkadaHolder") + SV.SVDock:RegisterMainDocklet("SkadaHolder") PLUGIN.DockedParent["Skada"] = MAIN end end end if main == "Omen" or alternate == "Omen" then - if SV:IsDockletReady("Omen") then + if SV.SVDock:IsDockletReady("Omen") then if alternate == "Omen" and EXTRA.FrameName ~= "OmenAnchor" then tipRight = "and Omen"; - SV:RegisterExtraDocklet("OmenAnchor") + SV.SVDock:RegisterExtraDocklet("OmenAnchor") PLUGIN:Docklet_Omen(EXTRA) PLUGIN.DockedParent["Omen"] = EXTRA elseif MAIN.FrameName ~= "OmenAnchor" then tipLeft = "Omen"; - SV:RegisterMainDocklet("OmenAnchor") + SV.SVDock:RegisterMainDocklet("OmenAnchor") PLUGIN:Docklet_Omen(MAIN) PLUGIN.DockedParent["Omen"] = MAIN end end end if main == "Recount" or alternate == "Recount" then - if SV:IsDockletReady("Recount") then + if SV.SVDock:IsDockletReady("Recount") then if alternate == "Recount" and EXTRA.FrameName ~= "Recount_MainWindow" then tipRight = "and Recount"; - SV:RegisterExtraDocklet("Recount_MainWindow") + SV.SVDock:RegisterExtraDocklet("Recount_MainWindow") PLUGIN:Docklet_Recount(EXTRA) PLUGIN.DockedParent["Recount"] = EXTRA elseif MAIN.FrameName ~= "Recount_MainWindow" then tipLeft = "Recount"; - SV:RegisterMainDocklet("Recount_MainWindow") + SV.SVDock:RegisterMainDocklet("Recount_MainWindow") PLUGIN:Docklet_Recount(MAIN) PLUGIN.DockedParent["Recount"] = MAIN end end end if main == "TinyDPS" or alternate == "TinyDPS" then - if SV:IsDockletReady("TinyDPS") then + if SV.SVDock:IsDockletReady("TinyDPS") then if alternate == "TinyDPS" and EXTRA.FrameName ~= "tdpsFrame" then tipRight = "and TinyDPS"; - SV:RegisterExtraDocklet("tdpsFrame") + SV.SVDock:RegisterExtraDocklet("tdpsFrame") PLUGIN:Docklet_TinyDPS(EXTRA) PLUGIN.DockedParent["TinyDPS"] = EXTRA elseif MAIN.FrameName ~= "tdpsFrame" then tipLeft = "TinyDPS"; - SV:RegisterMainDocklet("tdpsFrame") + SV.SVDock:RegisterMainDocklet("tdpsFrame") PLUGIN:Docklet_TinyDPS(MAIN) PLUGIN.DockedParent["TinyDPS"] = MAIN end end end if main == "alDamageMeter" or alternate == "alDamageMeter" then - if SV:IsDockletReady("alDamageMeter") then + if SV.SVDock:IsDockletReady("alDamageMeter") then if alternate == "alDamageMeter" and EXTRA.FrameName ~= "alDamagerMeterFrame" then tipRight = "and alDamageMeter"; - SV:RegisterExtraDocklet("alDamagerMeterFrame") + SV.SVDock:RegisterExtraDocklet("alDamagerMeterFrame") PLUGIN:Docklet_alDamageMeter(EXTRA) PLUGIN.DockedParent["alDamageMeter"] = EXTRA elseif MAIN.FrameName ~= "alDamagerMeterFrame" then tipLeft = "alDamageMeter"; - SV:RegisterMainDocklet("alDamagerMeterFrame") + SV.SVDock:RegisterMainDocklet("alDamagerMeterFrame") PLUGIN:Docklet_alDamageMeter(MAIN) PLUGIN.DockedParent["alDamageMeter"] = MAIN end @@ -383,8 +383,8 @@ function PLUGIN:Load() alert:Hide(); self.Alert = alert; - NewHook(SV, "ReloadDocklets", RegisterAddonDocklets); - SV:ReloadDocklets(); + NewHook(SV.SVDock, "ReloadDocklets", RegisterAddonDocklets); + SV.SVDock:ReloadDocklets(); self:RegisterEvent("PLAYER_ENTERING_WORLD"); self:RegisterEvent("ADDON_LOADED"); diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index 21def20..698ea94 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch, Azilroka, Sortokk -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI |r|cffFFEF00Style-O-Matic|r ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## SavedVariables: StyleOMatic_Global diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua index 39ad236..c81ae03 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua @@ -42,7 +42,7 @@ local function freestyle(bar) local bg = bar:Get("bigwigs:elvui:barbg") if bg then bg:ClearAllPoints() - bg:SetParent(SVUI.UIParent) + bg:SetParent(SVUI.Screen) bg:Hide() FreeBG[#FreeBG + 1] = bg end @@ -50,7 +50,7 @@ local function freestyle(bar) local ibg = bar:Get("bigwigs:elvui:iconbg") if ibg then ibg:ClearAllPoints() - ibg:SetParent(SVUI.UIParent) + ibg:SetParent(SVUI.Screen) ibg:Hide() FreeBG[#FreeBG + 1] = ibg end diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua index 0389f0b..30c1c37 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua @@ -106,7 +106,7 @@ local function StyleRecount() PLUGIN:ApplyScrollFrameStyle(Recount_MainWindow_ScrollBarScrollBar) - Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end if SV.CurrentlyDocked["Recount_MainWindow"] then SuperDockWindowRight:Show() end end) + Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end if SV.CurrentlyDocked["Recount_MainWindow"] then RightSuperDockFrameHolder:Show() end end) Recount.MainWindow.FileButton:HookScript('OnClick', function(self) if LibDropdownFrame0 then PLUGIN:ApplyFrameStyle(LibDropdownFrame0) end end) hooksecurefunc(Recount, 'ShowScrollbarElements', function(self, name) Recount_MainWindow_ScrollBarScrollBar:Show() end) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua index beb1acb..f9f875b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua @@ -42,13 +42,13 @@ SKADA ]]-- local function CheckForHolders() if(not SkadaHolder) then - SkadaHolder = CreateFrame("Frame", "SkadaHolder", SuperDockletMain) + SkadaHolder = CreateFrame("Frame", "SkadaHolder", SVUI_AddonDock1) end if(not SkadaHolder2) then - SkadaHolder2 = CreateFrame("Frame", "SkadaHolder2", SuperDockletExtra) + SkadaHolder2 = CreateFrame("Frame", "SkadaHolder2", SVUI_AddonDock2) end - SkadaHolder:SetSize(SuperDockletMain:GetSize()) - SkadaHolder2:SetSize(SuperDockletExtra:GetSize()) + SkadaHolder:SetSize(SVUI_AddonDock1:GetSize()) + SkadaHolder2:SetSize(SVUI_AddonDock2:GetSize()) end local function skada_panel_loader(holder, window) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua index 4d120e5..1dbbef9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua @@ -46,7 +46,7 @@ local function StyleTinyDPS() tdpsFrame:HookScript("OnShow", function() if InCombatLockdown() then return end if SV.CurrentlyDocked["tdpsFrame"] then - SuperDockWindowRight:Show() + RightSuperDockFrameHolder:Show() end end) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua index d0b6fb0..a68f60a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua @@ -46,7 +46,7 @@ local function StyleALDamageMeter() alDamageMeterFrame:HookScript('OnShow', function() if InCombatLockdown() then return end if SV.CurrentlyDocked["alDamagerMeterFrame"] then - SuperDockWindowRight:Show() + RightSuperDockFrameHolder:Show() end end) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua index 7e8956b..1d3c951 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua @@ -132,7 +132,7 @@ local _hook_WeatherFrameUpdate = function(self) self.Label:Hide() self.Duration:SetPoint("CENTER", self, 0, 8) self:ClearAllPoints() - self:SetPoint("TOP", SV.UIParent, 0, -15) + self:SetPoint("TOP", SV.Screen, 0, -15) end end @@ -329,11 +329,11 @@ local function PetBattleStyle() PetBattleActionBar:SetFrameStrata('BACKGROUND') PetBattleActionBar:SetFixedPanelTemplate("Blackout") - local SuperDockBottomDataAnchor = _G.SuperDockBottomDataAnchor; - if(SuperDockBottomDataAnchor) then - PetBattleActionBar:SetPoint("BOTTOM", SuperDockBottomDataAnchor, "TOP", 0, 4) + local SVUI_BottomStatsDock = _G.SVUI_BottomStatsDock; + if(SVUI_BottomStatsDock) then + PetBattleActionBar:SetPoint("BOTTOM", SVUI_BottomStatsDock, "TOP", 0, 4) else - PetBattleActionBar:SetPoint("BOTTOM", SV.UIParent, "BOTTOM", 0, 4) + PetBattleActionBar:SetPoint("BOTTOM", SV.Screen, "BOTTOM", 0, 4) end PetBattleFrame.TopVersusText:ClearAllPoints() @@ -355,7 +355,7 @@ local function PetBattleStyle() BottomFrame.TurnTimer:Size(BottomFrame.TurnTimer.SkipButton:GetWidth(), BottomFrame.TurnTimer.SkipButton:GetHeight()) BottomFrame.TurnTimer:ClearAllPoints() - BottomFrame.TurnTimer:SetPoint("TOP", SV.UIParent, "TOP", 0, -140) + BottomFrame.TurnTimer:SetPoint("TOP", SV.Screen, "TOP", 0, -140) BottomFrame.TurnTimer.TimerText:SetPoint("CENTER") BottomFrame.FlowFrame:RemoveTextures() @@ -414,4 +414,4 @@ end PLUGIN LOADING ########################################################## ]]-- -PLUGIN:SaveCustomStyle(PetBattleStyle) \ No newline at end of file +PLUGIN:SaveBlizzardStyle('Blizzard_PetBattleUI', PetBattleStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua index 020d00d..c7afadd 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua @@ -489,7 +489,7 @@ local function SystemPanelQue() hooksecurefunc(GhostFrame, "SetBackdropColor", _hook_GhostFrameBackdropColor) hooksecurefunc(GhostFrame, "SetBackdropBorderColor", _hook_GhostFrameBackdropColor) GhostFrame:ClearAllPoints() - GhostFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, -150) + GhostFrame:SetPoint("TOP", SV.Screen, "TOP", 0, -150) GhostFrameContentsFrame:SetButtonTemplate() GhostFrameContentsFrameIcon:SetTexture(0,0,0,0) local x = CreateFrame("Frame", nil, GhostFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua index 368548e..e179438 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua @@ -624,9 +624,11 @@ end function PLUGIN:ApplyAlertStyle(frame) if(not frame or (frame and frame.StyleHooked)) then return end + local lvl = frame:GetFrameLevel() + if lvl < 1 then lvl = 1 end local alertpanel = CreateFrame("Frame", nil, frame) alertpanel:SetAllPoints(frame) - alertpanel:SetFrameLevel(frame:GetFrameLevel() - 1) + alertpanel:SetFrameLevel(lvl - 1) alertpanel:SetBackdrop({ bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-BG]] }) diff --git a/Interface/AddOns/SVUI_TrackOMatic/Loader.lua b/Interface/AddOns/SVUI_TrackOMatic/Loader.lua index 31f1b26..80c2338 100644 --- a/Interface/AddOns/SVUI_TrackOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_TrackOMatic/Loader.lua @@ -27,24 +27,17 @@ local AddonName, AddonObject = ... assert(LibSuperVillain, AddonName .. " requires LibSuperVillain") -local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "TrackOMatic_Profile", "TrackOMatic_Global") - -local Schema = PLUGIN.Schema; -local SV = _G["SVUI"]; -local L = SV.L ---[[ -########################################################## -CONFIG DATA -########################################################## -]]-- -PLUGIN.configs = { +AddonObject.configs = { ["size"] = 75, ["fontSize"] = 12, ["groups"] = true, ["proximity"] = false, } -PLUGIN.db = table.copy(PLUGIN.configs); +local PLUGIN = LibSuperVillain("Registry"):NewPlugin(AddonName, AddonObject, "TrackOMatic_Profile", "TrackOMatic_Global") +local Schema = PLUGIN.Schema; +local SV = _G["SVUI"]; +local L = SV.L --[[ ########################################################## CONFIG OPTIONS diff --git a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc index 1ab0ce8..b90a921 100644 --- a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc +++ b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.0 +## Version: 5.1 ## Title: |cffFF9900SVUI |r|cffFFEF00Track-O-Matic|r ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r]. ## SavedVariables: TrackOMatic_Global