diff --git a/.gitignore b/.gitignore index 24b392cd1..002c97053 100755 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ suf.tmproj -.DS_Store \ No newline at end of file +.DS_Store +.release \ No newline at end of file diff --git a/modules/indicators.lua b/modules/indicators.lua index a4533c3e4..268b0b323 100755 --- a/modules/indicators.lua +++ b/modules/indicators.lua @@ -121,13 +121,14 @@ function Indicators:UpdateLFDRole(frame, event) role = specID and select(6, GetSpecializationInfoByID(specID)) end - if( role == "TANK" ) then + local lfdRole = ShadowUF.db.profile.units[frame.unitType].indicators.lfdRole + if( role == "TANK" and lfdRole.tank) then frame.indicators.lfdRole:SetTexCoord(0, 19/64, 22/64, 41/64) frame.indicators.lfdRole:Show() - elseif( role == "HEALER" ) then + elseif( role == "HEALER" and lfdRole.healer) then frame.indicators.lfdRole:SetTexCoord(20/64, 39/64, 1/64, 20/64) frame.indicators.lfdRole:Show() - elseif( role == "DAMAGER" ) then + elseif( role == "DAMAGER" and lfdRole.damage) then frame.indicators.lfdRole:SetTexCoord(20/64, 39/64, 22/64, 41/64) frame.indicators.lfdRole:Show() else diff --git a/options/config.lua b/options/config.lua index a2bd8b70f..7eea77979 100755 --- a/options/config.lua +++ b/options/config.lua @@ -4730,6 +4730,98 @@ local function loadUnitOptions() Config.unitTable.args.indicators.args[indicator] = Config.indicatorTable end + Config.unitTable.args.indicators.args.lfdRole = { + order = 0, + name = function(info) + if( info[#(info)] == "status" and info[2] == "player" ) then + return L["Combat/resting status"] + end + + return getName(info) + end, + desc = function(info) return INDICATOR_DESC[info[#(info)]] end, + type = "group", + hidden = hideRestrictedOption, + args = { + enabled = { + order = 0, + type = "toggle", + name = L["Enable indicator"], + hidden = false, + arg = "indicators.$parent.enabled", + }, + sep1 = { + order = 1, + type = "description", + name = "", + width = "full", + hidden = function() return not ShadowUF.db.profile.advanced end, + }, + anchorPoint = { + order = 2, + type = "select", + name = L["Anchor point"], + values = positionList, + hidden = false, + arg = "indicators.$parent.anchorPoint", + }, + size = { + order = 4, + type = "range", + name = L["Size"], + min = 1, max = 40, step = 1, + hidden = hideAdvancedOption, + arg = "indicators.$parent.size", + }, + x = { + order = 5, + type = "range", + name = L["X Offset"], + min = -100, max = 100, step = 1, softMin = -50, softMax = 50, + hidden = false, + arg = "indicators.$parent.x", + }, + y = { + order = 6, + type = "range", + name = L["Y Offset"], + min = -100, max = 100, step = 1, softMin = -50, softMax = 50, + hidden = false, + arg = "indicators.$parent.y", + }, + roles = { + order = 7, + type = "group", + inline = true, + name = L["ROLE"], + hidden = function() return not ShadowUF.db.profile.advanced end, + args = { + tank = { + order = 1, + type = "toggle", + name = L["TANK"], + hidden = hideAdvancedOption, + arg = "indicators.$parentparent.tank", + }, + healer = { + order = 2, + type = "toggle", + name = L["HEALER"], + hidden = hideAdvancedOption, + arg = "indicators.$parentparent.healer", + }, + damage = { + order = 3, + type = "toggle", + name = L["DAMAGER"], + hidden = hideAdvancedOption, + arg = "indicators.$parentparent.damage", + }, + }, + }, + }, + } + -- Check for unit conflicts local function hideZoneConflict() for _, zone in pairs(ShadowUF.db.profile.visibility) do