diff --git a/Ellipsis/Aura.lua b/Ellipsis/Aura.lua index 664543e..f069f5d 100644 --- a/Ellipsis/Aura.lua +++ b/Ellipsis/Aura.lua @@ -17,6 +17,8 @@ local TIME_FULL_MINS = '%d:%02d' local TIME_FULL_SECS = '%.0f' local TIME_FULL_TENS = '%.1f' +local FORMAT_UNIT_AURA = '%s: %s' + local floor, ceil = math.floor, math.ceil local tinsert, tremove = table.insert, table.remove local unpack, pairs = unpack, pairs @@ -25,6 +27,7 @@ local auraDB -- variables configured by user options local highR, highG, highB, medR, medG, medB, lowR, lowG, lowB +local pointBarTop, pointBarBot, pointIconTop, pointIconBot local unitWidth, sendAlerts, ghostingEnabled, ghostDuration local tickRate = 1 -- set to initial value to delay OnUpdate until options are configured local FormatRemainingTime -- function ref, set by user options @@ -192,8 +195,8 @@ local function CreateAura(parentUnit) -- main gui widgets widget = new:CreateTexture(nil, 'BORDER') - widget:SetPoint('TOPLEFT', new, 'TOPLEFT') - widget:SetPoint('BOTTOMLEFT', new, 'BOTTOMLEFT') + widget:SetPoint(pointIconTop, new, pointIconTop) + widget:SetPoint(pointIconBot, new, pointIconBot) widget:SetTexCoord(0.08, 0.92, 0.08, 0.92) new.icon = widget @@ -205,8 +208,8 @@ local function CreateAura(parentUnit) new.border = widget widget = CreateFrame('StatusBar', nil, new) - widget:SetPoint('TOPRIGHT', new, 'TOPRIGHT') - widget:SetPoint('BOTTOMRIGHT', new, 'BOTTOMRIGHT') + widget:SetPoint(pointBarTop, new, pointBarTop) + widget:SetPoint(pointBarBot, new, pointBarBot) widget:SetFrameLevel(widget:GetFrameLevel() - 1) -- ensure bar is behind the base frame (where text is anchored) widget:SetMinMaxValues(0, 1) new.bar = widget @@ -268,7 +271,14 @@ function Aura:New(currentTime, parentUnit, spellID, spellName, spellIcon, durati new.icon:SetDesaturated(false) new.stacks:SetText(stackCount > 1 and stackCount or '') - new.name:SetText(spellName) + + if (auraDB.textFormat == 'AURA') then + new.name:SetText(spellName) + elseif (auraDB.textFormat == 'UNIT') then + new.name:SetText(new.parentUnit.unitName) + else + new.name:SetFormattedText(FORMAT_UNIT_AURA, new.parentUnit.unitName, spellName) + end if (duration == 0) then -- passive effect new.border:SetVertexColor(unpack(auraDB.colourHigh)) @@ -448,6 +458,19 @@ end function Ellipsis:ConfigureAuras() unitWidth = self.db.profile.units.width tickRate = self.db.profile.advanced.tickRate + + if (auraDB.flipIcon) then + pointBarTop = 'TOPLEFT' + pointBarBot = 'BOTTOMLEFT' + pointIconTop = 'TOPRIGHT' + pointIconBot = 'BOTTOMRIGHT' + else + pointBarTop = 'TOPRIGHT' + pointBarBot = 'BOTTOMRIGHT' + pointIconTop = 'TOPLEFT' + pointIconBot = 'BOTTOMLEFT' + end + ghostingEnabled = auraDB.ghosting ghostDuration = auraDB.ghostDuration * -1 @@ -481,5 +504,21 @@ function Ellipsis:UpdateExistingAuras() aura.border:SetVertexColor(unpack(auraDB.colourHigh)) aura.bar:SetStatusBarColor(unpack(auraDB.colourHigh)) end + + if (auraDB.textFormat == 'AURA') then + aura.name:SetText(aura.spellName) + elseif (auraDB.textFormat == 'UNIT') then + aura.name:SetText(aura.parentUnit.unitName) + else + aura.name:SetFormattedText(FORMAT_UNIT_AURA, aura.parentUnit.unitName, aura.spellName) + end + + aura.icon:ClearAllPoints() + aura.icon:SetPoint(pointIconTop, aura, pointIconTop) + aura.icon:SetPoint(pointIconBot, aura, pointIconBot) + + aura.bar:ClearAllPoints() + aura.bar:SetPoint(pointBarTop, aura, pointBarTop) + aura.bar:SetPoint(pointBarBot, aura, pointBarBot) end end diff --git a/Ellipsis/Control.lua b/Ellipsis/Control.lua index fecb396..59bb9b4 100644 --- a/Ellipsis/Control.lua +++ b/Ellipsis/Control.lua @@ -13,6 +13,7 @@ local isUniqueAura local durationMin, durationMax, blockPassive local trackPlayer, trackPet +local opacityFaded local UnitAura = UnitAura local UnitCanAttack = UnitCanAttack @@ -74,8 +75,10 @@ function Ellipsis:ConfigureControl() priorityLookup[group] = (controlDB.unitPrioritize) and options.priority or 0 -- if not prioritizing, give all units the same priority end - trackPlayer = (anchorLookup['player']) and true or false - trackPet = (anchorLookup['pet']) and true or false + trackPlayer = (anchorLookup['player']) and true or false + trackPet = (anchorLookup['pet']) and true or false + + opacityFaded = self.db.profile.units.opacityFaded end @@ -169,7 +172,7 @@ do ------------------------ local currentTime = GetTime() - local unit = activeUnits['notarget'] or Unit:New(GetTime(), 'notarget', false, 'notarget', 'notarget', false, 0) + local unit = activeUnits['notarget'] or Unit:New(GetTime(), 'notarget', false, 'notarget', L.UnitName_NoTarget, false, 0) if (unit.auras[arg1]) then -- aura already exists, update it unit.auras[arg1]:Update(currentTime, duration, currentTime + duration, 0) @@ -280,7 +283,7 @@ function Ellipsis:PLAYER_TOTEM_UPDATE(slot) toRelease = totemData[slot] -- release after new totem made or 'notarget' unit might Release end else -- need to create notarget unit - unit = Unit:New(currentTime, 'notarget', false, 'notarget', 'notarget', false, 0) + unit = Unit:New(currentTime, 'notarget', false, 'notarget', L.UnitName_NoTarget, false, 0) end -- create the aura for this totem (new or otherwise) @@ -358,6 +361,8 @@ function Ellipsis:PLAYER_TARGET_CHANGED() else anchor:UpdateDisplay(true) -- update display of its current anchor end + + unit:SetAlpha(opacityFaded) end end @@ -378,6 +383,8 @@ function Ellipsis:PLAYER_TARGET_CHANGED() else anchor:UpdateDisplay(true) -- update display on its current anchor end + + unit:SetAlpha(1) end self:UNIT_AURA('target') -- scan new target @@ -469,7 +476,7 @@ function Ellipsis:UNIT_AURA(unitTag) -- handle notarget redirects for auras that appear on the player but make more sense to appear in notarget if (noTargetRedirect[spellID]) then -- spell needs to be redirected to notarget unit - local noTarget = activeUnits['notarget'] or Unit:New(currentTime, 'notarget', false, 'notarget', 'notarget', false, 0) + local noTarget = activeUnits['notarget'] or Unit:New(currentTime, 'notarget', false, 'notarget', L.UnitName_NoTarget, false, 0) local noTargetChanged = false -- same as the global 'changed' (unlikely to be more than one redirected aura per unit) aura = noTarget.auras[spellID] diff --git a/Ellipsis/Core.lua b/Ellipsis/Core.lua index bd5b2a2..ce86f16 100644 --- a/Ellipsis/Core.lua +++ b/Ellipsis/Core.lua @@ -91,7 +91,7 @@ function Ellipsis:UpdateVersion(major, minor, bugfix) local newOptions = false - if (minor == '0') then -- addition of cooldown tracking + if (minor == '0' or minor == '1') then -- 0 = cooldown tracker, 1 = new options for display newOptions = true end diff --git a/Ellipsis/Defaults.lua b/Ellipsis/Defaults.lua index 77aea55..e20c5b4 100644 --- a/Ellipsis/Defaults.lua +++ b/Ellipsis/Defaults.lua @@ -55,10 +55,12 @@ function Ellipsis:GetDefaults() unitPrioritize = false -- whether unit prioritiy overrides chosen sorting method }, auras = { + style = 'BAR', -- BAR|ICON interactive = true, -- control ability to cancel/announce timers with mouse-clicks tooltips = 'HELPER', -- FULL|HELPER|OFF - style = 'BAR', -- BAR|ICON timeFormat = 'ABRV', -- ABRV|TRUN|FULL + textFormat = 'AURA', -- AURA|UNIT|BOTH + flipIcon = false, -- flip icon to the right side of the bar ghosting = true, ghostDuration = 10, -- appearance (text) @@ -82,6 +84,8 @@ function Ellipsis:GetDefaults() }, units ={ width = 160, -- also used for auras when in bar style, or for wrap distance in ICON style + opacityFaded = 1, -- set the opacity of units not currently being targeted + opacityNoTarget = 1, -- set the opacity of the notarget unit headerHeight = 16, -- height of the header block for each unit headerFont = 'Friz Quadrata TT', headerFontSize = 12, @@ -89,6 +93,7 @@ function Ellipsis:GetDefaults() headerShowLevel = true, headerColourBy = 'REACTION', -- CLASS|REACTION|NONE (NONE = use player chosen colour) stripServer = false, + collapseAllUnits = false, collapsePlayer = false, collapseNoTarget = false, -- colours diff --git a/Ellipsis/Ellipsis.toc b/Ellipsis/Ellipsis.toc index c2b8e8d..12abf61 100644 --- a/Ellipsis/Ellipsis.toc +++ b/Ellipsis/Ellipsis.toc @@ -2,7 +2,7 @@ ## Title: Ellipsis (|cff67b1e9K|cff4779ceith|cff67b1e9M|cff4779ceod|r) ## Notes: A full-featured, multi-target Aura (DoTs and HoTs) tracker. ## Author: Kith -## Version: 4.1.0 +## Version: 4.2.0 ## SavedVariables: EllipsisDB, EllipsisVersion ## OptionalDeps: Ace3, LibSharedMedia-3.0, LibSink-2.0 ## X-Embeds: Ace3, LibSharedMedia-3.0, LibSink-2.0 diff --git a/Ellipsis/Unit.lua b/Ellipsis/Unit.lua index e187851..e6992fb 100644 --- a/Ellipsis/Unit.lua +++ b/Ellipsis/Unit.lua @@ -22,6 +22,7 @@ local anchorLookup, priorityLookup -- variables configured by user options local unitWidth, headerAnchor +local opacityFaded, opacityNoTarget local auraSize, auraPaddingY, auraSetPoint, auraSetPointInv, auraOffsetX, auraOffsetY local wrapAuras, wrapNumber local SortAuras, UpdateDisplay -- function refs set by user options @@ -213,11 +214,15 @@ function Unit:New(currentTime, groupBase, override, guid, unitName, unitClass, u if (groupBase == 'notarget') then -- special case Unit, configured differently from others new.headerText:SetTextColor(unpack(unitDB.colourHeader)) new.headerText:SetFormattedText(L.UnitName_NoTarget) - new:UpdateHeader(unitDB.collapseNoTarget) + new:UpdateHeader(unitDB.collapseNoTarget or unitDB.collapseAllUnits) + + new:SetAlpha(opacityNoTarget) else new:UpdateHeaderColour() new:UpdateHeaderText() - new:UpdateHeader((groupBase == 'player' and unitDB.collapsePlayer)) -- will only collapse if is player and option enabled + new:UpdateHeader((groupBase == 'player' and unitDB.collapsePlayer) or unitDB.collapseAllUnits) + + new:SetAlpha((group == 'target') and 1 or opacityFaded) end activeUnits[guid] = new -- add new unit to primary unit lookup @@ -349,6 +354,8 @@ end function Ellipsis:ConfigureUnits() unitWidth = unitDB.width + opacityFaded = unitDB.opacityFaded + opacityNoTarget = unitDB.opacityNoTarget -- configure aura sorting function to use (fallback to NAME_ASC if any problems) SortAuras = Unit['SortAuras_' .. controlDB.auraSorting] or Unit.SortAuras_NAME_ASC @@ -405,11 +412,15 @@ function Ellipsis:UpdateExistingUnits() if (unit.groupBase == 'notarget') then unit.headerText:SetTextColor(unpack(unitDB.colourHeader)) - unit:UpdateHeader(unitDB.collapseNoTarget) + unit:UpdateHeader(unitDB.collapseNoTarget or unitDB.collapseAllUnits) + + unit:SetAlpha(opacityNoTarget) else unit:UpdateHeaderColour() unit:UpdateHeaderText() - unit:UpdateHeader((unit.groupBase == 'player' and unitDB.collapsePlayer)) -- will only collapse if is player and option enabled + unit:UpdateHeader((unit.groupBase == 'player' and unitDB.collapsePlayer) or unitDB.collapseAllUnits) + + unit:SetAlpha((unit.group == 'target') and 1 or opacityFaded) end unit:UpdateDisplay(true) -- update display of auras diff --git a/Ellipsis_Options/AuraConfiguration.lua b/Ellipsis_Options/AuraConfiguration.lua index 7faa0ee..35528bd 100644 --- a/Ellipsis_Options/AuraConfiguration.lua +++ b/Ellipsis_Options/AuraConfiguration.lua @@ -11,6 +11,11 @@ local dropStyle = { ['BAR'] = L.AuraDropStyle_BAR, ['ICON'] = L.AuraDropStyle_ICON, } +local dropTextFormat = { + ['AURA'] = L.AuraDropTextFormat_AURA, + ['UNIT'] = L.AuraDropTextFormat_UNIT, + ['BOTH'] = L.AuraDropTextFormat_BOTH, +} local dropTimeFormat = { ['ABRV'] = L.AuraDropTimeFormat_ABRV, ['TRUN'] = L.AuraDropTimeFormat_TRUN, @@ -91,41 +96,42 @@ local auraConfiguration = { }, } }, + style = { + name = L.AuraStyle, + desc = L.AuraStyleDesc, + type = 'select', + order = 1, + width = 'half', + values = dropStyle, + set = function(info, val) -- configuration alters both Auras and Units + Ellipsis:AurasSet(info, val) + Ellipsis:UnitsSet(info, val) + end, + }, + spacer1 = { + name = '', + type = 'description', + order = 2, + width = 'half', + }, interactive = { name = L.AuraInteractive, desc = L.AuraInteractiveDesc, type = 'toggle', - order = 1, + order = 3, + width = 'half', }, tooltips = { name = L.AuraTooltips, desc = L.AuraTooltipsDesc, type = 'select', - order = 2, + order = 4, values = dropTooltips, width = 'half', disabled = function() return not Ellipsis.db.profile.auras.interactive end, }, - style = { - name = L.AuraStyle, - desc = L.AuraStyleDesc, - type = 'select', - order = 3, - values = dropStyle, - set = function(info, val) -- configuration alters both Auras and Units - Ellipsis:AurasSet(info, val) - Ellipsis:UnitsSet(info, val) - end, - }, - timeFormat = { - name = L.AuraTimeFormat, - desc = L.AuraTimeFormatDesc, - type = 'select', - order = 4, - values = dropTimeFormat, - }, barSize = { name = L.AuraBarSize, desc = L.AuraBarSizeDesc, @@ -158,22 +164,50 @@ local auraConfiguration = { return Ellipsis.db.profile.auras.style ~= 'ICON' end, }, + timeFormat = { + name = L.AuraTimeFormat, + desc = L.AuraTimeFormatDesc, + type = 'select', + order = 6, + values = dropTimeFormat, + }, barTexture = { name = L.AuraBarTexture, desc = L.AuraBarTextureDesc, type = 'select', - order = 6, + order = 7, values = LSM:HashTable('statusbar'), dialogControl = 'LSM30_Statusbar', disabled = function() return Ellipsis.db.profile.auras.style ~= 'BAR' end, }, + textFormat = { + name = L.AuraTextFormat, + desc = L.AuraTextFormatDesc, + type = 'select', + order = 8, + width = 'half', + values = dropTextFormat, + disabled = function() + return Ellipsis.db.profile.auras.style ~= 'BAR' + end, + }, + flipIcon = { + name = L.AuraFlipIcon, + desc = L.AuraFlipIconDesc, + type = 'toggle', + order = 9, + width = 'half', + disabled = function() + return Ellipsis.db.profile.auras.style ~= 'BAR' + end, + }, groupGhosting = { name = L.AuraGhostingHeader, type = 'group', inline = true, - order = 7, + order = 10, args = { ghosting = { name = L.Enabled, @@ -199,7 +233,7 @@ local auraConfiguration = { name = '', type = 'group', inline = true, - order = 8, + order = 11, args = { textFont = { name = L.AuraTextFont, diff --git a/Ellipsis_Options/Ellipsis_Options.toc b/Ellipsis_Options/Ellipsis_Options.toc index 600f461..f980baa 100644 --- a/Ellipsis_Options/Ellipsis_Options.toc +++ b/Ellipsis_Options/Ellipsis_Options.toc @@ -2,7 +2,7 @@ ## Title: Ellipsis Options (|cff67b1e9K|cff4779ceith|cff67b1e9M|cff4779ceod|r) ## Notes: Options for Ellipsis. Must be enabled to alter settings. ## Author: Kith -## Version: 4.1.0 +## Version: 4.2.0 ## RequiredDeps: Ellipsis ## OptionalDeps: Ace3 ## LoadOnDemand: 1 diff --git a/Ellipsis_Options/Locales/Local_enUS.lua b/Ellipsis_Options/Locales/Local_enUS.lua index a0e53c3..0d2e4d2 100644 --- a/Ellipsis_Options/Locales/Local_enUS.lua +++ b/Ellipsis_Options/Locales/Local_enUS.lua @@ -148,6 +148,9 @@ L.AuraDropTooltip_HELPER = 'Helper' L.AuraDropTooltip_OFF = 'Off' L.AuraDropStyle_BAR = 'Bars' L.AuraDropStyle_ICON = 'Icons' +L.AuraDropTextFormat_AURA = 'Aura' +L.AuraDropTextFormat_UNIT = 'Unit' +L.AuraDropTextFormat_BOTH = 'Both' L.AuraDropTimeFormat_ABRV = 'Abbreviated' L.AuraDropTimeFormat_TRUN = 'Truncated' L.AuraDropTimeFormat_FULL = 'Full Display' @@ -167,27 +170,31 @@ L.AuraColoursWidgetLowDesc = 'Set the colour of the icon border, and the status L.AuraColoursWidgetBarBG = 'Bar Background' L.AuraColoursWidgetBarBGDesc = 'Set the colour of the statusbar background visible as the remaining time decreases.' -L.AuraInteractive = 'Interactive' +L.AuraStyle = 'Display Style' +L.AuraStyleDesc = 'Set the style of displayed auras.\n\nBars style shows a status bar with overlaid spell icon, name and remaining duration. The width of a bar is set by the width of Units, and will always be sorted vertically, above or below, the header of a Unit.\n\nIcon style shows only the spell icon and remaining time beneath it, and can be sorted in several ways beneath the header of a Unit.\n\nOptions for Aura display and sorting are available under...\n|cffffd100General > Layout & Sorting|r.' +L.AuraInteractive = 'Interact' L.AuraInteractiveDesc = 'Allow individual auras to be announced, cancelled or blacklisted by mouse interaction.\n\nSome Non-Targeted auras cannot be blocked this way and need to be blocked via the Blacklist directly.\n\nDisabling this options allows you to click-through aura timers and select the world behind them.' L.AuraTooltips = 'Show Tooltips' L.AuraTooltipsDesc = 'Set how tooltips should be displayed when interacting with auras.\n\nFull:\nShow aura info and helper comments\n\nHelper:\nShow only helper comments\n\nOff:\nDo not display tooltips' -L.AuraStyle = 'Display Style' -L.AuraStyleDesc = 'Set the style of displayed auras.\n\nBars style shows a status bar with overlaid spell icon, name and remaining duration. The width of a bar is set by the width of Units, and will always be sorted vertically, above or below, the header of a Unit.\n\nIcon style shows only the spell icon and remaining time beneath it, and can be sorted in several ways beneath the header of a Unit.\n\nOptions for Aura display and sorting are available under...\n|cffffd100General > Layout & Sorting|r.' -L.AuraTimeFormat = 'Remaining Time Format' -L.AuraTimeFormatDesc = 'Set how remaining time should be displayed for each aura.\n\nAbbreviated:\n9.4s | 9s | 9m | 9hr\n\nTruncated:\n9.4 | 9 | 9:09 | 9hr\n\nFull Display:\n9.4 | 9 | 9:09 | 9:09:09' L.AuraBarSize = 'Bar Height' L.AuraBarSizeDesc = 'Set the height of an aura when displayed in the Bar style. The width is controlled by the width of Units.' L.AuraIconSize = 'Icon Dimensions' L.AuraIconSizeDesc = 'Set the height and width of an aura when displayed in the Icon style.' +L.AuraTimeFormat = 'Time Format' +L.AuraTimeFormatDesc = 'Set how remaining time should be displayed for each aura.\n\nAbbreviated:\n9.4s | 9s | 9m | 9hr\n\nTruncated:\n9.4 | 9 | 9:09 | 9hr\n\nFull Display:\n9.4 | 9 | 9:09 | 9:09:09' L.AuraBarTexture = 'Bar Texture' L.AuraBarTextureDesc = 'Set the texture used for aura bars.' +L.AuraTextFormat = 'Name Format' +L.AuraTextFormatDesc = 'Set what an aura\'s name text should display for each aura when in Bar style.\n\nAura:\nShow only the aura\'s name.\n\nUnit:\nShow the aura\'s parent unit name.\n\nBoth:\nShoiw the aura\'s parent unit name followed by the aura\'s name.' +L.AuraFlipIcon = 'Flip Icon' +L.AuraFlipIconDesc = 'Set whether to flip the icon to the right side of the statusbar in Bar style.' L.AuraGhostingHeader = 'Aura Ghosting' L.AuraGhostingDesc = 'When enabled, auras that expire will \'ghost\' for a set duration before disappearing as a helpful reminder that it is no longer active. When disabled, auras will be removed as soon as they expire.' L.AuraGhostDuration = 'Ghosting Duration' L.AuraGhostDurationDesc = 'Set how many seconds a ghost aura should be displayed for.' L.AuraTextFont = 'Name & Time Font' L.AuraTextFontSize = 'Name & Time Font Size' -L.AuraTextDesc = 'Set the font, and the size of the font, to use for display of the spell name (only in Bar style) and remaining time.' +L.AuraTextDesc = 'Set the font, and the size of the font, to use for display of the spell (or unit) name (only in Bar style) and remaining time.' L.AuraStacksFont = 'Stacks Font' L.AuraStacksFontSize = 'Stacks Font Size' L.AuraStacksDesc = 'Set the font, and the size of the font, to use for display of an aura\'s stacks (if it has any). The stacks counter is always overlaid over the bottom right corner of the spell icon in all styles and only shown if the stack count is two or greater.' @@ -214,6 +221,10 @@ L.UnitWidth = 'Unit Width' L.UnitWidthDesc = 'Set the width of displayed units.\n\nWhen auras are displayed in Bar style, this also determines their width as well.\n\nWhen using Icon style and auras are set to \'wrap\', this determines the width at width the wrap occurs.\n\nOptions for Aura display and sorting are available under...\n|cffffd100General > Layout & Sorting|r.' L.UnitHeaderHeight = 'Header Height' L.UnitHeaderHeightDesc = 'Set the height of the header panel for each unit. This is where descriptive text for each unit is displayed.\n\nThis is always at the top of the unit except when Bar style auras are growing upwards.' +L.UnitOpacityFaded = 'Faded Opacity' +L.UnitOpacityFadedDesc = 'Set the opacity of units that are not currently being targeted. This does not include the Non-Targeted special unit.\n\nA setting of 1 will prevent fading out of units that are not currently your target.' +L.UnitOpacityNoTarget = 'Non-Targeted Opacity' +L.UnitOpacityNoTargetDesc = 'Set the opacity of the Non-Targeted special unit. A setting of 1 will keep the special unit as fully opaque.' L.UnitHeaderTextHeader = 'Header Text' L.UnitHeaderTextFont = 'Header Text Font' L.UnitHeaderTextFontSize = 'Header Text Font Size' @@ -225,6 +236,8 @@ L.UnitHeaderShowLevel = 'Show Level' L.UnitHeaderShowLevelDesc = 'Show the unit\'s level in the header text if known.\n\nBosses will be displayed as [B].' L.UnitStripServer = 'Strip Server Name' L.UnitStripServerDesc = 'Set whether to strip the server from the header text display of player targets.' +L.UnitCollapseAllUnits = 'All Units' +L.UnitCollapseAllUnitsDesc = 'Set whether to collapse the header (set height to zero), and disable display of header text for ALL units.\n\nIt is recommended to have aura\'s show their parent unit\'s name if this option is enabled. This can be set under...\n|cffffd100Aura Configuration > Name Format|r.' L.UnitCollapseHeader = 'Collapsible Headers' L.UnitCollapsePlayer = format('Player (%s)', UnitName('player')) -- show player name to make obvious what we are referring to L.UnitCollapsePlayerDesc = 'Set whether to collapse the header (set height to zero), and disable display of header text for the player if being tracked.' diff --git a/Ellipsis_Options/Options.lua b/Ellipsis_Options/Options.lua index 10a5a4c..153dbca 100644 --- a/Ellipsis_Options/Options.lua +++ b/Ellipsis_Options/Options.lua @@ -1,5 +1,6 @@ local Ellipsis = _G['Ellipsis'] local L = LibStub('AceLocale-3.0'):GetLocale('Ellipsis_Options') +local LUG = LibStub('AceLocale-3.0'):GetLocale('Ellipsis') local LSM = LibStub('LibSharedMedia-3.0') Ellipsis.OptionsAddonLoaded = true @@ -188,6 +189,11 @@ function Ellipsis:UpdateEntireConfiguration() self:InitializeUnits() self:UpdateExistingUnits() + self:InitializeCooldowns() + self.Cooldown:Configure() + self.Cooldown:ApplyOptionsTimerRestrictions() + self.Cooldown:UpdateExistingTimers() + self:InitializeControl() self:ApplyOptionsAuraRestrictions() self:ApplyOptionsUnitGroups() @@ -198,6 +204,10 @@ function Ellipsis:UpdateEntireConfiguration() anchor:Configure() anchor:UpdateDisplay(true) end + + if (not self.db.profile.locked) then + self:UnlockInterface() -- ensure that until locked, user can see anchor overlays for positioning + end end @@ -381,7 +391,7 @@ function Ellipsis:SpawnExampleAuras() -- spawn notarget unit + auras - unit = activeUnits['notarget'] or Unit:New(currentTime + 3, 'notarget', false, 'notarget', 'notarget', false, 0) + unit = activeUnits['notarget'] or Unit:New(currentTime + 3, 'notarget', false, 'notarget', LUG.UnitName_NoTarget, false, 0) aura = unit.auras[-100001] or false if (aura) then @@ -484,7 +494,7 @@ function Ellipsis:OpenOptions() -- create options table LibStub('AceConfigRegistry-3.0'):RegisterOptionsTable('Ellipsis', options, true) - LibStub('AceConfigDialog-3.0'):SetDefaultSize('Ellipsis', 620, 450) + LibStub('AceConfigDialog-3.0'):SetDefaultSize('Ellipsis', 620, 460) registered = true end diff --git a/Ellipsis_Options/UnitConfiguration.lua b/Ellipsis_Options/UnitConfiguration.lua index 611813b..016baaf 100644 --- a/Ellipsis_Options/UnitConfiguration.lua +++ b/Ellipsis_Options/UnitConfiguration.lua @@ -84,11 +84,29 @@ local unitConfiguration = { max = 50, step = 1, }, + opacityFaded = { + name = L.UnitOpacityFaded, + desc = L.UnitOpacityFadedDesc, + type = 'range', + order = 3, + min = 0, + max = 1, + step = 0.05, + }, + opacityNoTarget = { + name = L.UnitOpacityNoTarget, + desc = L.UnitOpacityNoTargetDesc, + type = 'range', + order = 4, + min = 0, + max = 1, + step = 0.05, + }, groupHeaderText = { name = L.UnitHeaderTextHeader, type = 'group', inline = true, - order = 3, + order = 5, args = { headerFont = { name = L.UnitHeaderTextFont, @@ -139,19 +157,32 @@ local unitConfiguration = { name = L.UnitCollapseHeader, type = 'group', inline = true, - order = 4, + order = 6, args = { + collapseAllUnits = { + name = L.UnitCollapseAllUnits, + desc = L.UnitCollapseAllUnitsDesc, + type = 'toggle', + order = 1, + width = 'full', + }, collapsePlayer = { name = L.UnitCollapsePlayer, desc = L.UnitCollapsePlayerDesc, type = 'toggle', - order = 1, + order = 2, + disabled = function() + return Ellipsis.db.profile.units.collapseAllUnits + end, }, collapseNoTarget = { name = L.UnitCollapseNoTarget, desc = L.UnitCollapseNoTargetDesc, type = 'toggle', - order = 2, + order = 3, + disabled = function() + return Ellipsis.db.profile.units.collapseAllUnits + end, }, } }, @@ -189,4 +220,8 @@ function Ellipsis:UnitsSet(info, val, val2, val3, val4) self:ConfigureUnits() -- configure localized unitObject settings self:UpdateExistingUnits() -- apply changes to all existing Units + + if (info[#info] == 'opacityFaded') then -- special case for setting opacity of units + self:ConfigureControl() + end end