diff --git a/CHANGELOG.md b/CHANGELOG.md
index a5043e88..21f3c688 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
# CHANGELOG
+## Version 100100.02
+
+### Minimap
+
+- Added minimap coordinates. Disabled by default.
+- Adjusted minimap border textures to make zone colouring more pronounced.
+
+### Unit Frames
+
+- Readded fading options for pet, target of focus, and target of target frames.
+
## Version 100100.01
- Added 10.1.0 support.
diff --git a/ls_UI/assets/backdrop.TGA b/ls_UI/assets/backdrop.TGA
new file mode 100644
index 00000000..8c5aada4
Binary files /dev/null and b/ls_UI/assets/backdrop.TGA differ
diff --git a/ls_UI/assets/minimap-round-100.TGA b/ls_UI/assets/minimap-round-100.TGA
index 1a0eefef..c3fff602 100644
Binary files a/ls_UI/assets/minimap-round-100.TGA and b/ls_UI/assets/minimap-round-100.TGA differ
diff --git a/ls_UI/assets/minimap-square-100.TGA b/ls_UI/assets/minimap-square-100.TGA
index 58a1a79b..396b1085 100644
Binary files a/ls_UI/assets/minimap-square-100.TGA and b/ls_UI/assets/minimap-square-100.TGA differ
diff --git a/ls_UI/core/_core.xml b/ls_UI/core/_core.xml
index c65eb7f9..ae6514a0 100644
--- a/ls_UI/core/_core.xml
+++ b/ls_UI/core/_core.xml
@@ -7,6 +7,7 @@
+
diff --git a/ls_UI/core/backdrop.lua b/ls_UI/core/backdrop.lua
new file mode 100644
index 00000000..a5ecd58c
--- /dev/null
+++ b/ls_UI/core/backdrop.lua
@@ -0,0 +1,29 @@
+local _, ns = ...
+local E, C, PrC, M, L, P = ns.E, ns.C, ns.PrC, ns.M, ns.L, ns.P
+
+-- Lua
+local _G = getfenv(0)
+
+-- Mine
+function E:CreateBackdrop(parent)
+ local backdrop = CreateFrame("Frame", nil, parent, "BackdropTemplate")
+ backdrop:SetBackdrop({
+ bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
+ edgeFile = "Interface\\AddOns\\ls_Glass\\assets\\border",
+ tile = true,
+ tileEdge = true,
+ tileSize = 8,
+ edgeSize = 8,
+ -- insets = {left = 4, right = 4, top = 4, bottom = 4},
+ })
+
+ -- the way Blizz position it creates really weird gaps, so fix it
+ backdrop.Center:ClearAllPoints()
+ backdrop.Center:SetPoint("TOPLEFT", backdrop.TopLeftCorner, "BOTTOMRIGHT", 0, 0)
+ backdrop.Center:SetPoint("BOTTOMRIGHT", backdrop.BottomRightCorner, "TOPLEFT", 0, 0)
+
+ backdrop:SetBackdropColor(0, 0, 0, 0.6)
+ backdrop:SetBackdropBorderColor(0, 0, 0, 0.6)
+
+ return backdrop
+end
diff --git a/ls_UI/core/changelog.lua b/ls_UI/core/changelog.lua
index e85a3e34..70aaa675 100644
--- a/ls_UI/core/changelog.lua
+++ b/ls_UI/core/changelog.lua
@@ -6,10 +6,12 @@ local _G = getfenv(0)
-- Mine
E.CHANGELOG = [[
-- Added 10.1.0 support.
-- Removed login message for good. It served its purpose.
-
### Minimap
-- Fixed an issue where the difficulty flag's position wasn't adjusted when flipping the minimap.
+- Added minimap coordinates. Disabled by default.
+- Adjusted minimap border textures to make zone colouring more pronounced.
+
+### Unit Frames
+
+- Readded fading options for pet, target of focus, and target of target frames.
]]
diff --git a/ls_UI/core/defaults.lua b/ls_UI/core/defaults.lua
index 15f99104..49eec439 100644
--- a/ls_UI/core/defaults.lua
+++ b/ls_UI/core/defaults.lua
@@ -18,6 +18,7 @@ D.global = {
blue = rgb(38, 125, 206), -- #267DCE (5PB 5/12)
yellow = rgb(246, 196, 66), -- #F6C442 (2.5Y 8/10)
gray = rgb(136, 137, 135), -- #888987 (N5)
+ light_gray = rgb(202, 202, 202), -- #CACACA (N8)
dark_gray = rgb(59, 58, 58), -- #3B3A3A (N2)
black = rgb(0, 0, 0), -- #000000
white = rgb(255, 255, 255), -- #FFFFFF
@@ -770,6 +771,17 @@ D.profile = {
width = 114,
height = 28,
point = {"BOTTOMRIGHT", "LSPlayerFrame", "BOTTOMLEFT", -12, 0},
+ fade = {
+ enabled = false,
+ combat = false,
+ target = false,
+ health = false,
+ out_delay = 0.75,
+ out_duration = 0.15,
+ in_duration = 0.15,
+ min_alpha = 0.2,
+ max_alpha = 1,
+ },
insets = {
t_size = 0.25,
b_size = 0.25,
@@ -1190,6 +1202,17 @@ D.profile = {
width = 114,
height = 28,
point = {"BOTTOMLEFT", "LSTargetFrame", "BOTTOMRIGHT", 12, 0},
+ fade = {
+ enabled = false,
+ combat = false,
+ target = false,
+ health = false,
+ out_delay = 0.75,
+ out_duration = 0.15,
+ in_duration = 0.15,
+ min_alpha = 0.2,
+ max_alpha = 1,
+ },
insets = {
t_size = 0.25,
b_size = 0.25,
@@ -1523,6 +1546,17 @@ D.profile = {
width = 114,
height = 28,
point = {"BOTTOMLEFT", "LSFocusFrame", "BOTTOMRIGHT", 12, 0},
+ fade = {
+ enabled = false,
+ combat = false,
+ target = false,
+ health = false,
+ out_delay = 0.75,
+ out_duration = 0.15,
+ in_duration = 0.15,
+ min_alpha = 0.2,
+ max_alpha = 1,
+ },
insets = {
t_size = 0.25,
b_size = 0.25,
@@ -1864,6 +1898,11 @@ D.profile = {
color = {
border = false,
},
+ coords = {
+ enabled = false,
+ background = true,
+ point = {"TOP", "Minimap", "BOTTOM", 0, -8},
+ },
flag = {
enabled = true,
tooltip = false,
diff --git a/ls_UI/core/modernize.lua b/ls_UI/core/modernize.lua
index fb539ccf..5f9b3bb7 100644
--- a/ls_UI/core/modernize.lua
+++ b/ls_UI/core/modernize.lua
@@ -776,19 +776,6 @@ function P:Modernize(data, name, key)
data.version = 10000501
end
- --> 100005.03
- if data.version < 10000503 then
- if data.units then
- for _, unit in next, {"pet", "focustarget", "targettarget"} do
- if data.units[unit] then
- data.units[unit].fade = nil
- end
- end
- end
-
- data.version = 10000503
- end
-
--> 100100.01
if data.version < 10010001 then
if data.blizzard then
diff --git a/ls_UI/core/utils.lua b/ls_UI/core/utils.lua
index 738dc071..cdb21bb6 100644
--- a/ls_UI/core/utils.lua
+++ b/ls_UI/core/utils.lua
@@ -947,3 +947,37 @@ do
E.FontStrings = module
end
+
+----------
+-- MAPS --
+----------
+
+-- credit: elcius@WoWInterface
+do
+ local mapRects = {}
+ local tempVec2D = CreateVector2D(0, 0)
+
+ function E:GetPlayerMapPosition()
+ tempVec2D.x, tempVec2D.y = UnitPosition("player")
+ if not tempVec2D.x then return end
+
+ local mapID = C_Map.GetBestMapForUnit("player")
+ if not mapID then return end
+
+ local mapRect = mapRects[mapID]
+ if not mapRect then
+ local _, pos1 = C_Map.GetWorldPosFromMapPos(mapID, CreateVector2D(0, 0))
+ local _, pos2 = C_Map.GetWorldPosFromMapPos(mapID, CreateVector2D(1, 1))
+ if not (pos1 and pos2) then return end
+
+ mapRect = {pos1, pos2}
+ mapRect[2]:Subtract(mapRect[1])
+
+ mapRects[mapID] = mapRect
+ end
+
+ tempVec2D:Subtract(mapRect[1])
+
+ return tempVec2D.y / mapRect[2].y * 100, tempVec2D.x / mapRect[2].x * 100
+ end
+end
diff --git a/ls_UI/locales/enUS.lua b/ls_UI/locales/enUS.lua
index bf380023..abc2dbbb 100644
--- a/ls_UI/locales/enUS.lua
+++ b/ls_UI/locales/enUS.lua
@@ -17,6 +17,7 @@ L["ACCEPT"] = _G.ACCEPT
L["ADD"] = _G.ADD
L["ALT"] = _G.ALT_KEY_TEXT
L["ARCANE_CHARGES"] = _G.POWER_TYPE_ARCANE_CHARGES
+L["BACKGROUND"] = _G.BACKGROUND
L["BACKPACK"] = _G.BACKPACK_TOOLTIP
L["CALL_TO_ARMS_TOOLTIP"] = _G.LFG_CALL_TO_ARMS
L["CANCEL"] = _G.CANCEL
@@ -177,6 +178,7 @@ L["COOLDOWN"] = "Cooldown"
L["COOLDOWN_SWIPE"] = "Swipe"
L["COOLDOWN_TEXT"] = "Cooldown Text"
L["COOLDOWNS"] = "Cooldowns"
+L["COORDS"] = "Coordinates"
L["COPY_FROM"] = "Copy from"
L["COPY_FROM_DESC"] = "Select a unit to copy settings from."
L["COST_PREDICTION"] = "Cost Prediction"
diff --git a/ls_UI/locales/ruRU.lua b/ls_UI/locales/ruRU.lua
index 474482c1..cd939210 100644
--- a/ls_UI/locales/ruRU.lua
+++ b/ls_UI/locales/ruRU.lua
@@ -89,6 +89,7 @@ L["COOLDOWN"] = "Восстановление"
L["COOLDOWN_SWIPE"] = "Анимация восстановления"
L["COOLDOWN_TEXT"] = "Текст восстановления"
L["COOLDOWNS"] = "Время восстановления"
+L["COORDS"] = "Координаты"
L["COPY_FROM"] = "Скопировать из"
L["COPY_FROM_DESC"] = "Выберете откуда скопировать настройки."
L["COST_PREDICTION"] = "Прогноз затрат"
diff --git a/ls_UI/ls_UI.toc b/ls_UI/ls_UI.toc
index 4cda07b9..ae51fa75 100644
--- a/ls_UI/ls_UI.toc
+++ b/ls_UI/ls_UI.toc
@@ -1,6 +1,6 @@
## Interface: 100100
## Author: lightspark
-## Version: 100100.01
+## Version: 100100.02
## Title: LS: |cff1a9fc0UI|r
## Notes: Yet another UI, but this one is a bit special...
## SavedVariables: LS_UI_GLOBAL_CONFIG, LS_UI_PRIVATE_CONFIG
diff --git a/ls_UI/modules/blizzard/characterframe.lua b/ls_UI/modules/blizzard/characterframe.lua
index c6f1b8be..6d3c5faa 100644
--- a/ls_UI/modules/blizzard/characterframe.lua
+++ b/ls_UI/modules/blizzard/characterframe.lua
@@ -250,12 +250,12 @@ function MODULE:SetUpCharacterFrame()
PaperDollFrame.TitleManagerPane:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", -21, 4)
PaperDollFrame.TitleManagerPane.ScrollBox:SetSize(0, 0)
- PaperDollFrame.TitleManagerPane.ScrollBox:SetPoint("TOPLEFT", CharacterFrame.InsetRight, "TOPLEFT", 3, -2)
- PaperDollFrame.TitleManagerPane.ScrollBox:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", -26, 5)
+ PaperDollFrame.TitleManagerPane.ScrollBox:SetPoint("TOPLEFT", CharacterFrame.InsetRight, "TOPLEFT", 3, -4)
+ PaperDollFrame.TitleManagerPane.ScrollBox:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", -26, 4)
PaperDollFrame.TitleManagerPane.ScrollBar:ClearAllPoints()
- PaperDollFrame.TitleManagerPane.ScrollBar:SetPoint("TOPRIGHT", CharacterFrame.InsetRight, "TOPRIGHT", 1, -2)
- PaperDollFrame.TitleManagerPane.ScrollBar:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", 1, 0)
+ PaperDollFrame.TitleManagerPane.ScrollBar:SetPoint("TOPRIGHT", CharacterFrame.InsetRight, "TOPRIGHT", -10, -8)
+ PaperDollFrame.TitleManagerPane.ScrollBar:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", -10, 6)
hooksecurefunc("PaperDollTitlesPane_InitButton", function(button)
button.BgTop:Hide()
@@ -271,11 +271,11 @@ function MODULE:SetUpCharacterFrame()
PaperDollFrame.EquipmentManagerPane.ScrollBox:SetSize(0, 0)
PaperDollFrame.EquipmentManagerPane.ScrollBox:SetPoint("TOPLEFT", CharacterFrame.InsetRight, "TOPLEFT", 3, -28)
- PaperDollFrame.EquipmentManagerPane.ScrollBox:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", -26, 5)
+ PaperDollFrame.EquipmentManagerPane.ScrollBox:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", -26, 4)
PaperDollFrame.EquipmentManagerPane.ScrollBar:ClearAllPoints()
- PaperDollFrame.EquipmentManagerPane.ScrollBar:SetPoint("TOPRIGHT", CharacterFrame.InsetRight, "TOPRIGHT", 1, -2)
- PaperDollFrame.EquipmentManagerPane.ScrollBar:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", 1, 0)
+ PaperDollFrame.EquipmentManagerPane.ScrollBar:SetPoint("TOPRIGHT", CharacterFrame.InsetRight, "TOPRIGHT", -10, -8)
+ PaperDollFrame.EquipmentManagerPane.ScrollBar:SetPoint("BOTTOMRIGHT", CharacterFrame.InsetRight, "BOTTOMRIGHT", -10, 6)
hooksecurefunc("PaperDollEquipmentManagerPane_InitButton", function(button)
button.BgTop:Hide()
diff --git a/ls_UI/modules/minimap/minimap.lua b/ls_UI/modules/minimap/minimap.lua
index b0332861..bef51988 100644
--- a/ls_UI/modules/minimap/minimap.lua
+++ b/ls_UI/modules/minimap/minimap.lua
@@ -13,6 +13,7 @@ local unpack = _G.unpack
-- Mine
local isInit = false
+local cluster_proto = {}
local minimap_proto = {}
do
@@ -29,7 +30,7 @@ do
if self._config.color.border then
self.Border:SetVertexColor((C.db.global.colors.zone[zoneTypeToColor[GetZonePVPInfo() or "contested"]]):GetRGB())
else
- self.Border:SetVertexColor(1, 1, 1)
+ self.Border:SetVertexColor(C.db.global.colors.light_gray:GetRGB())
end
end
@@ -115,7 +116,7 @@ do
GetMinimapShape = theBodyIsSquare
end
- MinimapCluster:SetSize(info[3] + 24, info[3] + 24)
+ MinimapCluster:SetSize(info[3] + 24, info[3] + 24, true)
E.Movers:Get(MinimapCluster):UpdateSize()
self:SetSize(info[3] - 22, info[3] - 22)
@@ -164,6 +165,34 @@ do
self.DifficultyFlag:Hide()
end
end
+
+
+ function minimap_proto:UpdateCoords()
+ if self._config.coords.enabled then
+ self.Coords:ClearAllPoints()
+ self.Coords:SetPoint(unpack(self._config.coords.point))
+ self.Coords:Show()
+
+ if self._config.coords.background then
+ self.Coords:SetBackdropColor(0, 0, 0, 0.6)
+ self.Coords:SetBackdropBorderColor(0, 0, 0, 0.6)
+ else
+ self.Coords:SetBackdropColor(0, 0, 0, 0)
+ self.Coords:SetBackdropBorderColor(0, 0, 0, 0)
+ end
+ else
+ self.Coords:Hide()
+ end
+ end
+
+ function cluster_proto:ResetSize(_, _, shouldIgnore)
+ if not shouldIgnore then
+ local scale = self._config.scale
+ local info = borderInfo[scale] or borderInfo[100]
+
+ self:SetSize(info[3] + 24, info[3] + 24, true)
+ end
+ end
end
local flag_proto = {
@@ -280,6 +309,29 @@ do
end
end
+local coords_proto = {}
+
+do
+ local COORDS_FORMAT = "%.1f / %.1f"
+ local NO_COORDS = "n / a"
+
+ function coords_proto:OnUpdate(elapsed)
+ self.elapsed = (self.elapsed or 0) - elapsed
+ if self.elapsed < 0 then
+ local x, y = E:GetPlayerMapPosition()
+ if x then
+ self.Text:SetFormattedText(COORDS_FORMAT, x, y)
+
+ self.elapsed = 0.1
+ else
+ self.Text:SetText(NO_COORDS)
+
+ self.elapsed = 5
+ end
+ end
+ end
+end
+
function MODULE:IsInit()
return isInit
end
@@ -290,8 +342,11 @@ function MODULE:Init()
LoadAddOn("Blizzard_TimeManager")
end
+ Mixin(MinimapCluster, cluster_proto)
+
MinimapCluster:ClearAllPoints()
MinimapCluster:SetPoint(unpack(C.db.profile.minimap.point))
+ hooksecurefunc(MinimapCluster, "SetSize", MinimapCluster.ResetSize)
E.Movers:Create(MinimapCluster)
Mixin(Minimap, minimap_proto)
@@ -383,6 +438,19 @@ function MODULE:Init()
flagIcon:SetTexture("Interface\\AddOns\\ls_UI\\assets\\minimap-flags")
difficultyFlag.Icon = flagIcon
+ local coords = Mixin(E:CreateBackdrop(textureParent), coords_proto)
+ coords:SetFrameLevel(Minimap:GetFrameLevel() + 2)
+ coords:SetScript("OnUpdate", coords.OnUpdate)
+ Minimap.Coords = coords
+
+ local coordsText = coords:CreateFontString(nil, "ARTWORK", "GameFontNormal")
+ coordsText:SetPoint("CENTER", 0, 0)
+ coordsText:SetText("99.9 / 99.9")
+ coordsText:SetJustifyH("CENTER")
+ coords.Text = coordsText
+
+ coords:SetSize(coordsText:GetUnboundedStringWidth() + 10, coordsText:GetStringHeight() + 8)
+
hooksecurefunc(MinimapCluster, "SetHeaderUnderneath", function()
Minimap:UpdateConfig()
Minimap:UpdateLayout()
@@ -477,6 +545,7 @@ function MODULE:Update()
Minimap:UpdateLayout()
Minimap:UpdateBorderColor()
Minimap:UpdateDifficultyFlag()
+ Minimap:UpdateCoords()
MinimapCluster:UpdateFading()
end
end
diff --git a/ls_UI/modules/unitframes/core.lua b/ls_UI/modules/unitframes/core.lua
index f9754a8f..403e2af9 100644
--- a/ls_UI/modules/unitframes/core.lua
+++ b/ls_UI/modules/unitframes/core.lua
@@ -35,21 +35,10 @@ local configIgnoredKeys = {
threat = true,
}
-local parentUnits = {
- ["pet"] = "player",
- ["focustarget"] = "focus",
- ["targettarget"] = "target",
-}
-
local frame_proto = {}
function frame_proto:UpdateConfig()
self._config = E:CopyTable(C.db.profile.units[self.__unit], self._config, configIgnoredKeys)
-
- local parentUnit = parentUnits[self.__unit]
- if parentUnit then
- self._config.fade = E:CopyTable(C.db.profile.units[parentUnit].fade, self._config.fade)
- end
end
function frame_proto:OnEnter()
diff --git a/ls_UI_Options/core.lua b/ls_UI_Options/core.lua
index 81c5e5f7..d32435a9 100644
--- a/ls_UI_Options/core.lua
+++ b/ls_UI_Options/core.lua
@@ -56,6 +56,17 @@ CONFIG.POINTS_EXT = {
["TOPRIGHT"] = "TOPRIGHT",
}
+CONFIG.POINTS_NO_CENTER = {
+ ["BOTTOM"] = "BOTTOM",
+ ["BOTTOMLEFT"] = "BOTTOMLEFT",
+ ["BOTTOMRIGHT"] = "BOTTOMRIGHT",
+ ["LEFT"] = "LEFT",
+ ["RIGHT"] = "RIGHT",
+ ["TOP"] = "TOP",
+ ["TOPLEFT"] = "TOPLEFT",
+ ["TOPRIGHT"] = "TOPRIGHT",
+}
+
CONFIG.GROWTH_DIRS = {
["LEFT_DOWN"] = L["LEFT_DOWN"],
["LEFT_UP"] = L["LEFT_UP"],
diff --git a/ls_UI_Options/minimap.lua b/ls_UI_Options/minimap.lua
index 57b4695c..0c9c8c40 100644
--- a/ls_UI_Options/minimap.lua
+++ b/ls_UI_Options/minimap.lua
@@ -3,6 +3,7 @@ local _, CONFIG = ...
-- Lua
local _G = getfenv(0)
local unpack = _G.unpack
+local tonumber = _G.tonumber
-- Mine
local E, M, L, C, D, PrC, PrD, P, oUF = unpack(ls_UI)
@@ -209,6 +210,89 @@ function CONFIG:CreateMinimapOptions(order)
type = "description",
name = " ",
},
+ coords = {
+ order = inc(1),
+ type = "group",
+ name = L["COORDS"],
+ inline = true,
+ get = function(info)
+ return C.db.profile.minimap.coords[info[#info]]
+ end,
+ set = function(info, value)
+ C.db.profile.minimap.coords[info[#info]] = value
+
+ Minimap:UpdateConfig()
+ Minimap:UpdateCoords()
+ end,
+ disabled = isModuleDisabled,
+ args = {
+ enabled = {
+ order = reset(2),
+ type = "toggle",
+ name = L["ENABLE"],
+ },
+ background = {
+ order = inc(2),
+ type = "toggle",
+ name = L["BACKGROUND"],
+ },
+ spacer_1 = {
+ order = inc(2),
+ type = "description",
+ name = " ",
+ },
+ point = {
+ order = inc(2),
+ type = "group",
+ name = "",
+ inline = true,
+ get = function(info)
+ return C.db.profile.minimap.coords.point[tonumber(info[#info])]
+ end,
+ set = function(info, value)
+ if C.db.profile.minimap.coords.point[tonumber(info[#info])] ~= value then
+ C.db.profile.minimap.coords.point[tonumber(info[#info])] = value
+
+ Minimap:UpdateConfig()
+ Minimap:UpdateCoords()
+ end
+ end,
+ args = {
+ ["1"] = {
+ order = reset(2),
+ type = "select",
+ name = L["POINT"],
+ desc = L["POINT_DESC"],
+ values = CONFIG.POINTS_NO_CENTER,
+ },
+ ["3"] = {
+ order = inc(2),
+ type = "select",
+ name = L["RELATIVE_POINT"],
+ desc = L["RELATIVE_POINT_DESC"],
+ values = CONFIG.POINTS_NO_CENTER,
+ },
+ ["4"] = {
+ order = inc(2),
+ type = "range",
+ name = L["X_OFFSET"],
+ min = -128, max = 128, step = 1,
+ },
+ ["5"] = {
+ order = inc(2),
+ type = "range",
+ name = L["Y_OFFSET"],
+ min = -128, max = 128, step = 1,
+ },
+ },
+ },
+ },
+ },
+ spacer_8 = {
+ order = inc(1),
+ type = "description",
+ name = " ",
+ },
fading = {
order = inc(1),
type = "group",
diff --git a/ls_UI_Options/unitframes/core.lua b/ls_UI_Options/unitframes/core.lua
index bda6b149..c33f3677 100644
--- a/ls_UI_Options/unitframes/core.lua
+++ b/ls_UI_Options/unitframes/core.lua
@@ -261,12 +261,6 @@ local function getUnitFrameOptions(order, unit, name)
if unit == "player" then
temp.disabled = isPlayerFrameDisabled
- temp.args.reset.func = function()
- CONFIG:CopySettings(D.profile.units.player, C.db.profile.units.player)
- UNITFRAMES:For("player", "Update")
- UNITFRAMES:For("pet", "UpdateConfig")
- UNITFRAMES:For("pet", "UpdateFading")
- end
temp.args.class_power = CONFIG:CreateUnitFrameClassPowerOptions(33, unit)
temp.args.castbar = CONFIG:CreateUnitFrameCastbarOptions(34, unit)
temp.args.custom_texts = CONFIG:CreateUnitFrameCustomTextsOptions(40, unit)
@@ -279,15 +273,8 @@ local function getUnitFrameOptions(order, unit, name)
temp.args.pvp = nil
temp.args.status = nil
temp.args.mirror_widgets = nil
- temp.args.fading = nil
elseif unit == "target" then
temp.disabled = isTargetFrameDisabled
- temp.args.reset.func = function()
- CONFIG:CopySettings(D.profile.units.target, C.db.profile.units.target)
- UNITFRAMES:For("target", "Update")
- UNITFRAMES:For("targettarget", "UpdateConfig")
- UNITFRAMES:For("targettarget", "UpdateFading")
- end
temp.args.castbar = CONFIG:CreateUnitFrameCastbarOptions(34, unit)
temp.args.auras = CONFIG:CreateUnitFrameAurasOptions(35, unit)
temp.args.custom_texts = CONFIG:CreateUnitFrameCustomTextsOptions(40, unit)
@@ -296,15 +283,8 @@ local function getUnitFrameOptions(order, unit, name)
temp.args.debuff = nil
temp.args.pvp = nil
temp.args.mirror_widgets = nil
- temp.args.fading = nil
elseif unit == "focus" then
temp.disabled = isFocusFrameDisabled
- temp.args.reset.func = function()
- CONFIG:CopySettings(D.profile.units.focus, C.db.profile.units.focus)
- UNITFRAMES:For("focus", "Update")
- UNITFRAMES:For("focustarget", "UpdateConfig")
- UNITFRAMES:For("focustarget", "UpdateFading")
- end
temp.args.castbar = CONFIG:CreateUnitFrameCastbarOptions(34, unit)
temp.args.auras = CONFIG:CreateUnitFrameAurasOptions(35, unit)
temp.args.custom_texts = CONFIG:CreateUnitFrameCustomTextsOptions(40, unit)
@@ -313,7 +293,6 @@ local function getUnitFrameOptions(order, unit, name)
temp.args.debuff = nil
temp.args.pvp = nil
temp.args.mirror_widgets = nil
- temp.args.fading = nil
elseif unit == "boss" then
temp.disabled = isBossFrameDisabled
temp.args.alt_power = CONFIG:CreateUnitFrameAltPowerOptions(33, unit)
diff --git a/ls_UI_Options/unitframes/fading.lua b/ls_UI_Options/unitframes/fading.lua
index 58745325..3ba3ec4c 100644
--- a/ls_UI_Options/unitframes/fading.lua
+++ b/ls_UI_Options/unitframes/fading.lua
@@ -25,7 +25,7 @@ local function isFadingDisabled(info)
end
function CONFIG:CreateUnitFrameFadingOptions(order, unit)
- local temp = {
+ return {
order = order,
type = "group",
name = L["FADING"],
@@ -117,59 +117,4 @@ function CONFIG:CreateUnitFrameFadingOptions(order, unit)
},
},
}
-
- if unit == "player" then
- temp.set = function(info, value)
- C.db.profile.units.player.fade[info[#info]] = value
-
- UNITFRAMES:For("player", "UpdateConfig")
- UNITFRAMES:For("player", "UpdateFading")
- UNITFRAMES:For("pet", "UpdateConfig")
- UNITFRAMES:For("pet", "UpdateFading")
- end
-
- temp.args.reset.func = function()
- CONFIG:CopySettings(D.profile.units.player.fade, C.db.profile.units.player.fade, {enabled = true})
- UNITFRAMES:For("player", "UpdateConfig")
- UNITFRAMES:For("player", "UpdateFading")
- UNITFRAMES:For("pet", "UpdateConfig")
- UNITFRAMES:For("pet", "UpdateFading")
- end
- elseif unit == "focus" then
- temp.set = function(info, value)
- C.db.profile.units.focus.fade[info[#info]] = value
-
- UNITFRAMES:For("focus", "UpdateConfig")
- UNITFRAMES:For("focus", "UpdateFading")
- UNITFRAMES:For("focustarget", "UpdateConfig")
- UNITFRAMES:For("focustarget", "UpdateFading")
- end
-
- temp.args.reset.func = function()
- CONFIG:CopySettings(D.profile.units.focus.fade, C.db.profile.units.focus.fade, {enabled = true})
- UNITFRAMES:For("focus", "UpdateConfig")
- UNITFRAMES:For("focus", "UpdateFading")
- UNITFRAMES:For("focustarget", "UpdateConfig")
- UNITFRAMES:For("focustarget", "UpdateFading")
- end
- elseif unit == "target" then
- temp.set = function(info, value)
- C.db.profile.units.target.fade[info[#info]] = value
-
- UNITFRAMES:For("target", "UpdateConfig")
- UNITFRAMES:For("target", "UpdateFading")
- UNITFRAMES:For("targettarget", "UpdateConfig")
- UNITFRAMES:For("targettarget", "UpdateFading")
- end
-
- temp.args.reset.func = function()
- CONFIG:CopySettings(D.profile.units.target.fade, C.db.profile.units.target.fade, {enabled = true})
- UNITFRAMES:For("target", "UpdateConfig")
- UNITFRAMES:For("target", "UpdateFading")
- UNITFRAMES:For("targettarget", "UpdateConfig")
- UNITFRAMES:For("targettarget", "UpdateFading")
- end
- end
-
- return temp
end