|
238 | 238 |
|
239 | 239 | function IF:CreateMover(frame) |
240 | 240 | if PA.ElvUI then |
241 | | - _G.ElvUI[1]:CreateMover(frame, frame:GetName()..'Mover', frame:GetName(), nil, nil, nil, 'ALL,iFilger', nil, 'ProjectAzilroka,iFilger,'..frame.name) |
| 241 | + _G.ElvUI[1]:CreateMover(frame, frame:GetName()..'Mover', frame:GetName(), nil, nil, nil, 'ALL,GENERAL,iFilger', nil, 'ProjectAzilroka,iFilger,'..frame.name) |
242 | 242 | elseif PA.Tukui then |
243 | 243 | _G.Tukui[1]['Movers']:RegisterFrame(frame) |
244 | 244 | end |
@@ -614,6 +614,11 @@ function IF:BuildProfile() |
614 | 614 | PA.Defaults.profile.iFilger.Cooldowns.SpellCDs = PA.SpellBook.Spells |
615 | 615 | end |
616 | 616 |
|
| 617 | +function IF:GetSpellName(spellID) |
| 618 | + local spellInfo = GetSpellInfo(spellID) |
| 619 | + return spellInfo and spellInfo.name |
| 620 | +end |
| 621 | + |
617 | 622 | function IF:GetOptions() |
618 | 623 | local iFilger = ACH:Group(IF.Title, IF.Description, nil, 'tab') |
619 | 624 | PA.Options.args.iFilger = iFilger |
@@ -672,10 +677,10 @@ function IF:GetOptions() |
672 | 677 |
|
673 | 678 | iFilger.args[Name].args.filterGroup.args.filterGroup = ACH:Group(function() return selectedFilter end, nil, 10, nil, nil, nil, nil, function() return not selectedFilter end) |
674 | 679 | iFilger.args[Name].args.filterGroup.args.filterGroup.inline = true |
675 | | - iFilger.args[Name].args.filterGroup.args.filterGroup.args.addSpell = ACH:Input(ACL['Add SpellID'], ACL['Add a spell to the filter.'], 1, nil, nil, function() return '' end, function(_, value) value = tonumber(value) if not value then return end local spellName = GetSpellInfo(value) selectedSpell = (spellName and value) or nil if not selectedSpell then return end IF.db[Name][selectedFilter][value] = true end) |
| 680 | + iFilger.args[Name].args.filterGroup.args.filterGroup.args.addSpell = ACH:Input(ACL['Add SpellID'], ACL['Add a spell to the filter.'], 1, nil, nil, function() return '' end, function(_, value) value = tonumber(value) if not value then return end local spellName = GetSpellInfo(value).name selectedSpell = (spellName and value) or nil if not selectedSpell then return end IF.db[Name][selectedFilter][value] = true end) |
676 | 681 | iFilger.args[Name].args.filterGroup.args.filterGroup.args.removeSpell = ACH:Execute(ACL["Remove Spell"], ACL["Remove a spell from the filter. Use the spell ID if you see the ID as part of the spell name in the filter."], 2, function() local value = GetSelectedSpell() if not value then return end selectedSpell = nil IF.db[Name][selectedFilter][value] = nil end, nil, true) |
677 | | - iFilger.args[Name].args.filterGroup.args.filterGroup.args.selectSpell = ACH:Select(ACL["Select Spell"], nil, 10, function() local list = IF.db[Name][selectedFilter] if not list then return end wipe(spellList) for filter in next, list do local spellName = tonumber(filter) and GetSpellInfo(filter) local name = (spellName and format("%s |cFF888888(%s)|r", spellName, filter)) or tostring(filter) spellList[filter] = name end if not next(spellList) then spellList[''] = ACL["None"] end return spellList end, nil, 'double', function() if not IF.db[Name][selectedFilter][selectedSpell] then selectedSpell = nil end return selectedSpell or '' end, function(_, value) selectedSpell = (value ~= '' and value) or nil end) |
678 | | - iFilger.args[Name].args.filterGroup.args.spellGroup = ACH:Group(function() local spell = GetSelectedSpell() local spellName = spell and GetSpellInfo(spell) return (spellName and spellName..' |cFF888888('..spell..')|r') or spell or ' ' end, nil, -15, nil, nil, nil, nil, function() return not GetSelectedSpell() end) |
| 682 | + iFilger.args[Name].args.filterGroup.args.filterGroup.args.selectSpell = ACH:Select(ACL["Select Spell"], nil, 10, function() local list = IF.db[Name][selectedFilter] if not list then return end wipe(spellList) for filter in next, list do local spellName = tonumber(filter) and IF:GetSpellName(tonumber(filter)) local name = (spellName and format("%s |cFF888888(%s)|r", spellName, filter) or tostring(filter)) spellList[filter] = name end if not next(spellList) then spellList[''] = ACL["None"] end return spellList end, nil, 'double', function() if not IF.db[Name][selectedFilter][selectedSpell] then selectedSpell = nil end return selectedSpell or '' end, function(_, value) selectedSpell = (value ~= '' and value) or nil end) |
| 683 | + iFilger.args[Name].args.filterGroup.args.spellGroup = ACH:Group(function() local spell = GetSelectedSpell() local spellName = spell and IF:GetSpellName(spell) return (spellName and spellName..' |cFF888888('..spell..')|r') or spell or ' ' end, nil, -15, nil, nil, nil, nil, function() return not GetSelectedSpell() end) |
679 | 684 | iFilger.args[Name].args.filterGroup.args.spellGroup.inline = true |
680 | 685 | iFilger.args[Name].args.filterGroup.args.spellGroup.args.enabled = ACH:Toggle(ACL['Enable'], nil, 0, nil, nil, nil, function() local spell = GetSelectedSpell() if not spell then return end return IF.db[Name][selectedFilter][spell] end, function(_, value) local spell = GetSelectedSpell() if not spell then return end IF.db[Name][selectedFilter][spell] = value end) |
681 | 686 | end |
|
0 commit comments