diff --git a/SVUI_!Core/libs/_SVUI_Lib/Registry.lua b/SVUI_!Core/libs/_SVUI_Lib/Registry.lua index 40c3774..92288d2 100644 --- a/SVUI_!Core/libs/_SVUI_Lib/Registry.lua +++ b/SVUI_!Core/libs/_SVUI_Lib/Registry.lua @@ -1228,7 +1228,7 @@ end function lib:CopyDatabase(key, linked) if((not key) or (not GLOBAL_SV.profiles[key])) then return end - + PRIVATE_SV.SAFEDATA["install_version"] = CoreObject.Version if(not linked) then wipe(GLOBAL_SV.profiles[PROFILE_KEY]) local export = GLOBAL_SV.profiles[key]; @@ -1241,7 +1241,6 @@ function lib:CopyDatabase(key, linked) saved = MEDIA_SV.profiles[THEME_KEY][PROFILE_KEY]; tablecopy(saved, export); end - ReloadUI() else UpdateProfileSources(key) @@ -1251,7 +1250,7 @@ end function lib:CloneDatabase(key) if(not key) then return end - + PRIVATE_SV.SAFEDATA["install_version"] = CoreObject.Version local export, saved if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; export = GLOBAL_SV.profiles[PROFILE_KEY]; diff --git a/SVUI_!Core/setup/installer.lua b/SVUI_!Core/setup/installer.lua index 878e9ea..ff7da30 100644 --- a/SVUI_!Core/setup/installer.lua +++ b/SVUI_!Core/setup/installer.lua @@ -564,9 +564,8 @@ function SV.Setup:EZDefault() SV.db.general.arenadrink = true; SV.db.general.stupidhat = true; - SV.db.Dock.leftDockBackdrop = true; - SV.db.Dock.rightDockBackdrop = true; - SV.db.Dock.dataBackdrop = true; + SV.db.Dock.backdrop = true; + SV.db.Reports.backdrop = true; if(SV.Auras) then SV.db.Auras.hyperBuffsEnabled = true; @@ -615,7 +614,8 @@ function SV.Setup:Minimalist() SV.db.general.arenadrink = false; SV.db.general.stupidhat = false; - SV.db.Dock.dataBackdrop = false; + SV.db.Dock.backdrop = false; + SV.db.Reports.backdrop = false; if(SV.Auras) then SV.db.Auras.hyperBuffsEnabled = false; end @@ -867,9 +867,9 @@ end function SV.Setup:Install(autoLoaded) local mp = SVUILib:CheckMasterProfile(); if(mp) then - SV.SystemAlert["MASTER_PROFILE_PROMPT"].OnAccept = function() SVUILib:CopyDatabase(mp) end + SV.SystemAlert["MASTER_PROFILE_PROMPT"].OnAccept = function() SVUILib:CopyDatabase(mp) end SV.SystemAlert["MASTER_PROFILE_PROMPT"].OnCancel = function() SV.Setup:LoadInstaller(autoLoaded) end - SV:StaticPopup_Show("MASTER_PROFILE_PROMPT") + SV:StaticPopup_Show("MASTER_PROFILE_PROMPT") else SV.Setup:LoadInstaller(autoLoaded) end diff --git a/SVUI_!Core/system/core.lua b/SVUI_!Core/system/core.lua index 6d87abb..8132e2a 100644 --- a/SVUI_!Core/system/core.lua +++ b/SVUI_!Core/system/core.lua @@ -376,7 +376,7 @@ SV.defaults = { ["dockWidth"] = 412, ["dockHeight"] = 224, ["dockOpacity"] = 1, - --BEGIN DEPRECATED + ["backdrop"] = true, ["dockLeftWidth"] = 412, ["dockLeftHeight"] = 224, ["dockRightWidth"] = 412, @@ -385,9 +385,6 @@ SV.defaults = { ["dockTopLeftHeight"] = 224, ["dockTopRightWidth"] = 412, ["dockTopRightHeight"] = 224, - ["leftDockBackdrop"] = true, - ["rightDockBackdrop"] = true, - --END DEPRECATED ["dockCenterWidth"] = defaultCenterWidth, ["dockCenterHeight"] = 20, ["buttonSize"] = 30, diff --git a/SVUI_!Core/system/dock.lua b/SVUI_!Core/system/dock.lua index 90f3041..949553c 100644 --- a/SVUI_!Core/system/dock.lua +++ b/SVUI_!Core/system/dock.lua @@ -76,9 +76,9 @@ local DOCK_LOCATIONS = { is used to refresh these any time a change is made to configs and once when the mod is loaded. ]]-- -local DOCK_WIDTH = 412; -local DOCK_HEIGHT = 224; -local DOCK_ALPHA = 1; +-- local DOCK_WIDTH = 412; +-- local DOCK_HEIGHT = 224; +-- local DOCK_ALPHA = 1; --[[ ########################################################## THEMEABLE ITEMS @@ -328,37 +328,44 @@ local UpdateBackdrop = function(self) local centerX, centerY = self:GetCenter() local screenHeight = GetScreenHeight() local heightTop = screenHeight * 0.75; - if(self.backdrop.forceTop or (centerY and (centerY > heightTop))) then - self.backdrop.underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.8) - self.backdrop.left:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) - self.backdrop.right:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) - self.backdrop.bottom:SetTexture(0, 0, 0, 0) - self.backdrop.bottom:SetAlpha(0) - self.backdrop.bottom:SetHeight(1) - self.backdrop.top:SetTexture(0, 0, 0, 1) - self.backdrop.top:SetAlpha(1) - self.backdrop.top:SetHeight(2) + local current = MOD.private.Opacity[self:GetName()]; + + if(SV.db.Dock.backdrop and (not MOD.private.Disabled[self:GetName() .. 'Button'])) then + if(self.backdrop.forceTop or (centerY and (centerY > heightTop))) then + self.backdrop.underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.8) + self.backdrop.left:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) + self.backdrop.right:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) + self.backdrop.bottom:SetTexture(0, 0, 0, 0) + self.backdrop.bottom:SetAlpha(0) + self.backdrop.bottom:SetHeight(1) + self.backdrop.top:SetTexture(0, 0, 0, 1) + self.backdrop.top:SetAlpha(1) + self.backdrop.top:SetHeight(2) + else + self.backdrop.underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0.8, 0, 0, 0, 0) + self.backdrop.left:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) + self.backdrop.right:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) + self.backdrop.bottom:SetTexture(0, 0, 0, 1) + self.backdrop.bottom:SetAlpha(1) + self.backdrop.bottom:SetHeight(2) + self.backdrop.top:SetTexture(0, 0, 0, 0) + self.backdrop.top:SetAlpha(0) + self.backdrop.top:SetHeight(1) + end + self.backdrop:SetAlpha(1); else - self.backdrop.underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0.8, 0, 0, 0, 0) - self.backdrop.left:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) - self.backdrop.right:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) - self.backdrop.bottom:SetTexture(0, 0, 0, 1) - self.backdrop.bottom:SetAlpha(1) - self.backdrop.bottom:SetHeight(2) - self.backdrop.top:SetTexture(0, 0, 0, 0) - self.backdrop.top:SetAlpha(0) - self.backdrop.top:SetHeight(1) + self.backdrop:SetAlpha(0); end - local current = MOD.private.Opacity[self:GetName()]; self:SetAlpha(current or 1); end -function MOD.SetThemedBackdrop(frame) +function MOD.SetThemedBackdrop(frame, forceTop) local frameLevel = frame:GetFrameLevel() local backdrop = CreateFrame("Frame", nil, frame) backdrop:SetAllPoints(frame) backdrop:SetFrameStrata("BACKGROUND") + backdrop.forceTop = forceTop if(frameLevel > 0) then backdrop:SetFrameLevel(frameLevel - 1) @@ -400,9 +407,10 @@ function MOD.SetThemedBackdrop(frame) backdrop.top = top; - frame.UpdateBackdrop = UpdateBackdrop; + frame.backdrop = backdrop - return backdrop + UpdateBackdrop(frame); + frame.UpdateBackdrop = UpdateBackdrop; end function MOD:SetBorderTheme() @@ -1056,7 +1064,7 @@ local DockBar_AddButton = function(self, button, order) local frame = button.FrameLink local frameName = frame:GetName() self.Data.Windows[frameName] = frame; - MOD.private.Locations[frameName] = currentLocation; + MOD.private.Windows[frameName] = currentLocation; frame:Show() frame:ClearAllPoints() frame:SetParent(self.Parent.Window) @@ -1097,7 +1105,7 @@ local DockBar_RemoveButton = function(self, button, isMoving) MOD.private.Disabled[name] = currentLocation; if(button.FrameLink) then local frameName = button.FrameLink:GetName() - MOD.private.Locations[frameName] = nil; + MOD.private.Windows[frameName] = nil; button.FrameLink:FadeOut(0.2, 1, 0, true); self.Data.Windows[frameName] = nil; end @@ -1306,7 +1314,7 @@ local DockButton_SetDocked = function(self, attach) local name = self:GetName() local lastKnownLocation = MOD.private.Disabled[name]; if((not self.Parent) and (not lastKnownLocation)) then return end - local lookup = MOD.private.Locations[name]; + local lookup = MOD.private.Locations[name] or MOD.private.Windows[name]; local parent = self.Parent; if(attach) then if(lastKnownLocation and MOD[lastKnownLocation]) then @@ -1654,11 +1662,12 @@ end function MOD:NewDocklet(location, globalName, readableName, texture, onenter) if(DOCK_REGISTRY[globalName]) then return end; - if(self.private.Locations[globalName]) then - location = self.private.Locations[globalName]; + if(self.private.Windows[globalName]) then + location = self.private.Windows[globalName]; else - self.private.Locations[globalName] = location; + self.private.Windows[globalName] = location; end + self.private.Locations[globalName] = nil; local newParent = self[location]; if(not newParent) then return end @@ -1687,10 +1696,7 @@ function MOD:NewDocklet(location, globalName, readableName, texture, onenter) frame.SetClickCallbacks = Docklet_SetClickCallbacks; frame.SetVisibilityCallbacks = Docklet_SetVisibilityCallbacks; - frame.backdrop = self.SetThemedBackdrop(frame) - if(frame.UpdateBackdrop) then - frame:UpdateBackdrop() - end + self.SetThemedBackdrop(frame) frame.resize = CreateFrame("Button", nil, frame); frame.resize:SetSize(16,16) frame.resize:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 0, 0) @@ -1805,11 +1811,11 @@ local CornerButton2_OnClick = function(self, button) end end -function MOD:UpdateLocals() - DOCK_WIDTH = SV.db.Dock.dockWidth; - DOCK_HEIGHT = SV.db.Dock.dockHeight; - DOCK_ALPHA = SV.db.Dock.dockOpacity; -end +-- function MOD:UpdateLocals() +-- DOCK_WIDTH = SV.db.Dock.dockWidth; +-- DOCK_HEIGHT = SV.db.Dock.dockHeight; +-- DOCK_ALPHA = SV.db.Dock.dockOpacity; +-- end function MOD:UpdateDockBackdrops() if(DOCK_CHECK) then @@ -1818,11 +1824,18 @@ function MOD:UpdateDockBackdrops() MOD.BottomLeft.Alert.backdrop:ClearAllPoints() MOD.BottomLeft.Alert.backdrop:WrapPoints(MOD.BottomLeft.Alert, 4, 4) end + + for name,frame in pairs(DOCK_REGISTRY) do + if(frame.backdrop and frame.UpdateBackdrop) then + frame:UpdateBackdrop() + end + end end function MOD:ResetAllButtons() wipe(MOD.private.Order) wipe(MOD.private.Locations) + wipe(MOD.private.Windows) wipe(MOD.private.Dimensions) wipe(MOD.private.Opacity) wipe(MOD.private.Disabled) @@ -1946,6 +1959,7 @@ function MOD:Load() if(not self.private.Order) then self.private.Order = {} end if(not self.private.Locations) then self.private.Locations = {} end + if(not self.private.Windows) then self.private.Windows = {} end if(not self.private.Dimensions) then self.private.Dimensions = {} end if(not self.private.Opacity) then self.private.Opacity = {} end if(not self.private.Disabled) then self.private.Disabled = {} end diff --git a/SVUI_!Options/SVUI_!Options.lua b/SVUI_!Options/SVUI_!Options.lua index 93dccd2..4d8dd1d 100644 --- a/SVUI_!Options/SVUI_!Options.lua +++ b/SVUI_!Options/SVUI_!Options.lua @@ -146,7 +146,7 @@ local function RefreshProfileOptions() optionGroup.mpEnable = { order = 4, type = "toggle", - name = "Use Master Profile", + name = "Enable Master Profile", desc = L["Toggle the use of a master profile for easy one-click installation on your other characters."], get = function() local mp = SVUILib:CheckMasterProfile() @@ -167,7 +167,7 @@ local function RefreshProfileOptions() end, } optionGroup.masterProfile = { - order = 4, + order = 5, type = "select", name = "Select Master Profile", desc = L["Flag the current profile as a master for easy one-click installation on your other characters."], @@ -180,7 +180,7 @@ local function RefreshProfileOptions() end, } optionGroup.importdesc = { - order = 5, + order = 6, type = "description", name = function() if(SVUILib:CheckDualProfile()) then @@ -192,7 +192,7 @@ local function RefreshProfileOptions() width = "full" } optionGroup.spacer3 = { - order = 6, + order = 7, type = "description", name = "", width = "full", @@ -201,7 +201,7 @@ local function RefreshProfileOptions() name = L["export"], desc = L["export_sub"], type = "input", - order = 7, + order = 8, get = false, set = function(key, value) SVUILib:CloneDatabase(value) SV:SavedPopup() RefreshProfileOptions() end, disabled = function() @@ -213,7 +213,7 @@ local function RefreshProfileOptions() name = L["Copy"], desc = L["Copy from another profile. Further changes from other characters using this profile will not affect this one."], type = "select", - order = 8, + order = 9, get = function() return currentProfile end, set = function(key, value) SV:CopyProfile(value) SV:SavedPopup() RefreshProfileOptions() end, disabled = function() @@ -226,7 +226,7 @@ local function RefreshProfileOptions() name = L["Share"], desc = L["Share an already existing profile. Changes made by any characters using this profile will be shared."], type = "select", - order = 9, + order = 10, get = function() return currentProfile end, set = function(key, value) SV:LinkProfile(value) SV:SavedPopup() RefreshProfileOptions() end, disabled = function() @@ -237,19 +237,19 @@ local function RefreshProfileOptions() width = 'fill', } optionGroup.spacer4 = { - order = 10, + order = 11, type = "description", name = "", width = "full", } optionGroup.spacer5 = { - order = 11, + order = 12, type = "description", name = L["delete_desc"], width = "full", } optionGroup.delete = { - order = 12, + order = 13, type = "select", width = "full", name = L["delete"], @@ -262,19 +262,19 @@ local function RefreshProfileOptions() confirmText = L["delete_confirm"], } optionGroup.spacer6 = { - order = 13, + order = 14, type = "description", name = "", width = "full", } optionGroup.spacer7 = { - order = 14, + order = 15, type = "description", name = L["reset_desc"], width = "full", } optionGroup.reset = { - order = 15, + order = 16, type = "execute", name = function() return L["reset"] .. " " .. " |cffFFFF00" .. currentProfile .. "|r" end, desc = L["reset_sub"], @@ -1389,7 +1389,7 @@ SV.Options.args.Dock = { order = 5, name = SV.Dock.TitleID, args = { - intro = { + intro = { order = 1, type = "description", name = "Configure the various frame docks around the screen" @@ -1421,8 +1421,19 @@ SV.Options.args.Dock = { get = function(j) return SV.db.Dock.topPanel end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); end }, - buttonSize = { + backdrop = { order = 3, + type = 'toggle', + name = L['Use Backdrops'], + desc = L['Display a backdrop behind dock windows.'], + get = function(j)return SV.db.Dock.backdrop end, + set = function(key,value) + SV.Dock:ChangeDBVar(value, key[#key]); + SV.Dock:UpdateDockBackdrops() + end + }, + buttonSize = { + order = 4, type = "range", name = L["Dock Button Size"], desc = L["PANEL_DESC"], @@ -1438,117 +1449,109 @@ SV.Options.args.Dock = { }, }, }, - dataGroup = { - order = 2, + LeftBottomGroup = { + order = 3, type = "group", - name = "Reports (Data Texts)", + name = L["Bottom Left Dock"], guiInline = true, - get = function(key)return SV.db.Reports[key[#key]];end, - set = function(key,value) - SV.Reports:ChangeDBVar(value,key[#key]); - end, args = { - time24 = { + dockLeftHeight = { order = 1, - type = "toggle", - name = L["24-Hour Time"], - desc = L["Toggle 24-hour mode for the time datatext."], - }, - localtime = { - order = 2, - type = "toggle", - name = L["Local Time"], - desc = L["If not set to true then the server time will be displayed instead."] - }, - battleground = { - order = 3, - type = "toggle", - name = L["Battleground Texts"], - desc = L["When inside a battleground display personal scoreboard information on the main datatext bars."] - }, - backdrop = { - order = 4, - name = "Data Backgrounds", - desc = L["Display background textures on docked data texts"], - type = "toggle", - set = function(key, value) SV.Reports:ChangeDBVar(value, key[#key]); SV.Reports:UpdateAllReports() end, - }, - shortGold = { - order = 5, - type = "toggle", - name = L["Shortened Gold Text"], - }, - spacer1 = { - order = 6, - name = "", - type = "description", - width = "full", - }, - dockCenterWidth = { - order = 7, - type = 'range', - name = L['Stat Panel Width'], + type = "range", + name = L["Height"], desc = L["PANEL_DESC"], - min = 400, - max = 1800, + min = 150, + max = 600, step = 1, - width = "full", - get = function()return SV.db.Dock.dockCenterWidth; end, + get = function()return SV.db.Dock.dockLeftHeight;end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); SV.Dock:Refresh() + if(SV.Chat) then + SV.Chat:UpdateLocals() + SV.Chat:RefreshChatFrames(true) + end end, }, - spacer2 = { - order = 8, - name = "", - type = "description", - width = "full", - }, - buttonSize = { - order = 9, + dockLeftWidth = { + order = 2, type = "range", - name = L["Dock Button Size"], + name = L["Width"], desc = L["PANEL_DESC"], - min = 20, - max = 80, + min = 150, + max = 700, step = 1, - width = "full", - get = function()return SV.db.Dock.buttonSize;end, + get = function()return SV.db.Dock.dockLeftWidth;end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); SV.Dock:Refresh() + if(SV.Chat) then + SV.Chat:UpdateLocals() + SV.Chat:RefreshChatFrames(true) + end end, }, } }, - leftDockGroup = { - order = 3, + RightBottomGroup = { + order = 4, type = "group", - name = L["Left Dock"], + name = L["Bottom Right Dock"], guiInline = true, args = { - leftDockBackdrop = { + dockRightHeight = { order = 1, - type = 'toggle', - name = L['Left Dock Backdrop'], - desc = L['Display a backdrop behind the left-side dock.'], - get = function(j)return SV.db.Dock.leftDockBackdrop end, + type = "range", + name = L["Height"], + desc = L["PANEL_DESC"], + min = 150, + max = 600, + step = 1, + get = function()return SV.db.Dock.dockRightHeight;end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); - SV.Dock:UpdateDockBackdrops() - end + SV.Dock:Refresh() + if(SV.Chat) then + SV.Chat:UpdateLocals() + SV.Chat:RefreshChatFrames(true) + end + end, }, - dockLeftHeight = { + dockRightWidth = { order = 2, type = "range", - name = L["Left Dock Height"], + name = L["Width"], + desc = L["PANEL_DESC"], + min = 150, + max = 700, + step = 1, + get = function()return SV.db.Dock.dockRightWidth;end, + set = function(key,value) + SV.Dock:ChangeDBVar(value,key[#key]); + SV.Dock:Refresh() + if(SV.Chat) then + SV.Chat:UpdateLocals() + SV.Chat:RefreshChatFrames(true) + end + end, + }, + } + }, + LeftTopGroup = { + order = 5, + type = "group", + name = L["Top Left Dock"], + guiInline = true, + args = { + dockTopLeftHeight = { + order = 1, + type = "range", + name = L["Height"], desc = L["PANEL_DESC"], min = 150, max = 600, step = 1, - width = "full", - get = function()return SV.db.Dock.dockLeftHeight;end, + get = function()return SV.db.Dock.dockTopLeftHeight;end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); SV.Dock:Refresh() @@ -1558,16 +1561,15 @@ SV.Options.args.Dock = { end end, }, - dockLeftWidth = { - order = 3, + dockTopLeftWidth = { + order = 2, type = "range", - name = L["Left Dock Width"], + name = L["Width"], desc = L["PANEL_DESC"], min = 150, max = 700, step = 1, - width = "full", - get = function()return SV.db.Dock.dockLeftWidth;end, + get = function()return SV.db.Dock.dockTopLeftWidth;end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); SV.Dock:Refresh() @@ -1579,33 +1581,21 @@ SV.Options.args.Dock = { }, } }, - rightDockGroup = { - order = 4, + RightTopGroup = { + order = 6, type = "group", - name = L["Right Dock"], + name = L["Top Right Dock"], guiInline = true, args = { - rightDockBackdrop = { + dockTopRightHeight = { order = 1, - type = 'toggle', - name = L['Right Dock Backdrop'], - desc = L['Display a backdrop behind the right-side dock.'], - get = function(j)return SV.db.Dock.rightDockBackdrop end, - set = function(key,value) - SV.Dock:ChangeDBVar(value, key[#key]); - SV.Dock:UpdateDockBackdrops() - end - }, - dockRightHeight = { - order = 2, type = "range", - name = L["Right Dock Height"], + name = L["Height"], desc = L["PANEL_DESC"], min = 150, max = 600, step = 1, - width = "full", - get = function()return SV.db.Dock.dockRightHeight;end, + get = function()return SV.db.Dock.dockTopRightHeight;end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); SV.Dock:Refresh() @@ -1615,16 +1605,15 @@ SV.Options.args.Dock = { end end, }, - dockRightWidth = { - order = 3, + dockTopRightWidth = { + order = 2, type = "range", - name = L["Right Dock Width"], + name = L["Width"], desc = L["PANEL_DESC"], min = 150, max = 700, step = 1, - width = "full", - get = function()return SV.db.Dock.dockRightWidth;end, + get = function()return SV.db.Dock.dockTopRightWidth;end, set = function(key,value) SV.Dock:ChangeDBVar(value,key[#key]); SV.Dock:Refresh() @@ -1632,18 +1621,96 @@ SV.Options.args.Dock = { SV.Chat:UpdateLocals() SV.Chat:RefreshChatFrames(true) end - if(SV.Inventory) then - SV.Inventory.BagFrame:UpdateLayout() - if(SV.Inventory.BankFrame) then - SV.Inventory.BankFrame:UpdateLayout() - end - end + end, + }, + } + }, + dataGroup = { + order = 7, + type = "group", + name = "Reports (Data Texts)", + guiInline = true, + get = function(key)return SV.db.Reports[key[#key]];end, + set = function(key,value) + SV.Reports:ChangeDBVar(value,key[#key]); + end, + args = { + time24 = { + order = 1, + type = "toggle", + name = L["24-Hour Time"], + desc = L["Toggle 24-hour mode for the time datatext."], + }, + localtime = { + order = 2, + type = "toggle", + name = L["Local Time"], + desc = L["If not set to true then the server time will be displayed instead."] + }, + battleground = { + order = 3, + type = "toggle", + name = L["Battleground Texts"], + desc = L["When inside a battleground display personal scoreboard information on the main datatext bars."] + }, + backdrop = { + order = 4, + name = "Data Backgrounds", + desc = L["Display background textures on docked data texts"], + type = "toggle", + set = function(key, value) SV.Reports:ChangeDBVar(value, key[#key]); SV.Reports:UpdateAllReports() end, + }, + shortGold = { + order = 5, + type = "toggle", + name = L["Shortened Gold Text"], + }, + spacer1 = { + order = 6, + name = "", + type = "description", + width = "full", + }, + dockCenterWidth = { + order = 7, + type = 'range', + name = L['Stat Panel Width'], + desc = L["PANEL_DESC"], + min = 400, + max = 1800, + step = 1, + width = "full", + get = function()return SV.db.Dock.dockCenterWidth; end, + set = function(key,value) + SV.Dock:ChangeDBVar(value,key[#key]); + SV.Dock:Refresh() + end, + }, + spacer2 = { + order = 8, + name = "", + type = "description", + width = "full", + }, + buttonSize = { + order = 9, + type = "range", + name = L["Dock Button Size"], + desc = L["PANEL_DESC"], + min = 20, + max = 80, + step = 1, + width = "full", + get = function()return SV.db.Dock.buttonSize;end, + set = function(key,value) + SV.Dock:ChangeDBVar(value,key[#key]); + SV.Dock:Refresh() end, }, } }, toolsGroup = { - order = 5, + order = 8, type = "group", name = L["Dock Tools"], guiInline = true, @@ -1719,35 +1786,35 @@ SV.Options.args.Dock = { } }, reportGroup1 = { - order = 6, + order = 9, type = "group", name = L["Bottom Stats: Left"], guiInline = true, args = {} }, reportGroup2 = { - order = 7, + order = 10, type = "group", name = L["Bottom Stats: Right"], guiInline = true, args = {} }, reportGroup3 = { - order = 8, + order = 11, type = "group", name = L["Top Stats: Left"], guiInline = true, args = {} }, reportGroup4 = { - order = 9, + order = 12, type = "group", name = L["Top Stats: Right"], guiInline = true, args = {} }, AddonDocklets = { - order = 10, + order = 13, type = "group", name = L["Docked Addons"], guiInline = true, diff --git a/SVUI_Chat/SVUI_Chat.lua b/SVUI_Chat/SVUI_Chat.lua index c4708be..3df5286 100644 --- a/SVUI_Chat/SVUI_Chat.lua +++ b/SVUI_Chat/SVUI_Chat.lua @@ -1621,10 +1621,14 @@ local function DockFadeInChat(location, default) if(not location) then return end for _, name in pairs(CHAT_FRAMES) do local chat = _G[name]; - if(chat and (location == chat.Dock.Parent.Bar.Data.Location)) then - if(chat.Dock and (default == chat.Dock.Button:GetName())) then + if(chat and chat.Dock and (location == chat.Dock.Parent.Bar.Data.Location)) then + local buttonName = chat.Dock.Button:GetName(); + if((default == buttonName) and (not SV.Dock.private.Disabled[buttonName])) then MOD:ShowLines(chat) chat:FadeIn(0.2, chat:GetAlpha(), 1) + else + MOD:FadeLines(chat) + chat:FadeOut(2, chat:GetAlpha(), 0, true) end end end @@ -1635,9 +1639,12 @@ local function DockFadeOutChat(location) if(not location) then return end for _, name in pairs(CHAT_FRAMES) do local chat = _G[name]; - if(chat and (location == chat.Dock.Parent.Bar.Data.Location)) then - MOD:FadeLines(chat) - chat:FadeOut(2, chat:GetAlpha(), 0, true) + if(chat and chat.Dock) then + local buttonName = chat.Dock.Button:GetName(); + if((location == chat.Dock.Parent.Bar.Data.Location) or (SV.Dock.private.Disabled[buttonName])) then + MOD:FadeLines(chat) + chat:FadeOut(2, chat:GetAlpha(), 0, true) + end end end end @@ -1714,9 +1721,7 @@ function MOD:Load() frame:Hide() frame:EnableMouse(true) frame:SetFrameStrata("DIALOG") - frame.backdrop = SV.Dock.SetThemedBackdrop(frame) - frame.backdrop.forceTop = true; - frame:UpdateBackdrop() + SV.Dock.SetThemedBackdrop(frame, true); frame.Title = frame:CreateFontString() frame.Title:SetFontObject(SVUI_Font_Header) diff --git a/SVUI_UnitFrames/assets/UNIT-AFFLICTED.blp b/SVUI_UnitFrames/assets/UNIT-AFFLICTED.blp index 33466f2..1f5a94b 100644 Binary files a/SVUI_UnitFrames/assets/UNIT-AFFLICTED.blp and b/SVUI_UnitFrames/assets/UNIT-AFFLICTED.blp differ diff --git a/SVUI_UnitFrames/elements/misc.lua b/SVUI_UnitFrames/elements/misc.lua index bcbcb19..70393e1 100644 --- a/SVUI_UnitFrames/elements/misc.lua +++ b/SVUI_UnitFrames/elements/misc.lua @@ -52,7 +52,7 @@ assert(oUF_SVUI, "SVUI UnitFrames: unable to locate oUF.") LOCAL VARIABLES ########################################################## ]]-- -local AFFLICTED_SKIN = [[Interface\AddOns\SVUI_!Core\assets\textures\Affected\AFFECTED1]]; +local AFFLICTED_SKIN = [[Interface\AddOns\SVUI_UnitFrames\assets\UNIT-AFFLICTED]]; local ROLE_ICON_DATA = { ["TANK"] = {0,0.5,0,0.5, 0.5,0.75,0.51,0.75}, @@ -107,12 +107,11 @@ function MOD:CreateAfflicted(frame) afflicted:SetPoint("BOTTOMRIGHT", frame.Health, "BOTTOMRIGHT", 0, 0) afflicted.Texture = afflicted:CreateTexture(nil, "OVERLAY", nil, 7) afflicted.Texture:SetAllPoints(afflicted) - afflicted.Texture:SetTexture(SV.BaseTexture) + afflicted.Texture:SetTexture(AFFLICTED_SKIN) afflicted.Texture:SetVertexColor(0, 0, 0, 0) afflicted.Texture:SetBlendMode("ADD") afflicted.ClassFilter = true - afflicted.MaxAlpha = 0.75 - + afflicted.MaxAlpha = 0.8 return afflicted end --[[