diff --git a/SVUITheme_Simple/SVUITheme_Simple.toc b/SVUITheme_Simple/SVUITheme_Simple.toc index 18bdfb7..1a8e122 100644 --- a/SVUITheme_Simple/SVUITheme_Simple.toc +++ b/SVUITheme_Simple/SVUITheme_Simple.toc @@ -1,4 +1,4 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch ## Version: 1.0.0 ## Title: |cffFF9900SVUI Theme: |r|cff00EFFFSimple|r diff --git a/SVUI_!Core/SVUI_!Core.toc b/SVUI_!Core/SVUI_!Core.toc index 8e2cfd2..b88c93e 100644 --- a/SVUI_!Core/SVUI_!Core.toc +++ b/SVUI_!Core/SVUI_!Core.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cff00FF00!Core|r ## Notes: SVUI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global, SVUI_Errors, SVUI_Filters, SVUI_Media diff --git a/SVUI_!Core/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc b/SVUI_!Core/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc index 666cf15..bae72fd 100644 --- a/SVUI_!Core/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc +++ b/SVUI_!Core/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc @@ -1,4 +1,4 @@ -## Interface: 60100 +## Interface: 60200 ## LoadOnDemand: 1 ## X-Curse-Packaged-Version: 6.1.0 - r92 ## X-Curse-Project-Name: LibSharedMedia-3.0 diff --git a/SVUI_!Core/system/_docklets/misc.lua b/SVUI_!Core/system/_docklets/misc.lua index 3311389..92336a7 100644 --- a/SVUI_!Core/system/_docklets/misc.lua +++ b/SVUI_!Core/system/_docklets/misc.lua @@ -76,6 +76,7 @@ LOCALS ########################################################## ]]-- local HEARTH_SPELLS = {556,50977,18960,126892} +local HEARTH_ITEMS = {110560} local function GetMacroCooldown(itemID) local start,duration = GetItemCooldown(itemID) @@ -117,7 +118,7 @@ local Hearth_OnEnter = function(self) local text2 = self:GetAttribute("tipExtraText") GameTooltip:AddLine(" ", 1, 1, 1) GameTooltip:AddDoubleLine("[Left-Click]", text1, 0, 1, 0, 1, 1, 1) - if(text2) then + if(text2 and text2 ~= "") then GameTooltip:AddDoubleLine("[Right-Click]", text2, 0, 1, 0, 1, 1, 1) end end @@ -197,6 +198,18 @@ local function LoadMiscTools() hasRightClick = true; end end + --HEARTH_ITEMS + if(not hasRightClick) then + for i = 1, #HEARTH_ITEMS do + local rightClickItem = GetItemInfo(HEARTH_ITEMS[i]) + if(rightClickItem) then + hearth:SetAttribute("tipExtraText", rightClickItem) + hearth:SetAttribute("type2", "macro") + hearth:SetAttribute("macrotext2", "/use [nomod] " .. rightClickItem) + hasRightClick = true; + end + end + end end end diff --git a/SVUI_!Core/system/_reports/friends.lua b/SVUI_!Core/system/_reports/friends.lua index 8e661bf..3a5f030 100644 --- a/SVUI_!Core/system/_reports/friends.lua +++ b/SVUI_!Core/system/_reports/friends.lua @@ -54,14 +54,7 @@ local ONLINE_MSG = gsub(ERR_FRIEND_ONLINE_SS, "\124Hplayer:%%s\124h%[%%s%]\124h" local OFFLINE_MSG = gsub(ERR_FRIEND_OFFLINE_S, "%%s", ""); local MATCH_COLOR = {r = 0.25, g = 0.9, b = 0.08}; local MISMATCH_COLOR = {r = 0.47, g = 0.47, b = 0.47}; -local BATTLENET_LABELS = { - [BNET_CLIENT_WOW] = "|TInterface\\ChatFrame\\UI-ChatIcon-WOW:16:16:0:-1|t", - [BNET_CLIENT_SC2] = "|TInterface\\ChatFrame\\UI-ChatIcon-SC2:16:16:0:-1|t", - [BNET_CLIENT_D3] = "|TInterface\\ChatFrame\\UI-ChatIcon-D3:16:16:0:-1|t", - [BNET_CLIENT_WTCG] = "|TInterface\\ChatFrame\\UI-ChatIcon-WTCG:16:16:0:-1|t", - [BNET_CLIENT_HEROES] = "|TInterface\\ChatFrame\\UI-ChatIcon-HotS:16:16:0:-1|t", - [BATTLENET_OPTIONS_LABEL] = "|TInterface\\ChatFrame\\UI-ChatIcon-Battlenet:16:16:0:-1|t", -}; +local BATTLENET_LABELS = {}; local UpdateFriendsData; local COUNT_GENERAL = 0; local ONLINE_GENERAL = 0; @@ -71,178 +64,176 @@ local COUNT_TOTAL = 0; local ONLINE_TOTAL = 0; local FRIEND_DATA = { ['General'] = {}, - [BATTLENET_OPTIONS_LABEL] = {}, - [BNET_CLIENT_WOW] = {}, - [BNET_CLIENT_D3] = {}, - [BNET_CLIENT_SC2] = {}, - [BNET_CLIENT_WTCG] = {}, - [BNET_CLIENT_HEROES] = {} }; local UPDATE_REQUIRED = false; do - local AFK_INSERT = "|cffFFFFFF[|r|cffFF0000"..L['AFK'].."|r|cffFFFFFF]|r"; - local DND_INSERT = "|cffFFFFFF[|r|cffFF0000"..L['DND'].."|r|cffFFFFFF]|r"; - - local function _reg(a, b) - if(a.NAME and b.NAME) then - return a.NAME < b.NAME - end - end - - local function _bn(a, b) - if(a.BNET_NAME and b.BNET_NAME) then - if(a.BNET_NAME == b.BNET_NAME and (a.NAME and b.NAME)) then - return a.NAME < b.NAME; - end - return a.BNET_NAME < b.BNET_NAME - end - end - - local function _update() - local generalUpdated, bnetUpdated = false, false; - - if(COUNT_GENERAL and (COUNT_GENERAL > 0)) then - wipe(FRIEND_DATA.General); - - for i = 1, COUNT_GENERAL do - local toonName, level, class, zoneName, isOnline, status, noteText = GetFriendInfo(i) - - if(isOnline) then - if(status) then - if(status:find(AFK)) then - status = AFK_INSERT - elseif(status:find(DND)) then - status = DND_INSERT - end - end - - local classUpdated = false; - - for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do - if class == v then - class = k; - classUpdated = true; - end - end - - if(not classUpdated) then - for k,v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do - if class == v then - class = k; - end - end - end - - FRIEND_DATA.General[#FRIEND_DATA.General + 1] = { - ONLINE = isOnline, - CLIENT = BNET_CLIENT_WOW, - NAME = toonName, - CLASS = class, - LOC = zoneName, - LVL = level, - STATUS = status, - REALM = false, - FACTION = false, - RACE = false, - BNET_ID = false, - BNET_NAME = false, - ID = false, - NOTES = noteText, - }; - - generalUpdated = true; - end - end - end - - if(COUNT_BNET and (COUNT_BNET > 0)) then - wipe(FRIEND_DATA[BNET_CLIENT_WOW]) - wipe(FRIEND_DATA[BNET_CLIENT_D3]) - wipe(FRIEND_DATA[BNET_CLIENT_SC2]) - wipe(FRIEND_DATA[BNET_CLIENT_WTCG]) - wipe(FRIEND_DATA[BNET_CLIENT_HEROES]) - wipe(FRIEND_DATA[BATTLENET_OPTIONS_LABEL]) - - for i = 1, COUNT_BNET do - local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(i) - local hasFocus, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime; - if(toonID) then - hasFocus, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime = BNGetToonInfo(toonID); - else - hasFocus, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime = BNGetToonInfo(presenceID) - end - - if(isOnline and FRIEND_DATA[client]) then - local classUpdated = false; - - for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do - if class == v then - class = k; - classUpdated = true; - end - end - - if(not classUpdated) then - for k,v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do - if class == v then - class = k; - end - end - end - - local status = ""; - if(isAFK) then - status = AFK_INSERT - elseif(isDND) then - status = DND_INSERT - end + local AFK_INSERT = "|cffFFFFFF[|r|cffFF0000"..L['AFK'].."|r|cffFFFFFF]|r"; + local DND_INSERT = "|cffFFFFFF[|r|cffFF0000"..L['DND'].."|r|cffFFFFFF]|r"; + + local function _reg(a, b) + if(a.NAME and b.NAME) then + return a.NAME < b.NAME + end + end + + local function _bn(a, b) + if(a.BNET_NAME and b.BNET_NAME) then + if(a.BNET_NAME == b.BNET_NAME and (a.NAME and b.NAME)) then + return a.NAME < b.NAME; + end + return a.BNET_NAME < b.BNET_NAME + end + end + + local function _update() + local generalUpdated, bnetUpdated = false, false; + + if(COUNT_GENERAL and (COUNT_GENERAL > 0)) then + wipe(FRIEND_DATA.General); + + for i = 1, COUNT_GENERAL do + local toonName, level, class, zoneName, isOnline, status, noteText = GetFriendInfo(i) + + if(isOnline) then + if(status) then + if(status:find(AFK)) then + status = AFK_INSERT + elseif(status:find(DND)) then + status = DND_INSERT + end + end + + local classUpdated = false; + + for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do + if class == v then + class = k; + classUpdated = true; + end + end + + if(not classUpdated) then + for k,v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do + if class == v then + class = k; + end + end + end + + FRIEND_DATA.General[#FRIEND_DATA.General + 1] = { + ONLINE = isOnline, + CLIENT = BNET_CLIENT_WOW, + NAME = toonName, + CLASS = class, + LOC = zoneName, + LVL = level, + STATUS = status, + REALM = false, + FACTION = false, + RACE = false, + BNET_ID = false, + BNET_NAME = false, + ID = false, + NOTES = noteText, + }; + + generalUpdated = true; + end + end + end + + if(COUNT_BNET and (COUNT_BNET > 0)) then + wipe(FRIEND_DATA[BNET_CLIENT_WOW]) + wipe(FRIEND_DATA[BNET_CLIENT_D3]) + wipe(FRIEND_DATA[BNET_CLIENT_SC2]) + wipe(FRIEND_DATA[BNET_CLIENT_WTCG]) + wipe(FRIEND_DATA[BNET_CLIENT_HEROES]) + wipe(FRIEND_DATA[BATTLENET_OPTIONS_LABEL]) + + for i = 1, COUNT_BNET do + local presenceID, presenceName, battleTag, isBattleTagPresence, toonName, toonID, client, isOnline, lastOnline, isAFK, isDND, messageText, noteText, isRIDFriend, messageTime, canSoR = BNGetFriendInfo(i) + local _, hasFocus, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime; + if(toonID) then + hasFocus, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime = BNGetToonInfo(toonID); + else + hasFocus, toonName, client, realmName, realmID, faction, race, class, guild, zoneName, level, gameText, broadcastText, broadcastTime = BNGetToonInfo(presenceID); + end + + if(not client or (client == BNET_CLIENT_APP)) then + client = BATTLENET_OPTIONS_LABEL + end + + if(isOnline and FRIEND_DATA[client]) then + local classUpdated = false; + + for k,v in pairs(LOCALIZED_CLASS_NAMES_MALE) do + if class == v then + class = k; + classUpdated = true; + end + end + + if(not classUpdated) then + for k,v in pairs(LOCALIZED_CLASS_NAMES_FEMALE) do + if class == v then + class = k; + end + end + end + + local status = ""; + if(isAFK) then + status = AFK_INSERT + elseif(isDND) then + status = DND_INSERT + end FRIEND_DATA[client][#FRIEND_DATA[client] + 1] = { - ONLINE = isOnline, - CLIENT = client, - NAME = toonName, - CLASS = class, - LOC = zoneName, - LVL = level, - STATUS = status, - REALM = realmName, - FACTION = faction, - RACE = race, - BNET_ID = presenceID, - BNET_NAME = presenceName, - ID = toonID, - NOTES = noteText, - }; - - bnetUpdated = true; - end + ONLINE = isOnline, + CLIENT = client, + NAME = toonName, + CLASS = class, + LOC = zoneName, + LVL = level, + STATUS = status, + REALM = realmName, + FACTION = faction, + RACE = race, + BNET_ID = presenceID, + BNET_NAME = presenceName, + ID = toonID, + NOTES = noteText, + }; + + bnetUpdated = true; + end + end + end + + if(generalUpdated) then + tsort(FRIEND_DATA.General, _reg); + end + + if(bnetUpdated) then + tsort(FRIEND_DATA[BNET_CLIENT_WOW], _bn) + tsort(FRIEND_DATA[BNET_CLIENT_SC2], _bn) + tsort(FRIEND_DATA[BNET_CLIENT_D3], _bn) + tsort(FRIEND_DATA[BNET_CLIENT_WTCG], _bn) + tsort(FRIEND_DATA[BNET_CLIENT_HEROES], _bn) + tsort(FRIEND_DATA[BATTLENET_OPTIONS_LABEL], _bn) end - end - - if(generalUpdated) then - tsort(FRIEND_DATA.General, _reg); - end - - if(bnetUpdated) then - tsort(FRIEND_DATA[BNET_CLIENT_WOW], _bn) - tsort(FRIEND_DATA[BNET_CLIENT_SC2], _bn) - tsort(FRIEND_DATA[BNET_CLIENT_D3], _bn) - tsort(FRIEND_DATA[BNET_CLIENT_WTCG], _bn) - tsort(FRIEND_DATA[BNET_CLIENT_HEROES], _bn) - tsort(FRIEND_DATA[BATTLENET_OPTIONS_LABEL], _bn) - end - end - - function UpdateFriendsData(updateCache) + end + + function UpdateFriendsData(updateCache) COUNT_GENERAL, ONLINE_GENERAL = GetNumFriends(); COUNT_BNET, ONLINE_BNET = BNGetNumFriends(); COUNT_TOTAL = COUNT_GENERAL + COUNT_BNET; ONLINE_TOTAL = ONLINE_GENERAL + ONLINE_BNET; - if(updateCache) then - _update() - end - end + if(updateCache) then + _update() + end + end end --[[ ########################################################## @@ -463,6 +454,20 @@ Report.OnEnter = function(self) end Report.OnInit = function(self) + BATTLENET_LABELS = { + [BNET_CLIENT_WOW] = "|TInterface\\ChatFrame\\UI-ChatIcon-WOW:16:16:0:-1|t", + [BNET_CLIENT_SC2] = "|TInterface\\ChatFrame\\UI-ChatIcon-SC2:16:16:0:-1|t", + [BNET_CLIENT_D3] = "|TInterface\\ChatFrame\\UI-ChatIcon-D3:16:16:0:-1|t", + [BNET_CLIENT_WTCG] = "|TInterface\\ChatFrame\\UI-ChatIcon-WTCG:16:16:0:-1|t", + [BNET_CLIENT_HEROES] = "|TInterface\\ChatFrame\\UI-ChatIcon-HotS:16:16:0:-1|t", + [BATTLENET_OPTIONS_LABEL] = "|TInterface\\ChatFrame\\UI-ChatIcon-Battlenet:16:16:0:-1|t", + }; + FRIEND_DATA[BATTLENET_OPTIONS_LABEL] = {} + FRIEND_DATA[BNET_CLIENT_WOW] = {} + FRIEND_DATA[BNET_CLIENT_D3] = {} + FRIEND_DATA[BNET_CLIENT_SC2] = {} + FRIEND_DATA[BNET_CLIENT_WTCG] = {} + FRIEND_DATA[BNET_CLIENT_HEROES] = {} UpdateFriendsData(); UPDATE_REQUIRED = false; end diff --git a/SVUI_!Core/system/api.lua b/SVUI_!Core/system/api.lua index fecb498..9320f55 100644 --- a/SVUI_!Core/system/api.lua +++ b/SVUI_!Core/system/api.lua @@ -1957,12 +1957,12 @@ MOD.Concepts["QuestItem"] = function(self, adjustable, frame) self.Methods["Icon"](self, frame, adjustable) local width,height = frame:GetSize() - local fittedWidth = (width - height) + 2 + local fittedWidth = (width - height) + 4 local insetFrame = CreateFrame("Frame", nil, frame.Panel) insetFrame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT") insetFrame:SetWidth(fittedWidth) insetFrame:SetHeight(height) - self.Methods["Frame"](self, insetFrame, false, "Inset") + self.Methods["Frame"](self, insetFrame, false, "Inset", 1, 0, -2) if(icon) then local size = height - 4 diff --git a/SVUI_!Core/system/dock.lua b/SVUI_!Core/system/dock.lua index 1129a7e..dbf2fa8 100644 --- a/SVUI_!Core/system/dock.lua +++ b/SVUI_!Core/system/dock.lua @@ -628,17 +628,15 @@ do end if(highlight:IsMouseOver(50, -50, -50, 50)) then - DRAG_TARGETBAR = self; highlight:SetAlpha(1) local orderList = self.Data.Order; local dividerList = self.Data.Dividers; + local hovering = false; for i = 1, #orderList do local divider = dividerList[i] if(divider) then - if(divider:IsMouseOver(15, -15, -15, 15)) then - if(divider:GetAlpha() > 0) then - DRAG_ORDERINDEX = i - end + if(divider:IsMouseOver(25, 0, -25, 0) and (not hovering)) then + hovering = true; highlight:SetAlpha(0.5) divider:SetAlpha(1) divider:SetWidth(DRAG_BUTTONWIDTH) @@ -656,10 +654,9 @@ do end ToggleDraggingMode = function(enabled) + DRAG_TARGETBAR = nil; + DRAG_ORDERINDEX = nil; if(enabled) then - DRAG_TARGETBAR = nil; - DRAG_ORDERINDEX = nil; - for location, settings in pairs(DOCK_LOCATIONS) do local dock = MOD[location]; if(dock and dock.Bar) then @@ -680,6 +677,7 @@ do end end else + local hovering = false; for location, settings in pairs(DOCK_LOCATIONS) do local dock = MOD[location]; local dockbar = dock.Bar; @@ -688,15 +686,23 @@ do local dockbar = dock.Bar; local orderList = dockbar.Data.Order; local dividerList = dockbar.Data.Dividers; + if(dockbar.Highlight:IsMouseOver(50, -50, -50, 50)) then + DRAG_TARGETBAR = dockbar; + end dockbar.Highlight:Hide() dockbar.Highlight:SetAlpha(0) dockbar:SetScript("OnUpdate", nil) for i = 1, #orderList do - if(dividerList[i]) then - dividerList[i]:SetAlpha(0) - dividerList[i]:SetWidth(1) - dividerList[i]:SetBackdropColor(0, 0.5, 1, 1) - dividerList[i]:SetBackdropBorderColor(0, 1, 1, 1) + local divider = dividerList[i]; + if(divider) then + if(divider:IsMouseOver(25, 0, -25, 0) and (divider:GetAlpha() > 0) and (not hovering)) then + DRAG_ORDERINDEX = i; + hovering = true; + end + divider:SetAlpha(0) + divider:SetWidth(1) + divider:SetBackdropColor(0, 0.5, 1, 1) + divider:SetBackdropBorderColor(0, 1, 1, 1) end end end @@ -794,9 +800,8 @@ local DockBar_SetDefault = function(self, button) if(button) then local name = button:GetName() local lookup = MOD.private.Locations[name]; - if(lookup and (lookup == "Floating")) then - button:SetDocked(false); - button:Show(); + if(button.isFloating or (lookup and (lookup == "Floating"))) then + button.OrderIndex = 0; SaveCurrentPosition(button); if(ShowDockletWindow(button, lookup)) then ActivateDockletButton(button); @@ -1012,6 +1017,7 @@ local DockBar_AddButton = function(self, button, order) end end + button:Show() self.Data.Buttons[name] = button; MOD.private.Disabled[name] = nil; DockBar_CheckOrder(self, name); @@ -1104,21 +1110,14 @@ end local DockButton_OnDragStart = function(self) if(IsShiftKeyDown() and (not InCombatLockdown())) then - GameTooltip:Hide() + GameTooltip:Hide(); + self:SetMovable(true); self:StartMoving(); + local name = self:GetName(); + MOD.private.Disabled[name] = nil; + DRAG_TARGETBAR = nil; DRAG_LASTINDEX = self.OrderIndex; - if(self.CanFloat and (not self.isFloating)) then - self.isFloating = true; - local name = self:GetName(); - MOD.private.Locations[name] = "Floating"; - if(self.FrameLink) then - self.FrameLink:ClearAllPoints(); - self.FrameLink:SetPoint("BOTTOMLEFT", self, "TOPLEFT", -3, 6); - self.FrameLink:SetResizable(true); - self.FrameLink.resize:Show(); - end - end DRAG_BUTTONWIDTH = self:GetWidth() ToggleDraggingMode(true); end @@ -1130,33 +1129,42 @@ local DockButton_OnDragStop = function(self) local name = self:GetName(); local previous = MOD.private.Locations[name]; - DRAG_TARGETBAR = DRAG_TARGETBAR or MOD[previous]; self.OrderIndex = 0; - - if(DRAG_TARGETBAR) then + if((not DRAG_TARGETBAR) and self.CanFloat) then + print(name .. ' Floating') + self:SetDocked(false); + self:Show(); + MOD.private.Locations[name] = "Floating"; + self.isFloating = true; + SaveCurrentPosition(self); + if(ShowDockletWindow(self, "Floating")) then + ActivateDockletButton(self); + end + if(self.FrameLink) then + self.FrameLink:ClearAllPoints(); + self.FrameLink:SetPoint("BOTTOMLEFT", self, "TOPLEFT", -3, 6); + self.FrameLink:SetResizable(true); + self.FrameLink.resize:Show(); + end + UpdateAllLayouts() + else + print(name .. ' Docked') + local target = DRAG_TARGETBAR; + if(not target) then + target = MOD[previous]; + end self:SetMovable(false); self.isFloating = nil; - MOD.private.Disabled[name] = nil; MOD.private.Locations[name] = nil; if(self.FrameLink) then self.FrameLink:SetResizable(false); self.FrameLink.resize:Hide(); end - DRAG_TARGETBAR:Add(self, DRAG_ORDERINDEX); + target:Add(self, DRAG_ORDERINDEX); SV.Events:Trigger("DOCKLET_MOVED", self.LocationKey); - elseif(self.isFloating) then - self:SetDocked(false); - self:Show(); - MOD.private.Locations[name] = "Floating"; - SaveCurrentPosition(self); - if(ShowDockletWindow(self, "Floating")) then - ActivateDockletButton(self); - end end - UpdateAllLayouts() - if(self.FrameLink and self.FrameLink.UpdateBackdrop) then self.FrameLink:UpdateBackdrop() end @@ -1244,12 +1252,19 @@ local DockButton_OnPostClick = function(self, ...) MOD.ButtonSound() end -local DockButton_IsEnabled = function(self) +local DockButton_SetEnabled = function(self, isEnabled) local name = self:GetName() - if(MOD.private.Disabled[name]) then - return false; + if(isEnabled) then + MOD.private.Disabled[name] = nil + elseif(self.Parent) then + MOD.private.Disabled[name] = self.Parent.Data.Location + else + MOD.private.Disabled[name] = "Floating" end - return true; +end + +local DockButton_IsEnabled = function(self) + return (not MOD.private.Disabled[self:GetName()]); end local DockButton_SetDocked = function(self, attach) @@ -1261,15 +1276,17 @@ local DockButton_SetDocked = function(self, attach) if(lastKnownLocation and MOD[lastKnownLocation]) then parent = MOD[lastKnownLocation].Bar; end - if(not parent.Add) then return end MOD.private.Disabled[name] = nil; + if(not parent.Add) then return end parent:Add(self) + --print(name .. ' Added') else + --print('DockButton_SetDocked REMOVE '..name) local lookup = MOD.private.Locations[name]; if(lookup and (lookup == "Floating")) then self.OrderIndex = 0; - self:Hide() - MOD.private.Disabled[name] = currentLocation; + self:Hide(); + MOD.private.Disabled[name] = lookup; if(self.FrameLink) then local frameName = self.FrameLink:GetName() self.FrameLink:FadeOut(0.2, 1, 0, true); @@ -1322,7 +1339,7 @@ local DockButton_ShowDockOptions = function(self) if(frame) then local name = frame:GetName(); - local current = MOD.private.Opacity[name]; + local current = MOD.private.Opacity[name] or 1; tinsert(list, { title = "Backdrop Alpha", divider = true }); tinsert(list, { range = {0,1}, value = current, func = OptionMenu_SliderFunc }); end @@ -1373,7 +1390,8 @@ local DockBar_CreateButton = function(self, displayName, globalName, texture, ti button.LocationKey = globalName; button.SetDocked = DockButton_SetDocked; button.SetClickCallbacks = DockButton_SetClickCallbacks; - button.IsEnabled = DockButton_IsEnabled + button.SetEnabled = DockButton_SetEnabled; + button.IsEnabled = DockButton_IsEnabled; if(tipFunction and type(tipFunction) == "function") then button.GeneralTip = tipFunction @@ -1475,7 +1493,6 @@ for location, settings in pairs(DOCK_LOCATIONS) do MOD[location].Bar.Add = DockBar_AddButton; MOD[location].Bar.Remove = DockBar_RemoveButton; MOD[location].Bar.Create = DockBar_CreateButton; - MOD[location].Bar.Data.Dividers = {}; MOD[location].Bar.Data = { Location = location, Anchor = settings[2], @@ -1484,6 +1501,7 @@ for location, settings in pairs(DOCK_LOCATIONS) do Buttons = {}, Windows = {}, Order = {}, + Dividers = {} }; -- PROXY METHODS @@ -1564,6 +1582,12 @@ local Docklet_SetDocked = function(self, ...) self.Button:SetDocked(...) end +local Docklet_SetEnabled = function(self) + if(not self.Button) then return end + local result = self.Button:SetEnabled() + return result; +end + local Docklet_IsEnabled = function(self) if(not self.Button) then return end local result = self.Button:IsEnabled() @@ -1603,26 +1627,31 @@ function MOD:NewDocklet(location, globalName, readableName, texture, onenter) frame:SetFrameStrata("BACKGROUND"); frame.Parent = newParent; + frame.CanFloat = true; frame.Bar = newParent.Bar; frame.Disable = Docklet_Disable; frame.Enable = Docklet_Enable; frame.SetDocked = Docklet_SetDocked; frame.Relocate = Docklet_Relocate; frame.GetButtonSize = Docklet_ButtonSize; + frame.SetEnabled = Docklet_SetEnabled; frame.IsEnabled = Docklet_IsEnabled; frame.SetClickCallbacks = Docklet_SetClickCallbacks; frame.SetVisibilityCallbacks = Docklet_SetVisibilityCallbacks; frame.backdrop = self.SetThemedBackdrop(frame) frame:UpdateBackdrop() - frame.resize = CreateFrame("Frame", nil, frame.backdrop); + frame.resize = CreateFrame("Button", nil, frame); frame.resize:SetSize(16,16) - frame.resize:SetPoint("BOTTOMRIGHT", frame.backdrop, "BOTTOMRIGHT", 0, 0) + frame.resize:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 0, 0) + frame.resize:SetNormalTexture([[Interface\ChatFrame\UI-ChatIM-SizeGrabber-Up]]) + frame.resize:Hide() newParent.Bar.Data.Windows[globalName] = frame; local buttonName = ("%sButton"):format(globalName) frame.Button = newParent.Bar:Create(readableName, buttonName, texture, onenter, false, frame); + frame.Button.CanFloat = true; DOCK_REGISTRY[globalName] = frame; frame:SetAlpha(0); DOCK_CHECK = true; @@ -1638,6 +1667,19 @@ end BUILD/UPDATE ########################################################## ]]-- +local CornerButton_ShowDockOptions = function(self) + local list = {}; + tinsert(list, { title = "Disabled", divider = true }); + for name,parent in pairs(MOD.private.Disabled) do + local button = _G[name]; + if(button) then + local tipText = button:GetAttribute("tipText") + tinsert(list, { text = tipText, func = function() button:SetDocked(true); end }); + end + end + + SV.Dropdown:Open(self, list, "Docklets"); +end local CornerButton_OnEnter = function(self, ...) MOD:EnterFade() @@ -1648,11 +1690,12 @@ local CornerButton_OnEnter = function(self, ...) GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) GameTooltip:ClearLines() local tipText = self:GetAttribute("tipText") - GameTooltip:AddDoubleLine("[Left-Click]", tipText, 0, 1, 0, 1, 1, 1) + GameTooltip:AddDoubleLine("Left-Click", tipText, 0, 1, 0, 1, 1, 1) local tipExtraText = self:GetAttribute("tipExtraText") - GameTooltip:AddDoubleLine("[Right-Click]", tipExtraText, 0, 1, 0, 1, 1, 1) + GameTooltip:AddDoubleLine("Right-Click", tipExtraText, 0, 1, 0, 1, 1, 1) GameTooltip:AddLine(" ") - GameTooltip:AddDoubleLine("[Alt + Click]", "Reset Dock Buttons", 0, 0.5, 1, 0.5, 1, 0.5) + GameTooltip:AddDoubleLine("|cff0099FFSHIFT|r + Right-Click", "Options", 0, 1, 0, 1, 1, 1) + GameTooltip:AddDoubleLine("|cff0099FFAlt|r + Right-Click", "Reset Dock Buttons", 0, 1, 0, 1, 1, 1) GameTooltip:Show() end @@ -1667,6 +1710,16 @@ local CornerButton_OnLeave = function(self, ...) GameTooltip:Hide() end +local CornerButton_OnClick = function(self, button) + if(button and (button == "RightButton") and IsShiftKeyDown()) then + if((not InCombatLockdown()) and self.ShowDockOptions) then + self:ShowDockOptions(); + end + else + self:ToggleFunc(button) + end +end + function MOD:UpdateLocals() DOCK_WIDTH = SV.db.Dock.dockWidth; DOCK_HEIGHT = SV.db.Dock.dockHeight; @@ -1685,9 +1738,67 @@ end function MOD:ResetAllButtons() wipe(MOD.private.Order) wipe(MOD.private.Locations) + wipe(MOD.private.Dimensions) + wipe(MOD.private.Opacity) + wipe(MOD.private.Disabled) + SV.Events:Trigger("DOCKLETS_RESET", location); ReloadUI() end +local function LoadAllDocklets() + for name, location in pairs(MOD.private.Locations) do + local button = _G[name]; + local disabled = MOD.private.Disabled[name]; + if(button and (location == 'Floating') and (not disabled)) then + button:Show(); + + if(MOD.private.Dimensions) then + local saved = MOD.private.Dimensions[name]; + if(saved and (type(saved) == "string") and (saved ~= 'TBD')) then + local anchor1, anchorParent, anchor2, xPos, yPos, width, height = split("|", saved) + button:ClearAllPoints() + button:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) + + local frame = button.FrameLink; + if(frame) then + frame:ClearAllPoints(); + frame:SetPoint("BOTTOMLEFT", button, "TOPLEFT", -3, 6); + if((not width) or (not height)) then + width, height = frame:GetSize() + end + frame:SetSize(width, height) + if(frame.UpdateBackdrop) then + frame:UpdateBackdrop() + end + end + end + end + + if(ShowDockletWindow(button, location)) then + ActivateDockletButton(button); + end + elseif(button) then + button:StopMovingOrSizing(); + button:SetMovable(false) + if(disabled) then + button:Hide(); + local frame = button.FrameLink; + if(frame) then + frame:FadeOut(0.2, 1, 0, true); + end + end + end + end + + for location, settings in pairs(DOCK_LOCATIONS) do + local dock = MOD[location]; + DockBar_SetDefault(dock.Bar); + DockBar_UpdateOrder(dock.Bar); + end + + MOD:UpdateDockBackdrops() +end + function MOD:Refresh() local buttonsize = SV.db.Dock.buttonSize; local spacing = SV.db.Dock.buttonSpacing; @@ -1697,16 +1808,16 @@ function MOD:Refresh() local dock = self[location]; dock.Bar:SetSize(width, buttonsize) - dock.Bar.ToolBar:SetHeight(buttonsize) - dock:SetSize(width, height) - dock.Alert:SetSize(width, 1) - dock.Window:SetSize(width, height) + dock.Bar.ToolBar:SetHeight(buttonsize) + dock:SetSize(width, height) + dock.Alert:SetSize(width, 1) + dock.Window:SetSize(width, height) - if(dock.Bar.Button) then - dock.Bar.Button:SetSize(buttonsize, buttonsize) - end + if(dock.Bar.Button) then + dock.Bar.Button:SetSize(buttonsize, buttonsize) + end - dock.Bar:Update() + dock.Bar:Update() end local centerWidth = SV.db.Dock.dockCenterWidth; @@ -1719,12 +1830,13 @@ function MOD:Refresh() ScreenBorderVisibility(); self:UpdateDockBackdrops(); - self:UpdateProfessionTools(); self:UpdateMiscTools(); self:UpdateGarrisonTool(); self:UpdateRaidLeader(); + LoadAllDocklets() + SV.Events:Trigger("DOCKS_UPDATED"); end @@ -1855,12 +1967,14 @@ function MOD:Load() end dock.Bar.Button:SetScript("OnEnter", CornerButton_OnEnter) dock.Bar.Button:SetScript("OnLeave", CornerButton_OnLeave) + dock.Bar.Button.ShowDockOptions = CornerButton_ShowDockOptions if(location == "BottomLeft") then - dock.Bar.Button:SetScript("OnClick", ToggleSuperDockLeft) + dock.Bar.Button.ToggleFunc = ToggleSuperDockLeft; else - dock.Bar.Button:SetScript("OnClick", ToggleSuperDockRight) + dock.Bar.Button.ToggleFunc = ToggleSuperDockRight; end + dock.Bar.Button:SetScript("OnClick", CornerButton_OnClick) else dock.Bar.ToolBar:SetSize(1, buttonsize) dock.Bar.ToolBar:SetPoint(barAnchor, dock.Bar, barAnchor, 0, 0) @@ -1924,48 +2038,4 @@ function MOD:Load() self:LoadBreakStuff(); end -local function LoadAllDocklets() - for name, location in pairs(MOD.private.Locations) do - local button = _G[name]; - local disabled = MOD.private.Disabled[name]; - if(button and (location == 'Floating') and (not disabled)) then - button:Show(); - - if(MOD.private.Dimensions) then - local saved = MOD.private.Dimensions[name]; - if(saved and (type(saved) == "string") and (saved ~= 'TBD')) then - local anchor1, anchorParent, anchor2, xPos, yPos, width, height = split("|", saved) - button:ClearAllPoints() - button:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) - - local frame = button.FrameLink; - if(frame) then - frame:ClearAllPoints(); - frame:SetPoint("BOTTOMLEFT", button, "TOPLEFT", -3, 6); - if((not width) or (not height)) then - width, height = frame:GetSize() - end - frame:SetSize(width, height) - if(frame.UpdateBackdrop) then - frame:UpdateBackdrop() - end - end - end - end - - if(ShowDockletWindow(button, location)) then - ActivateDockletButton(button); - end - end - end - - for location, settings in pairs(DOCK_LOCATIONS) do - local dock = MOD[location]; - DockBar_SetDefault(dock.Bar); - DockBar_UpdateOrder(dock.Bar); - end - - MOD:UpdateDockBackdrops() -end - SV:NewScript(LoadAllDocklets) diff --git a/SVUI_!Core/system/funstuff.lua b/SVUI_!Core/system/funstuff.lua index ae2f932..6514de3 100644 --- a/SVUI_!Core/system/funstuff.lua +++ b/SVUI_!Core/system/funstuff.lua @@ -197,11 +197,12 @@ function SV.Comix:LaunchPopup() local coords, step1_x, step1_y, step2_x, step2_y, size, offsets; local rng = random(0, 32); - + local key = random(1, 16); + coords = COMIX_DATA[1][key]; + if(not coords) then return end if((rng > 30) and (SV.db.FunStuff.comix == '1')) then if(rng == 31) then - coords = COMIX_DATA[1][pKey]; - offsets = COMIX_DATA[2][pKey] + offsets = COMIX_DATA[2][key] self.Premium.tex:SetTexCoord(coords[1],coords[2],coords[3],coords[4]) self.Premium.bg.tex:SetTexCoord(coords[1],coords[2],coords[3],coords[4]) self.Premium.anim[1]:SetOffset(offsets[1],offsets[2]) @@ -219,8 +220,6 @@ function SV.Comix:LaunchPopup() PlaySoundFile([[Interface\AddOns\SVUI_!Core\assets\sounds\toasty.mp3]]) end elseif(rng < 8) then - local key = rng - 16; - coords = COMIX_DATA[1][key]; step1_x = random(-150, 150); if(step1_x > -20 and step1_x < 20) then step1_x = step1_x * 3 end step1_y = random(50, 150); @@ -232,7 +231,6 @@ function SV.Comix:LaunchPopup() self.Deluxe.anim[3]:SetOffset(0,0); self.Deluxe.anim:Play(); elseif(rng < 16) then - coords = COMIX_DATA[1][rng]; step1_x = random(-100, 100); step1_y = random(-50, 1); size = random(96,128); @@ -567,13 +565,14 @@ local function InitializeFunStuff() --[[ GAME MENU ]]-- local gamemenu = SV.GameMenu; - gamemenu:SetFrameLevel(0) + gamemenu:SetFrameLevel(999) gamemenu:SetAllPoints(SV.Screen) gamemenu.ModelLeft:SetUnit("player") gamemenu.ModelLeft:SetRotation(1) gamemenu.ModelLeft:SetPortraitZoom(0.05) gamemenu.ModelLeft:SetPosition(0,0,-0.25) + gamemenu.ModelLeft:SetFrameLevel(999) if(SV.db.FunStuff.gamemenu == '1') then gamemenu.ModelRight:SetDisplayInfo(49084) @@ -588,6 +587,7 @@ local function InitializeFunStuff() gamemenu.ModelRight:SetFacing(6) gamemenu.ModelRight:SetPosition(0,0,-0.3) end + gamemenu.ModelRight:SetFrameLevel(999) gamemenu:SetScript("OnShow", GameMenu_Activate) end diff --git a/SVUI_!Core/system/gear.lua b/SVUI_!Core/system/gear.lua index edb43b8..0592dcc 100644 --- a/SVUI_!Core/system/gear.lua +++ b/SVUI_!Core/system/gear.lua @@ -501,6 +501,7 @@ local function InitializeGearInfo() ONLY_DAMAGED = SV.db.Gear.durability.onlydamaged MAX_LEVEL, AVG_LEVEL = GetAverageItemLevel() + GearHandler:RegisterEvent("PLAYER_ENTERING_WORLD") GearHandler:RegisterEvent("UPDATE_INVENTORY_DURABILITY") GearHandler:RegisterEvent("PLAYER_EQUIPMENT_CHANGED") GearHandler:RegisterEvent("SOCKET_INFO_UPDATE") diff --git a/SVUI_!Core/system/overrides.lua b/SVUI_!Core/system/overrides.lua index a295a4f..6873762 100644 --- a/SVUI_!Core/system/overrides.lua +++ b/SVUI_!Core/system/overrides.lua @@ -550,9 +550,9 @@ CORE FUNCTIONS ]]-- local function AutoGreed(rollID, quality, DE, BoP) if(not AUTOROLL_ENABLED) then return end - if(AUTOROLL_LEVEL and (UnitLevel('player') < MAX_PLAYER_LEVEL)) then - return - end + -- if(AUTOROLL_LEVEL and (UnitLevel('player') < MAX_PLAYER_LEVEL)) then + -- return + -- end if(quality <= AUTOROLL_QUALITY) then if(DE and AUTOROLL_DE) then if(not (BoP and (not AUTOROLL_SOULBOUND))) then diff --git a/SVUI_!Core/xml/widgets.xml b/SVUI_!Core/xml/widgets.xml index b3b070a..9fd2c4e 100644 --- a/SVUI_!Core/xml/widgets.xml +++ b/SVUI_!Core/xml/widgets.xml @@ -444,14 +444,14 @@ </Layer> </Layers> <Frames> - <PlayerModel name="$parentModelLeft" parentKey="ModelLeft" frameStrata="BACKGROUND"> + <PlayerModel name="$parentModelLeft" parentKey="ModelLeft" frameStrata="HIGH"> <Size y="1"/> <Anchors> <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="-250" y="-300" /> <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM" x="0" y="300" /> </Anchors> </PlayerModel> - <PlayerModel name="$parentModelRight" parentKey="ModelRight" frameStrata="BACKGROUND"> + <PlayerModel name="$parentModelRight" parentKey="ModelRight" frameStrata="HIGH"> <Size y="1"/> <Anchors> <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="250" y="-300" /> diff --git a/SVUI_!Options/SVUI_!Options.toc b/SVUI_!Options/SVUI_!Options.toc index b5eb944..416f9f2 100644 --- a/SVUI_!Options/SVUI_!Options.toc +++ b/SVUI_!Options/SVUI_!Options.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cff00FF00!Options|r ## Notes: SVUI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI_!Core diff --git a/SVUI_ActionBars/SVUI_ActionBars.toc b/SVUI_ActionBars/SVUI_ActionBars.toc index 5c6c2f8..77fb7a1 100644 --- a/SVUI_ActionBars/SVUI_ActionBars.toc +++ b/SVUI_ActionBars/SVUI_ActionBars.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Action Bars|r ## Notes: Action Bar Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0, LibActionButton-1.0 diff --git a/SVUI_ActionBars/components/zone.lua b/SVUI_ActionBars/components/zone.lua index 01f021a..30b4866 100644 --- a/SVUI_ActionBars/components/zone.lua +++ b/SVUI_ActionBars/components/zone.lua @@ -191,7 +191,7 @@ local SetButtonSpell = function(self, spellID, spellName, texture) if(key) then HotKey:SetText(GetBindingText(key, 1)) HotKey:Show() - elseif(SpellHasRange(self.spellName)) then + elseif(self.spellName and SpellHasRange(self.spellName)) then HotKey:SetText(RANGE_INDICATOR) HotKey:Show() else diff --git a/SVUI_Auras/SVUI_Auras.toc b/SVUI_Auras/SVUI_Auras.toc index 77234f8..29b3201 100644 --- a/SVUI_Auras/SVUI_Auras.toc +++ b/SVUI_Auras/SVUI_Auras.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Auras|r ## Notes: Aura Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_Chat/Loader.lua b/SVUI_Chat/Loader.lua index a675482..01af1da 100644 --- a/SVUI_Chat/Loader.lua +++ b/SVUI_Chat/Loader.lua @@ -127,8 +127,27 @@ function MOD:LoadOptions() name = L["Abbreviation"], desc = "Shortened channel names", }, - timeStampFormat = { + hideRealms = { order = 7, + type = "toggle", + name = L['Player Realms'], + desc = L['Show/hide the players realm next to their name.'], + }, + bubbles = { + order = 8, + type = "toggle", + name = L['Chat Bubbles'], + desc = L['Style the blizzard chat bubbles.'], + get = function(a)return SV.db[Schema][a[#a]] end, + set = function(a,b) MOD:ChangeDBVar(b,a[#a]);SV:StaticPopup_Show("RL_CLIENT")end + }, + spacer1 = { + order = 9, + type = "description", + name = "" + }, + timeStampFormat = { + order = 10, type = "select", name = TIMESTAMPS_LABEL, desc = OPTION_TOOLTIP_TIMESTAMPS, @@ -143,7 +162,7 @@ function MOD:LoadOptions() } }, psst = { - order = 8, + order = 11, type = "select", dialogControl = "LSM30_Sound", name = L["Whisper Alert"], @@ -152,12 +171,12 @@ function MOD:LoadOptions() set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end }, spacer2 = { - order = 9, + order = 12, type = "description", name = "" }, throttleInterval = { - order = 10, + order = 13, type = "range", name = L["Spam Interval"], desc = L["Prevent the same messages from displaying in chat more than once within this set amount of seconds, set to zero to disable."], @@ -167,14 +186,6 @@ function MOD:LoadOptions() width = "full", set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end }, - bubbles = { - order = 11, - type = "toggle", - name = L['Chat Bubbles'], - desc = L['Style the blizzard chat bubbles.'], - get = function(a)return SV.db[Schema][a[#a]] end, - set = function(a,b) MOD:ChangeDBVar(b,a[#a]);SV:StaticPopup_Show("RL_CLIENT")end - }, } }, } diff --git a/SVUI_Chat/SVUI_Chat.lua b/SVUI_Chat/SVUI_Chat.lua index 6be6478..2dbfe2f 100644 --- a/SVUI_Chat/SVUI_Chat.lua +++ b/SVUI_Chat/SVUI_Chat.lua @@ -121,10 +121,10 @@ local CHAT_FLAG_AFK = "[AFK] "; local CHAT_FLAG_DND = "[DND] "; local CHAT_FLAG_GM = "[GM] "; -local CHANNEL_LINK = "|Hchannel:%1$s|h%d|| |h" -local CHANNEL_PATTERN = "|Hchannel:(.-)|h%[(%d+)%.%s?([^:%-%]]+)%s?[:%-]?%s?[^|%]]*%]|h%s?" -local CHANNEL_PATTERN_PLUS = CHANNEL_PATTERN .. ".+" -local CHANNEL_STRINGS = { +local CHANNEL_LINK = "|Hchannel:%1$s|h%d:|h" +local CHANNEL_PATTERN = "|Hchannel:(.-)|h%[(%d+)%.%s?([^:%-%]]+)%s?[:%-]?%s?[^|%]]*%]|h%s?" +local CHANNEL_PATTERN_PLUS = CHANNEL_PATTERN .. ".+" +local CHANNEL_STRINGS = { [L["Conversation"]] = L["S_Conversation"], [L["General"]] = L["S_General"], [L["LocalDefense"]] = L["S_LocalDefense"], @@ -135,6 +135,8 @@ local CHANNEL_STRINGS = { local WHISPER_SOUND = [[Interface\AddOns\SVUI_!Core\assets\sounds\whisper.mp3]]; +local GENERAL_LINK_PATTERN = "[^%:]+"; +local GENERAL_REALM_PATTERN = "%-[^|]+"; local PLAYER_PATTERN = "|Hplayer:(.-)|h%[(.-)%]|h"; local PLAYER_LINK = "|Hplayer:%s|h%s|h" local PLAYER_BN_LINK = "|HBNplayer:%s|h%s%s|h" @@ -308,27 +310,39 @@ do function AddModifiedMessage(self, message, ...) internalTest = false; if type(message) == "string" then - if(message:find("%pTInterface%p+") or message:find("%pTINTERFACE%p+") or message:find("%pHshare%p+") or message:find("%pHSHARE%p+")) then + if(message:find("%pHshare%p+") or message:find("%pHSHARE%p+")) then internalTest = true end + --print(message) + if((not internalTest) and CHAT_ABBREV) then local channelData, channelID, channelName = message:match(CHANNEL_PATTERN_PLUS) if(channelData) then local shortName = CHANNEL_STRINGS[channelName] or CHANNEL_STRINGS[channelName:lower()] or channelName:sub(1, 2); message = message:gsub(CHANNEL_PATTERN, CHANNEL_LINK:format(channelData, channelID, shortName)) end + local playerData, playerName = message:match(PLAYER_PATTERN) - if(channelID) then - message = message:gsub("(|Hchannel:.-|h): ", "%1 ", 1) - elseif(playerData) then - if(playerName:match("|cff") and HIDE_REALM) then - playerName = playerName:gsub("%-[^|]+", "") - message = message:gsub(PLAYER_PATTERN, PLAYER_LINK:format(playerData, playerName)) + + if(playerData) then + if(HIDE_REALM) then + if(playerName:match("|cff")) then + playerName = playerName:gsub(GENERAL_REALM_PATTERN, "") + message = message:gsub(PLAYER_PATTERN, PLAYER_LINK:format(playerData, playerName)) + else + playerName = playerName:match("[^%-]+") + message = message:gsub(PLAYER_PATTERN, PLAYER_LINK:format(playerData, playerName .. " ")) + end else + local parsedName = playerData:match(GENERAL_LINK_PATTERN) + local parsedRealm = parsedName:match(GENERAL_REALM_PATTERN) playerName = playerName:match("[^%-]+") - message = message:gsub(PLAYER_PATTERN, PLAYER_LINK:format(playerData, playerName .. " ")) + local strName = "[" .. playerName .. "]" + message = message:gsub(PLAYER_PATTERN, PLAYER_LINK:format(playerData, strName)) end + elseif(channelID) then + message = message:gsub("(|Hchannel:.-|h): ", "%1 ", 1) end local bnData, bnName, bnID, bnExtra = message:match(BNPLAYER_PATTERN) @@ -345,6 +359,10 @@ do end end + if(message:find("%pTInterface%p+") or message:find("%pTINTERFACE%p+")) then + internalTest = true + end + if not internalTest then message = message:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?:%d%d?%d?%d?%d?)(%s?)", _parse) end if not internalTest then message = message:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?)(%s?)", _parse) end if not internalTest then message = message:gsub("(%s?)([%w_-]+%.?[%w_-]+%.[%w_-]+:%d%d%d?%d?%d?)(%s?)", _parse) end @@ -668,9 +686,11 @@ do end local ChatDock_LeftClickCallback = function(self,button) - self = self.link - local chatFrame = _G[("ChatFrame%d"):format(self:GetID())]; - FCF_Tab_OnClick(self,button); + local chatTab = self.link + local chatFrame = _G[("ChatFrame%d"):format(chatTab:GetID())]; + if(not self.isFloating) then + FCF_Tab_OnClick(chatTab, button); + end ScrollIndicator:ClearAllPoints() ScrollIndicator:SetPoint("BOTTOMRIGHT", chatFrame, "BOTTOMRIGHT", 6, 0) if(chatFrame:AtBottom() and ScrollIndicator:IsShown()) then @@ -703,7 +723,7 @@ do ------------------------------------------- --chat:SetStyle("Frame", "Transparent", true, 1, 3, 6); --chat.Panel:Hide(); - chat.Dock = SV.Dock:NewDocklet("BottomLeft", format("SVUI_ChatFrameDock%d", chatID), chatName, MOD.media.dockIcon, ChatDockTab_OnEnter); + chat.Dock = SV.Dock:NewDocklet("BottomLeft", format("SVUI_ChatFrameDock%d", chatID), "Chat Frame "..chatID, MOD.media.dockIcon, ChatDockTab_OnEnter); chat.Dock.Owner = chat; local ChatDock_ExtendedOptions; if(chatID == 1) then @@ -777,6 +797,7 @@ do tabText:InsetPoints(tab) tabText:SetJustifyH("CENTER") tabText:SetJustifyV("MIDDLE") + tabText:SetAlpha(1) NewHook(tabText, "SetTextColor", _hook_TabTextColor) tabText:Show() tab.text = tabText @@ -942,10 +963,23 @@ do end local CHAT_WIDTH, CHAT_HEIGHT = chat.Dock:GetSize(); - - chat.isDocked = nil; - chat.isUninteractable = true; - SetChatWindowLocked(id, false); + --FCF_SetLocked(chat, true); + chat:SetBackdrop({ + bgFile = [[Interface\AddOns\SVUI_!Core\assets\textures\EMPTY]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\AddOns\SVUI_!Core\assets\textures\EMPTY]], + edgeSize = 0, + insets = + { + left = 0, + right = 0, + top = 0, + bottom = 0, + }, + }) + chat:SetBackdropColor(0,0,0,0); + chat:SetBackdropBorderColor(0,0,0,0); chat:ClearAllPoints(); chat:SetPoint("CENTER", chat.Dock, "CENTER", 0, 0); @@ -953,10 +987,7 @@ do FCF_SavePositionAndDimensions(chat) - tab.Holder.CanFloat = true; - if(not tab.Holder.isFloating) then - chat:SetBackdropColor(0,0,0,0); - end + --tab.Holder.CanFloat = true; --tabText:Hide() if(tab.CopyButton and (GetMouseFocus() ~= tab.CopyButton)) then tab.CopyButton:SetAlpha(0) @@ -979,28 +1010,33 @@ do tab:HookScript('OnLeave', _hook_TabOnLeave) chat.hookedHyperLinks = true end - chat.isDockable = chat.Dock:IsEnabled() - chat.Dock.Button:SetDocked(chat.isDockable) + + chat.isDocked = nil; + chat.isUninteractable = true; + FCF_SetLocked(chat, true); + chat.oldAlpha = 0; + FCF_FadeInChatFrame(chat); + local dockingKey = chat.Dock:GetName() + chat.Dock.Button:SetDocked(MOD.private.activeTabs[dockingKey]) end refreshLocked = true end end -local function OpenNewSVUIChatFrame(name) +local function OpenNewSVUIChatFrame(newname) local chatFrame, chatTab; - - for i=1, NUM_CHAT_WINDOWS do + --print(name) + for i,name in pairs(CHAT_FRAMES) do local _, _, _, _, _, _, shown = FCF_GetChatWindowInfo(i); - chatFrame = _G["ChatFrame"..i]; - chatTab = _G["ChatFrame"..i.."Tab"]; - if(not chatFrame.Dock:IsEnabled()) then - if((not name) or (name == "")) then - name = format(CHAT_NAME_TEMPLATE, i); + chatFrame = _G[name]; + chatTab = _G[name.."Tab"]; + local key = format("SVUI_ChatFrameDock%d", i) + if((not MOD.private.activeTabs[key]) or (not chatTab:IsShown())) then + if((not newname) or (newname == "")) then + newname = format(CHAT_NAME_TEMPLATE, i); end - - -- initialize the frame - FCF_SetWindowName(chatFrame, name); - SetChatWindowLocked(i, false); + FCF_SetWindowName(chatFrame, newname); + FCF_SetLocked(chatFrame, true); -- clear stale messages chatFrame:Clear(); @@ -1029,16 +1065,20 @@ local function OpenNewSVUIChatFrame(name) SetChatWindowShown(i, true); -- Dock the frame by default - --FCF_DockFrame(chatFrame, (#FCFDock_GetChatFrames(GENERAL_CHAT_DOCK)+1), true); - --FCF_FadeInChatFrame(FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK)); + FCF_DockFrame(chatFrame, (#FCFDock_GetChatFrames(GENERAL_CHAT_DOCK)+1), true); + FCF_FadeInChatFrame(FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK)); - chatFrame.isDockable = true; chatFrame.isDocked = nil; chatFrame.isUninteractable = true; FCF_CopyChatSettings(chatFrame, DEFAULT_CHAT_FRAME); + chatFrame.Dock:UpdateBackdrop() + MOD.private.activeTabs[key] = true + -- print('OpenNewSVUIChatFrame '..newname) chatFrame.Dock:SetDocked(true) + MOD.RefreshChatFrames() + return; end end end @@ -1047,13 +1087,18 @@ function MOD:CloseChatWindow() local chatFrame = _G["ChatFrame" .. CURRENT_CHAT_FRAME_ID] if(chatFrame) then if(chatFrame.Dock) then + -- print('CloseChatWindow '..chatFrame:GetName()) + local key = format("SVUI_ChatFrameDock%d", chatFrame:GetID()) chatFrame.Dock:SetDocked(false) + MOD.private.activeTabs[key] = nil; end FCF_Close(chatFrame) end end function MOD:ResetChatWindows() + wipe(MOD.private.activeTabs); + for k,v in pairs(SV.Dock.private.Disabled) do if k:find("ChatFrame") then SV.Dock.private.Disabled[k] = nil @@ -1063,34 +1108,41 @@ function MOD:ResetChatWindows() for i=1, NUM_CHAT_WINDOWS do local chatFrame = _G["ChatFrame"..i]; if(chatFrame) then - chatFrame.isUninteractable = false; + chatFrame.isUninteractable = true; chatFrame:SetMovable(true); end end FCF_ResetChatWindows() - --FCF_SetLocked(ChatFrame1, true) + FCF_SetLocked(ChatFrame1, true) FCF_SetWindowName(ChatFrame1, GENERAL) if(ChatFrame1.Dock) then + ChatFrame1.Dock:UpdateBackdrop() ChatFrame1.Dock:SetDocked(true) end + MOD.private.activeTabs['SVUI_ChatFrameDock1'] = true - --FCF_SetLocked(ChatFrame2, true) + FCF_SetLocked(ChatFrame2, true) FCF_SetWindowName(ChatFrame2, GUILD_EVENT_LOG) if(ChatFrame2.Dock) then + ChatFrame2.Dock:UpdateBackdrop() ChatFrame2.Dock:SetDocked(true) end + MOD.private.activeTabs['SVUI_ChatFrameDock2'] = true OpenNewSVUIChatFrame(LOOT) - --FCF_SetLocked(ChatFrame3, true) + FCF_SetLocked(ChatFrame3, true) FCF_SetWindowName(ChatFrame3, LOOT) if(ChatFrame3.Dock) then + ChatFrame3.Dock:UpdateBackdrop() ChatFrame3.Dock:SetDocked(true) end + MOD.private.activeTabs['SVUI_ChatFrameDock3'] = true for i=4, NUM_CHAT_WINDOWS do local chatFrame = _G["ChatFrame"..i]; if(chatFrame and chatFrame.Dock) then + chatFrame.Dock:UpdateBackdrop() chatFrame.Dock:SetDocked(false) end end @@ -1409,10 +1461,7 @@ do end local _hook_FCF_Close = function(self) - if(not self) then - self = FCF_GetCurrentChatFrame(); - end - if(not self.Dock) then return end + if((not self) or (not self.Dock)) then return end self.Dock:SetDocked(false) end @@ -1422,21 +1471,41 @@ do end end + local _hook_FCF_OpenTemporaryWindow = function(chatType, chatTarget, sourceChatFrame, selectWindow) + local chatFrame, chatID; + for id, chatFrameName in pairs(CHAT_FRAMES) do + local frame = _G[chatFrameName]; + if ( frame.isTemporary ) then + chatFrame = frame; + chatID = id; + local key = format("SVUI_ChatFrameDock%d", chatID) + MOD.private.activeTabs[key] = true + break; + end + end + + chatFrame.oldAlpha = 0; + chatFrame.Dock:UpdateBackdrop(); + chatFrame.Dock:SetDocked(true); + FCF_DockFrame(chatFrame, (#FCFDock_GetChatFrames(GENERAL_CHAT_DOCK)+1), true); + --print(chatFrame:GetName()) + end + function SetAllChatHooks() NewHook('FCF_StartAlertFlash', _hook_FCFStartAlertFlash) NewHook('FCF_StopAlertFlash', _hook_FCFStopAlertFlash) - NewHook('FCF_OpenNewWindow', MOD.RefreshChatFrames) + NewHook('FCF_OpenNewWindow', OpenNewSVUIChatFrame) NewHook('FCF_UnDockFrame', MOD.RefreshChatFrames) NewHook('FCF_DockFrame', MOD.RefreshChatFrames) - NewHook('FCF_OpenTemporaryWindow', MOD.RefreshChatFrames) + NewHook('FCF_OpenTemporaryWindow', _hook_FCF_OpenTemporaryWindow) NewHook('ChatEdit_OnEnterPressed', _hook_ChatEditOnEnterKey) NewHook('FCF_SetChatWindowFontSize', _hook_ChatFontUpdate) NewHook(GeneralDockManager, 'SetPoint', _hook_GDMFrameSetPoint) NewHook(GeneralDockManagerScrollFrame, 'SetPoint', _hook_GDMScrollSetPoint) --NewHook("FCF_SetWindowColor", _hook_FCF_SetWindowColor) - --NewHook("FCF_SetWindowAlpha", _hook_FCF_SetWindowAlpha) + --NewHook("FCF_SetWindowAlpha", OpenNewSVUIChatFrame) - --NewHook("FCF_Close", _hook_FCF_Close) + NewHook("FCF_Close", _hook_FCF_Close) NewHook("ChatEdit_UpdateHeader", _hook_OnUpdateHeader) end end @@ -1522,6 +1591,7 @@ end function MOD:Load() self.private.history = self.private.history or {}; + self.private.activeTabs = self.private.activeTabs or {}; self.ChatHistory = self.private.history; local baseDock = SV.Dock.BottomLeft; @@ -1552,12 +1622,11 @@ function MOD:Load() self:UpdateLocals() for i,name in pairs(CHAT_FRAMES) do - local thisChatFrame = _G[name]; - local usable = thisChatFrame.isDocked or false; - thisChatFrame.isDockable = usable; - thisChatFrame.isDocked = nil; - thisChatFrame.isUninteractable = true; - FCF_SetLocked(thisChatFrame, false); + _G[name].oldAlpha = 0; + local key = format("SVUI_ChatFrameDock%d", i) + if((not self.private.activeTabs[key]) and (i < 4)) then + self.private.activeTabs[key] = true + end end self:RefreshChatFrames(true) @@ -1645,6 +1714,7 @@ function MOD:Load() SV.Events:On("DOCK_FADE_IN", DockFadeInChat, true); SV.Events:On("DOCK_FADE_OUT", DockFadeOutChat, true); SV.Events:On("DOCK_EXPANDED", ExpandChatDock, true); + SV.Events:On("DOCKLETS_RESET", MOD.ResetChatWindows); SV.SystemAlert["NEW_CHAT_DOCK"] = { text = NAME_CHAT_WINDOW, diff --git a/SVUI_Chat/SVUI_Chat.toc b/SVUI_Chat/SVUI_Chat.toc index 6248583..5063cc2 100644 --- a/SVUI_Chat/SVUI_Chat.toc +++ b/SVUI_Chat/SVUI_Chat.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Chat|r ## Notes: Chat Plugin for [|cff9911FFSVUI|r]. ## SavedVariablesPerCharacter: SVUI_Private_ChatCache diff --git a/SVUI_CraftOMatic/SVUI_CraftOMatic.toc b/SVUI_CraftOMatic/SVUI_CraftOMatic.toc index acc1b61..54cd294 100644 --- a/SVUI_CraftOMatic/SVUI_CraftOMatic.toc +++ b/SVUI_CraftOMatic/SVUI_CraftOMatic.toc @@ -1,4 +1,4 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch ## Version: 1.0.09 ## Title: |cffFF9900SVUI Plugin: |r|cffFF69B4Craft-O-Matic|r diff --git a/SVUI_Inventory/SVUI_Inventory.toc b/SVUI_Inventory/SVUI_Inventory.toc index 2558039..3c7f122 100644 --- a/SVUI_Inventory/SVUI_Inventory.toc +++ b/SVUI_Inventory/SVUI_Inventory.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Inventory|r ## Notes: Inventory Plugin for [|cff9911FFSVUI|r]. ## SavedVariables: SVUI_LootCache diff --git a/SVUI_Maps/SVUI_Maps.toc b/SVUI_Maps/SVUI_Maps.toc index 788ef4b..64f403e 100644 --- a/SVUI_Maps/SVUI_Maps.toc +++ b/SVUI_Maps/SVUI_Maps.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Maps|r ## Notes: Maps Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_NamePlates/SVUI_NamePlates.lua b/SVUI_NamePlates/SVUI_NamePlates.lua index 92c3440..a6c6617 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.lua +++ b/SVUI_NamePlates/SVUI_NamePlates.lua @@ -197,7 +197,7 @@ local REACTION_COLORING = { -- (5) HOSTILE function(threatLevel) local color,scale; - if((not threatLevel) or (not NPUseThreat)) then + if((not threatLevel) or (not NPUseThreat) or (not InCombatLockdown())) then color = NPReactEnemy scale = NPThreatGS else @@ -1493,7 +1493,7 @@ do SetAuraInstance(destGUID, spellID, (GetTime() + duration), stackCount, sourceGUID, duration, texture) else local auraID = spellID..(tostring(sourceName or "UNKNOWN_CASTER")) - if(auraID and UnitPlateAuras[destGUID][auraID]) then + if(auraID and UnitPlateAuras[destGUID] and UnitPlateAuras[destGUID][auraID]) then UnitPlateAuras[destGUID][auraID] = nil end end diff --git a/SVUI_NamePlates/SVUI_NamePlates.toc b/SVUI_NamePlates/SVUI_NamePlates.toc index 40f329d..5ac6f7d 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.toc +++ b/SVUI_NamePlates/SVUI_NamePlates.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00NamePlates|r ## Notes: NamePlates Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_QuestTracker/SVUI_QuestTracker.toc b/SVUI_QuestTracker/SVUI_QuestTracker.toc index 68ac966..6cc71f8 100644 --- a/SVUI_QuestTracker/SVUI_QuestTracker.toc +++ b/SVUI_QuestTracker/SVUI_QuestTracker.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00QuestTracker|r ## Notes: QuestTracker Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_Skins/SVUI_Skins.toc b/SVUI_Skins/SVUI_Skins.toc index 9353673..577f883 100644 --- a/SVUI_Skins/SVUI_Skins.toc +++ b/SVUI_Skins/SVUI_Skins.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch, Azilroka, Sortokk -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Skins|r ## Notes: SVUI [|cff9911FFSkins System and AddOn Frames|r]. ## SavedVariables: SVUIUI_STYLE_GLOBAL diff --git a/SVUI_Skins/components/blizzard/lfd.lua b/SVUI_Skins/components/blizzard/lfd.lua index d42679b..9621d58 100644 --- a/SVUI_Skins/components/blizzard/lfd.lua +++ b/SVUI_Skins/components/blizzard/lfd.lua @@ -430,6 +430,8 @@ local function LFDFrameStyle() LFGListFrame.CategorySelection.StartGroupButton:SetStyle("Button") LFGListFrame.CategorySelection.FindGroupButton:RemoveTextures() LFGListFrame.CategorySelection.FindGroupButton:SetStyle("Button") + + SV.API:Set("ScrollBar", LFGListSearchPanelScrollFrame) end --[[ ########################################################## diff --git a/SVUI_Tooltip/SVUI_Tooltip.toc b/SVUI_Tooltip/SVUI_Tooltip.toc index 39c0b69..cab9232 100644 --- a/SVUI_Tooltip/SVUI_Tooltip.toc +++ b/SVUI_Tooltip/SVUI_Tooltip.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Tooltip|r ## Notes: Tooltip Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_UnitFrames/Loader.lua b/SVUI_UnitFrames/Loader.lua index 8348457..9c40e93 100644 --- a/SVUI_UnitFrames/Loader.lua +++ b/SVUI_UnitFrames/Loader.lua @@ -1770,6 +1770,15 @@ SV.defaults[Schema] = { ["yOffset"] = 0, ["name_length"] = 3, ["tags"] = "[name:3]", + ["portrait"] = + { + ["enable"] = true, + ["width"] = 45, + ["overlay"] = true, + ["rotation"] = 0, + ["camDistanceScale"] = 1, + ["style"] = "3DOVERLAY", + }, }, ["targetsGroup"] = { diff --git a/SVUI_UnitFrames/SVUI_UnitFrames.toc b/SVUI_UnitFrames/SVUI_UnitFrames.toc index cc2c655..f65bb24 100644 --- a/SVUI_UnitFrames/SVUI_UnitFrames.toc +++ b/SVUI_UnitFrames/SVUI_UnitFrames.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 60200 ## Author: Munglunch -## Version: 1.2.0 +## Version: 1.2.1 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00UnitFrames|r ## Notes: UnitFrames Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_UnitFrames/groups.lua b/SVUI_UnitFrames/groups.lua index 8cc139e..ef47459 100644 --- a/SVUI_UnitFrames/groups.lua +++ b/SVUI_UnitFrames/groups.lua @@ -161,9 +161,10 @@ FRAME HELPERS ########################################################## ]]-- local groupLayoutPostSizeFunc = function(self, width, height) - SV.db.UnitFrames[self.___key].width = width; - SV.db.UnitFrames[self.___key].height = height; - self:Update() + if(not SV.db.UnitFrames[self.___key]) then return end; + SV.db.UnitFrames[self.___key].width = width; + SV.db.UnitFrames[self.___key].height = height; + self:Update() end local DetachSubFrames = function(...) @@ -350,6 +351,7 @@ BuildTemplates["party"] = function(self, unit) self.Health.debug = true if self.isChild then self.originalParent = self:GetParent() + MOD:CreatePortrait(self, true) else self.Power = MOD:CreatePowerBar(self) self.Power.frequentUpdates = false