diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/CLOSE-BUTTON.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/CLOSE-BUTTON.blp index faf517b..ba31237 100644 Binary files a/Interface/AddOns/SVUI/assets/artwork/Icons/CLOSE-BUTTON.blp and b/Interface/AddOns/SVUI/assets/artwork/Icons/CLOSE-BUTTON.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-DOWN.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-DOWN.blp new file mode 100644 index 0000000..6ffc37a Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-DOWN.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-LEFT.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-LEFT.blp new file mode 100644 index 0000000..4b2dd74 Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-LEFT.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-RIGHT.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-RIGHT.blp new file mode 100644 index 0000000..c078623 Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-RIGHT.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-UP.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-UP.blp new file mode 100644 index 0000000..721bb76 Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/MOVE-UP.blp differ diff --git a/Interface/AddOns/SVUI/configs/configs.lua b/Interface/AddOns/SVUI/configs/configs.lua index ae73b11..eabfda7 100644 --- a/Interface/AddOns/SVUI/configs/configs.lua +++ b/Interface/AddOns/SVUI/configs/configs.lua @@ -546,6 +546,28 @@ local FilterOverrides = { --[[ CACHE DATA ]]-- SV.configs = { + ["general"] = { + ["cooldown"] = true, + ["autoScale"] = true, + ["multiMonitor"] = false, + ["taintLog"] = false, + ["stickyFrames"] = true, + ["loginmessage"] = true, + ["hideErrorFrame"] = true, + ["threatbar"] = false, + ["bubbles"] = true, + ["comix"] = true, + ["bigComix"] = true, + ["questWatch"] = true, + ["woot"] = true, + ["pvpinterrupt"] = true, + ["lookwhaticando"] = false, + ["reactionChat"] = false, + ["reactionEmote"] = false, + ["sharingiscaring"] = false, + ["arenadrink"] = true, + ["stupidhat"] = true, + }, ["LAYOUT"] = { mediastyle = "default", barstyle = "default", @@ -553,26 +575,6 @@ SV.configs = { groupstyle = "default", aurastyle = "default" }, - ["cooldown"] = true, - ["autoScale"] = true, - ["multiMonitor"] = false, - ["taintLog"] = false, - ["stickyFrames"] = true, - ["loginmessage"] = true, - ["hideErrorFrame"] = true, - ["threatbar"] = false, - ["bubbles"] = true, - ["comix"] = true, - ["bigComix"] = true, - ["questWatch"] = true, - ["woot"] = true, - ["pvpinterrupt"] = true, - ["lookwhaticando"] = false, - ["reactionChat"] = false, - ["reactionEmote"] = false, - ["sharingiscaring"] = false, - ["arenadrink"] = true, - ["stupidhat"] = true, ["totems"] = { ["enable"] = true, ["showBy"] = "VERTICAL", diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua index 2d89317..3346743 100644 --- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua +++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua @@ -916,7 +916,7 @@ function lib:NewCore(gfile, pfile, cfile) CoreObject.GameVersion = tonumber(InterfaceVersion); CoreObject.DebugMode = false; CoreObject.Schema = GetAddOnMetadata(CoreName, SchemaFromMeta); - CoreObject.TitleID = GetAddOnMetadata(CoreName, HeaderFromMeta); + CoreObject.TitleID = GetAddOnMetadata(CoreName, HeaderFromMeta); --meta assurance local mt = {}; diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index c1cf341..03f76d7 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -127,7 +127,7 @@ local CaptureBarHandler = function() end local ErrorFrameHandler = function(self, event) - if not SV.db.hideErrorFrame then return end + if not SV.db.general.hideErrorFrame then return end if event == 'PLAYER_REGEN_DISABLED' then UIErrorsFrame:UnregisterEvent('UI_ERROR_MESSAGE') else diff --git a/Interface/AddOns/SVUI/scripts/comix.lua b/Interface/AddOns/SVUI/scripts/comix.lua index 780c054..2a70266 100644 --- a/Interface/AddOns/SVUI/scripts/comix.lua +++ b/Interface/AddOns/SVUI/scripts/comix.lua @@ -128,7 +128,7 @@ local Comix_OnEvent = function(self, event, ...) if subEvent == "PARTY_KILL" and guid == playerGUID and ready then self:ReadyState(false) local rng = random(1,15) - if((rng < 3) and SV.db.bigComix) then + if((rng < 3) and SV.db.general.bigComix) then self:LaunchPopup("PREMIUM") elseif rng < 8 then self:LaunchPopup("DELUXE") @@ -139,7 +139,7 @@ local Comix_OnEvent = function(self, event, ...) end function SV:ToggleComix() - if not SV.db.comix then + if not SV.db.general.comix then Comix:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") Comix:SetScript("OnEvent", nil) else diff --git a/Interface/AddOns/SVUI/scripts/misc.lua b/Interface/AddOns/SVUI/scripts/misc.lua index 24c94a9..9dc13d3 100644 --- a/Interface/AddOns/SVUI/scripts/misc.lua +++ b/Interface/AddOns/SVUI/scripts/misc.lua @@ -64,7 +64,7 @@ local function LoadStyledChatBubbles() LFRBrowseFrame.timeToClear = nil end end) - if(SV.db.bubbles == true) then + if(SV.db.general.bubbles == true) then local ChatBubbleHandler = CreateFrame("Frame", nil, UIParent) local total = 0 local numKids = 0 @@ -624,7 +624,7 @@ local function ThreatBar_OnEvent(self, event) end local function LoadThreatBar() - if(SV.db.threatbar == true) then + if(SV.db.general.threatbar == true) then local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SV.UIParent); ThreatBar:SetStatusBarTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Doodads\\THREAT-BAR") ThreatBar:SetSize(50,100) diff --git a/Interface/AddOns/SVUI/scripts/questwatch.lua b/Interface/AddOns/SVUI/scripts/questwatch.lua index f06e467..02f331a 100644 --- a/Interface/AddOns/SVUI/scripts/questwatch.lua +++ b/Interface/AddOns/SVUI/scripts/questwatch.lua @@ -348,7 +348,7 @@ local function CreateQuestDocklet() ObjectiveTrackerFrame.BlockDropDown:RemoveTextures(true) SV:SetSVMovable(frame, "Quest Watch"); - elseif(not SV.db.questWatch) then + elseif(not SV.db.general.questWatch) then local frame = CreateFrame("Frame", "SVUI_QuestFrame", UIParent); frame:SetSize(200, WatchFrame:GetHeight()); frame:SetPoint("RIGHT", UIParent, "RIGHT", -100, 0); diff --git a/Interface/AddOns/SVUI/scripts/reactions.lua b/Interface/AddOns/SVUI/scripts/reactions.lua index 67f3013..a665ebf 100644 --- a/Interface/AddOns/SVUI/scripts/reactions.lua +++ b/Interface/AddOns/SVUI/scripts/reactions.lua @@ -294,7 +294,7 @@ CONFIG TOGGLE ########################################################## ]]-- function SV:ToggleReactions() - local settings = self.db + local settings = self.db.general REACTION_INTERRUPT = settings.pvpinterrupt REACTION_WOOT = settings.woot diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index f37631d..f5f36ee 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -87,7 +87,7 @@ SV.SystemAlert["FAILED_UISCALE"] = { text = L["You have changed your UIScale, however you still have the AutoScale option enabled in SVUI. Press accept if you would like to disable the Auto Scale option."], button1 = ACCEPT, button2 = CANCEL, - OnAccept = function() SV.db.autoScale = false; ReloadUI(); end, + OnAccept = function() SV.db.general.autoScale = false; ReloadUI(); end, OnCancel = function() ReloadUI() end, timeout = 0, whileDead = 1, diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index fd9d956..09554e6 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -87,7 +87,7 @@ function SV:ScreenCalibration(event) end end - if self.db.autoScale then + if self.db.general.autoScale then scale = max(0.64, min(1.15, gxMod)) else scale = max(0.64, min(1.15, GetCVar("uiScale") or UIParent:GetScale() or gxMod)) @@ -102,7 +102,7 @@ function SV:ScreenCalibration(event) elseif gxWidth >= 3840 then local width = gxWidth; local height = gxHeight; - if(self.db.multiMonitor) then + 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 @@ -143,7 +143,7 @@ function SV:ScreenCalibration(event) if evalwidth then local width = evalwidth local height = gxHeight; - if not self.db.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; @@ -157,7 +157,7 @@ function SV:ScreenCalibration(event) 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.autoScale) then + 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') diff --git a/Interface/AddOns/SVUI/system/load.lua b/Interface/AddOns/SVUI/system/load.lua index 4e1879b..315839d 100644 --- a/Interface/AddOns/SVUI/system/load.lua +++ b/Interface/AddOns/SVUI/system/load.lua @@ -170,7 +170,7 @@ function SV:Launch() _G["SVUI_Mentalo"]:SetPanelColor("yellow") _G["SVUI_MentaloPrecision"]:SetPanelTemplate("Transparent") - if self.db.loginmessage then + if self.db.general.loginmessage then local logMsg = (L["LOGIN_MSG"]):format("|cffFFFF1A", "|cffAA78FF", self.Version) self:AddonMessage(logMsg); end diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index 32c9c50..2ad66a3 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -466,7 +466,7 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) movable:RegisterForDrag("LeftButton", "RightButton") movable:SetScript("OnDragStart", function(this) if InCombatLockdown()then SV:AddonMessage(ERR_NOT_IN_COMBAT)return end - if SV.db.stickyFrames then + if SV.db.general.stickyFrames then Sticky:StartMoving(this, SV["Snap"], movable.snapOffset, movable.snapOffset, movable.snapOffset, movable.snapOffset) else this:StartMoving() @@ -480,7 +480,7 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) movable:SetScript("OnDragStop", function(this) if InCombatLockdown()then SV:AddonMessage(ERR_NOT_IN_COMBAT)return end userHolding = false; - if SV.db.stickyFrames then + if SV.db.general.stickyFrames then Sticky:StopMoving(this) else this:StopMovingOrSizing() @@ -555,7 +555,7 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) if arg == "RightButton"then userHolding = false; SVUI_MentaloPrecision:Show() - if SV.db.stickyFrames then + if SV.db.general.stickyFrames then Sticky:StopMoving(this) else this:StopMovingOrSizing() diff --git a/Interface/AddOns/SVUI/system/setup.lua b/Interface/AddOns/SVUI/system/setup.lua index 08d5140..0dbb2ad 100644 --- a/Interface/AddOns/SVUI/system/setup.lua +++ b/Interface/AddOns/SVUI/system/setup.lua @@ -1531,7 +1531,7 @@ local function SetColorTheme(style, preserve) end local presets = LoadPresetData("media", style) - print(table.dump(SV.db)) + --print(table.dump(SV.db)) SV.db.LAYOUT.mediastyle = style; if(style == "default") then diff --git a/Interface/AddOns/SVUI/system/timers.lua b/Interface/AddOns/SVUI/system/timers.lua index 1181447..935c6b0 100644 --- a/Interface/AddOns/SVUI/system/timers.lua +++ b/Interface/AddOns/SVUI/system/timers.lua @@ -251,7 +251,7 @@ local Cooldown_OnLoad = function(self, start, duration, elapsed) end function Timers:AddCooldown(origin) - if(origin.HookedCooldown or not SV.db.cooldown) then return end + if(origin.HookedCooldown or not SV.db.general.cooldown) then return end hooksecurefunc(origin, "SetCooldown", Cooldown_OnLoad) origin.HookedCooldown = true end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua index f373627..c9f7a50 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua @@ -235,31 +235,31 @@ SV.Options.args.common = { name = L["Auto Scale"], desc = L["Automatically scale the User Interface based on your screen resolution"], type = "toggle", - get = function(j)return SV.db.autoScale end, - set = function(j,value)SV.db.autoScale = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.general.autoScale end, + set = function(j,value)SV.db.general.autoScale = value;SV:StaticPopup_Show("RL_CLIENT")end }, multiMonitor = { order = 2, name = L["Multi Monitor"], desc = L["Adjust UI dimensions to accomodate for multiple monitor setups"], type = "toggle", - get = function(j)return SV.db.multiMonitor end, - set = function(j,value)SV.db.multiMonitor = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.general.multiMonitor end, + set = function(j,value)SV.db.general.multiMonitor = value;SV:StaticPopup_Show("RL_CLIENT")end }, hideErrorFrame = { order = 3, name = L["Hide Error Text"], desc = L["Hides the red error text at the top of the screen while in combat."], type = "toggle", - get = function(j)return SV.db.hideErrorFrame end, - set = function(j,value)SV.db.hideErrorFrame = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.general.hideErrorFrame end, + set = function(j,value)SV.db.general.hideErrorFrame = value;SV:StaticPopup_Show("RL_CLIENT")end }, LoginMessage = { order = 4, type = 'toggle', name = L['Login Message'], - get = function(j)return SV.db.loginmessage end, - set = function(j,value)SV.db.loginmessage = value end + get = function(j)return SV.db.general.loginmessage end, + set = function(j,value)SV.db.general.loginmessage = value end }, } }, @@ -294,7 +294,7 @@ SV.Options.args.common = { max = 328, step = 1, get = function()return SV.SVOverride.db.lootRollWidth end, - set = function(a,b)OVR:ChangeDBVar(b,a[#a]); end, + set = function(a,b) OVR:ChangeDBVar(b,a[#a]); end, }, lootRollHeight = { order = 4, @@ -305,7 +305,7 @@ SV.Options.args.common = { max = 58, step = 1, get = function()return SV.SVOverride.db.lootRollHeight end, - set = function(a,b)OVR:ChangeDBVar(b,a[#a]); end, + set = function(a,b) OVR:ChangeDBVar(b,a[#a]); end, }, } }, @@ -319,72 +319,72 @@ SV.Options.args.common = { order = 1, type = 'toggle', name = L["Enable Comic Popups"], - get = function(j)return SV.db.comix end, - set = function(j,value)SV.db.comix = value;SV:ToggleComix()end + get = function(j)return SV.db.general.comix end, + set = function(j,value) SV.db.general.comix = value; SV:ToggleComix() end }, bigComix = { order = 1, type = 'toggle', name = L["Include Large Comics"], - disabled = function() return not SV.db.comix end, - get = function(j) return SV.db.bigComix end, - set = function(j,value) SV.db.bigComix = value end + disabled = function() return not SV.db.general.comix end, + get = function(j) return SV.db.general.bigComix end, + set = function(j,value) SV.db.general.bigComix = value end }, bubbles = { order = 2, type = "toggle", name = L['Chat Bubbles Style'], desc = L['Style the blizzard chat bubbles.'], - get = function(j)return SV.db.bubbles end, - set = function(j,value)SV.db.bubbles = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.general.bubbles end, + set = function(j,value)SV.db.general.bubbles = value;SV:StaticPopup_Show("RL_CLIENT")end }, woot = { order = 3, type = 'toggle', name = L["Say Thanks"], desc = L["Thank someone when they cast specific spells on you. Typically resurrections"], - get = function(j)return SV.db.woot end, - set = function(j,value)SV.db.woot = value;SV:ToggleReactions()end + get = function(j)return SV.db.general.woot end, + set = function(j,value)SV.db.general.woot = value;SV:ToggleReactions()end }, pvpinterrupt = { order = 4, type = 'toggle', name = L["Report PVP Actions"], desc = L["Announce your interrupts, as well as when you have been sapped!"], - get = function(j)return SV.db.pvpinterrupt end, - set = function(j,value)SV.db.pvpinterrupt = value;SV:ToggleReactions()end + get = function(j)return SV.db.general.pvpinterrupt end, + set = function(j,value)SV.db.general.pvpinterrupt = value;SV:ToggleReactions()end }, lookwhaticando = { order = 5, type = 'toggle', name = L["Report Spells"], desc = L["Announce various helpful spells cast by players in your party/raid"], - get = function(j)return SV.db.lookwhaticando end, - set = function(j,value)SV.db.lookwhaticando = value;SV:ToggleReactions()end + get = function(j)return SV.db.general.lookwhaticando end, + set = function(j,value)SV.db.general.lookwhaticando = value;SV:ToggleReactions()end }, sharingiscaring = { order = 6, type = 'toggle', name = L["Report Shareables"], desc = L["Announce when someone in your party/raid has laid a feast or repair bot"], - get = function(j)return SV.db.sharingiscaring end, - set = function(j,value)SV.db.sharingiscaring = value;SV:ToggleReactions()end + get = function(j)return SV.db.general.sharingiscaring end, + set = function(j,value)SV.db.general.sharingiscaring = value;SV:ToggleReactions()end }, reactionChat = { order = 7, type = 'toggle', name = L["Report in Chat"], desc = L["Announcements will be sent to group chat channels"], - get = function(j)return SV.db.reactionChat end, - set = function(j,value)SV.db.reactionChat = value;SV:ToggleReactions()end + get = function(j)return SV.db.general.reactionChat end, + set = function(j,value)SV.db.general.reactionChat = value;SV:ToggleReactions()end }, reactionEmote = { order = 8, type = 'toggle', name = L["Auto Emotes"], desc = L["Some announcements are accompanied by player emotes."], - get = function(j)return SV.db.reactionEmote end, - set = function(j,value)SV.db.reactionEmote = value;SV:ToggleReactions()end + get = function(j)return SV.db.general.reactionEmote end, + set = function(j,value)SV.db.general.reactionEmote = value;SV:ToggleReactions()end }, } }, @@ -398,8 +398,8 @@ SV.Options.args.common = { order = 1, type = "toggle", name = L['Threat Thermometer'], - get = function(j)return SV.db.threatbar end, - set = function(j, value)SV.db.threatbar = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.general.threatbar end, + set = function(j, value)SV.db.general.threatbar = value;SV:StaticPopup_Show("RL_CLIENT")end }, totems = { order = 2, @@ -418,8 +418,8 @@ SV.Options.args.common = { order = 3, name = L['Cooldown Text'], desc = L["Display cooldown text on anything with the cooldown spiral."], - get = function(j)return SV.db.cooldown end, - set = function(j,value)SV.db.cooldown = value;SV:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.general.cooldown end, + set = function(j,value)SV.db.general.cooldown = value;SV:StaticPopup_Show("RL_CLIENT")end }, size = { order = 4, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua index e7913d9..1572538 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua @@ -35,6 +35,8 @@ local queue = SV.DynamicOptions; do for key,options in pairs(queue) do - SV.Options.args[key].args[options.key] = options.data + if(SV.Options.args[key]) then + SV.Options.args[key].args[options.key] = options.data + end end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua index e5d0d70..aeb3828 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua @@ -199,8 +199,8 @@ local function WorldMapStyle() WorldMapFrameCloseButton:SetFrameLevel(999) STYLE:ApplyCloseButtonStyle(WorldMapFrameCloseButton) - STYLE:ApplyCloseButtonStyle(WorldMapFrameSizeDownButton) - STYLE:ApplyCloseButtonStyle(WorldMapFrameSizeUpButton) + STYLE:ApplyArrowButtonStyle(WorldMapFrameSizeDownButton, "down") + STYLE:ApplyArrowButtonStyle(WorldMapFrameSizeUpButton, "up") STYLE:ApplyDropdownStyle(WorldMapLevelDropDown) STYLE:ApplyDropdownStyle(WorldMapZoneMinimapDropDown) diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua index 299af5a..f31ad44 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua @@ -121,6 +121,30 @@ function STYLE:ApplyButtonStyle(this) this:SetButtonTemplate() end +local ArrowButton_OnEnter = function(self) + self:SetBackdropBorderColor(unpack(SV.Media.color.highlight)) +end + +local ArrowButton_OnLeave = function(self) + self:SetBackdropBorderColor(0,0,0,1) +end + +function STYLE:ApplyArrowButtonStyle(this, direction, anchor) + if not this then return end + this:RemoveTextures() + this:SetButtonTemplate(nil, 1, -7, -7, nil, "green") + this:SetFrameLevel(this:GetFrameLevel() + 4) + this:SetNormalTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\MOVE-]] .. direction:upper()) + if not this.hookedColors then + this:HookScript("OnEnter", ArrowButton_OnEnter) + this:HookScript("OnLeave", ArrowButton_OnLeave) + this.hookedColors = true + end + if anchor then + this:SetPoint("TOPRIGHT", anchor, "TOPRIGHT", 2, 2) + end +end + --[[ CLOSE BUTTON ]]-- local CloseButton_OnEnter = function(self) self:SetBackdropBorderColor(unpack(SV.Media.color.highlight))