diff --git a/Options.lua b/Options.lua index a7a93f9fb..7ae15668b 100644 --- a/Options.lua +++ b/Options.lua @@ -36,6 +36,7 @@ local NewFeature = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0| local GreenPlus = "Interface\\AddOns\\Hekili\\Textures\\GreenPlus" local RedX = "Interface\\AddOns\\Hekili\\Textures\\RedX" local BlizzBlue = "|cFF00B4FF" +local Bullet = AtlasToString( "characterupdate_arrow-bullet-point" ) local ClassColor = C_ClassColor.GetClassColor( class.file ) @@ -7522,7 +7523,7 @@ do local self = Hekili local p = self.DB.profile local n = #info - local bind, option = info[ 2 ], info[ n ] + local bind, option = info[ n - 1 ], info[ n ] local toggle = p.toggles[ bind ] if not toggle then return end @@ -7562,7 +7563,7 @@ do local self = Hekili local p = Hekili.DB.profile local n = #info - local bind, option = info[2], info[ n ] + local bind, option = info[ n - 1 ], info[ n ] local toggle = bind and p.toggles[ bind ] if not toggle then return end @@ -7577,55 +7578,69 @@ do if not db then return end db.args.toggles = db.args.toggles or { - type = 'group', - name = 'Toggles', + type = "group", + name = "Toggles", + desc = "Toggles are keybindings that can be used to control which abilities may be recommended and where they are displayed.", order = 20, + childGroups = "tab", get = GetToggle, set = SetToggle, args = { - info = { - type = "description", - name = "Toggles are keybindings that you can use to direct the addon's recommendations and how they are presented.", - order = 0.5, - fontSize = "medium", - }, - cooldowns = { type = "group", - name = "", - inline = true, + name = "Damage Cooldowns", + desc = "Toggle Major and Minor Cooldowns to ensure they are recommended at ideal times.", order = 2, args = { key = { type = "keybinding", - name = "Cooldowns", - desc = "Set a key to toggle cooldown recommendations on/off.", + name = "Major Cooldowns", + desc = "Set a key to toggle recommendations of Major Cooldowns on or off.", order = 1, }, value = { type = "toggle", - name = "Show Cooldowns", - desc = "If checked, abilities marked as cooldowns can be recommended.", + name = "Enable Major Cooldowns", + desc = "If checked, abilities and items that require the |cFFFFD100Major Cooldowns|r toggle can be recommended.\n\n" + .. "This toggle generally applies to major damage abilities with cooldowns of 60 seconds or greater.\n\n" + .. "Abilities may be added/removed from this toggle in |cFFFFD100Abilities|r and/or |cFFFFD100Gear and Items|r sections.", order = 2, + width = 2, + }, + + cdLineBreak1 = { + type = "description", + name = "", + width = "full", + order = 2.1 + }, + + cdIndent1 = { + type = "description", + name = "", + width = 1, + order = 2.2 }, separate = { type = "toggle", - name = "Show Separately", - desc = "If checked, cooldown abilities will be shown separately in your Cooldowns Display.\n\n" .. - "This is an experimental feature and may not work well for some specializations.", + name = format( "Show in Separate %s Cooldowns Display", AtlasToString( "chromietime-32x32" ) ), + desc = format( "If checked, abilities controlled by this toggle will be shown separately in your |W%s |cFFFFD100Major Cooldowns|r|w display " + .. "when the toggle is enabled.\n\n" + .. "This is an experimental feature and may not work well for some specializations.", AtlasToString( "chromietime-32x32" ) ), + width = 2, order = 3, }, - lineBreak = { + cdLineBreak2 = { type = "description", name = "", width = "full", order = 3.1, }, - indent = { + cdIndent2 = { type = "description", name = "", width = 1, @@ -7634,394 +7649,639 @@ do override = { type = "toggle", - name = "Bloodlust Override", - desc = "If checked, when Bloodlust (or similar effects) are active, the addon will recommend cooldown abilities even if Show Cooldowns is not checked.", + name = format( "Active During %s", Hekili:GetSpellLinkWithTexture( 2825 ) ), + desc = format( "If checked, when any %s effect is active, the |cFFFFD100Major Cooldowns|r toggle will be treated as enabled, even if unchecked.", Hekili:GetSpellLinkWithTexture( 2825 ) ), + width = 2, order = 4, - } - } - }, + }, - essences = { - type = "group", - name = "", - inline = true, - order = 2.1, - args = { - key = { - type = "keybinding", - name = "Minor CDs", - desc = "Set a key to toggle Minor CDs recommendations on/off.", - order = 1, + cdLineBreak3 = { + type = "description", + name = "", + width = "full", + order = 4.1, }, - value = { - type = "toggle", - name = "Show Minor CDs", - desc = "If checked, abilities from Minor CDs can be recommended.", - order = 2, + cdIndent3 = { + type = "description", + name = "", + width = 1, + order = 4.2 }, - override = { + infusion = { type = "toggle", - name = "Cooldowns Override", - desc = "If checked, when Cooldowns are enabled, the addon will also recommend Minor CDs even if Show Minor CDs is not checked.", - order = 3, + name = format( "Active During %s", Hekili:GetSpellLinkWithTexture( 10060 ) ), + desc = format( "If checked, when %s is active, the |cFFFFD100Major Cooldowns|r toggle will be treated as enabled, even if unchecked.", Hekili:GetSpellLinkWithTexture( 10060 ) ), + width = 2, + order = 5 }, - } - }, - defensives = { - type = "group", - name = "", - inline = true, - order = 5, - args = { - key = { - type = "keybinding", - name = "Defensives", - desc = "Set a key to toggle defensive/mitigation recommendations on/off.\n" .. - "\nThis applies only to tanking specializations.", - order = 1, - }, + essences = { + type = "group", + name = "", + inline = true, + order = 6, + args = { + key = { + type = "keybinding", + name = "Minor Cooldowns", + desc = "Set a key to toggle recommendations of Minor Cooldowns on or off.", + width = 1, + order = 1, + }, - value = { - type = "toggle", - name = "Show Defensives", - desc = "If checked, abilities marked as defensives can be recommended.\n" .. - "\nThis applies only to tanking specializations.", - order = 2, + value = { + type = "toggle", + name = "Enable Minor Cooldowns", + desc = "If checked, abilities that require the |cFFFFD100Minor Cooldowns|r toggle can be recommended.\n\n" + .. "This toggle generally applies to damage-boosting abilities with a cooldown of 30 to 60 seconds, or abilities that you may " + .. "want to control separately from your major cooldowns.\n\n" + .. "Abilities may be added/removed from this toggle in |cFFFFD100Abilities|r and/or |cFFFFD100Gear and Items|r sections.", + width = 2, + order = 2, + }, + + --[[ essLineBreak1 = { + type = "description", + name = "", + width = "full", + order = 2.1 + }, + + essIndent1 = { + type = "description", + name = "", + width = 1, + order = 2.2 + }, + + separate = { + type = "toggle", + name = format( "Show in Separate %s Cooldowns Display", AtlasToString( "chromietime-32x32" ) ), + desc = format( "If checked, abilities that require the |cFFFFD100Minor Cooldowns|r toggle will be shown separately in your |W%s " + .. "|cFFFFD100Cooldowns|r|w display when the toggle is enabled.\n\n" + .. "This is an experimental feature and may not work well for some specializations.", AtlasToString( "chromietime-32x32" ) ), + width = 2, + order = 3, + }, ]] + + essLineBreak2 = { + type = "description", + name = "", + width = "full", + order = 3.1, + }, + + essIndent2 = { + type = "description", + name = "", + width = 1, + order = 3.2 + }, + + override = { + type = "toggle", + name = "Auto-Enable when |cFFFFD100Major Cooldowns|r Active", + desc = "If checked, when |cFFFFD100Major Cooldowns|r are enabled (or auto-enabled), your |cFFFFD100Minor Cooldowns|r may be recommended even if the toggle itself is not checked.", + width = 2, + order = 4, + }, + } }, - separate = { - type = "toggle", - name = "Show Separately", - desc = "If checked, defensive/mitigation abilities will be shown separately in your Defensives Display.\n" .. - "\nThis applies only to tanking specializations.", - order = 3, - } + potions = { + type = "group", + name = "", + inline = true, + order = 7, + args = { + key = { + type = "keybinding", + name = "Potions", + desc = "Set a key to toggle recommendations of Potions on or off.", + order = 1, + }, + + value = { + type = "toggle", + name = "Enable Potions", + desc = "If checked, abilities that require the |cFFFFD100Potions|r toggle can be recommended.", + width = 2, + order = 2, + }, + + --[[ potLineBreak1 = { + type = "description", + name = "", + width = "full", + order = 2.1 + }, + + potIndent1 = { + type = "description", + name = "", + width = 1, + order = 2.2 + }, + + separate = { + type = "toggle", + name = format( "Show in Separate %s Cooldowns Display", AtlasToString( "chromietime-32x32" ) ), + desc = format( "If checked, abilities that require the |cFFFFD100Potions|r toggle will be shown separately in your |W%s " + .. "|cFFFFD100Cooldowns|r|w display when the toggle is enabled.\n\n" + .. "This is an experimental feature and may not work well for some specializations.", AtlasToString( "chromietime-32x32" ) ), + width = 2, + order = 3, + }, ]] + + potLineBreak2 = { + type = "description", + name = "", + width = "full", + order = 3.1 + }, + + potIndent3 = { + type = "description", + name = "", + width = 1, + order = 3.2 + }, + + override = { + type = "toggle", + name = "Auto-Enable when |cFFFFD100Major Cooldowns|r Active", + desc = "If checked, when |cFFFFD100Major Cooldowns|r are enabled (or auto-enabled), your |cFFFFD100Potions|r may be recommended even if the toggle itself is not checked.", + width = 2, + order = 4, + }, + } + }, } }, interrupts = { type = "group", - name = "", - inline = true, + name = "Interrupts and Defensives", + desc = "Toggle Interrupts (and other utility) and Defensives as needed.", order = 4, args = { key = { type = "keybinding", name = "Interrupts", - desc = "Set a key to use for toggling interrupts on/off.", + desc = "Set a key to toggle recommendations of Interrupts (or utility abilities) on or off.", order = 1, }, value = { type = "toggle", - name = "Show Interrupts", - desc = "If checked, abilities marked as interrupts can be recommended.", + name = "Enable Interrupts", + desc = "If checked, abilities that require the |cFFFFD100Interrupts|r toggle can be recommended", order = 2, }, - separate = { - type = "toggle", - name = "Show Separately", - desc = "If checked, interrupt abilities will be shown separately in the Interrupts Display only (if enabled).", - order = 3, - } - } - }, - - potions = { - type = "group", - name = "", - inline = true, - order = 6, - args = { - key = { - type = "keybinding", - name = "Potions", - desc = "Set a key to toggle potion recommendations on/off.", - order = 1, + lb1 = { + type = "description", + name = "", + width = "full", + order = 2.1 }, - value = { - type = "toggle", - name = "Show Potions", - desc = "If checked, abilities marked as potions can be recommended.", - order = 2, + indent1 = { + type = "description", + name = "", + width = 1, + order = 2.2, }, - override = { + separate = { type = "toggle", - name = "Cooldowns Override", - desc = "If checked, when Cooldowns are enabled, the addon will also recommend Potions even if Show Potions is not checked.", + name = format( "Show in Separate %s Interrupts Display", AtlasToString( "voicechat-icon-speaker-mute" ) ), + desc = format( "If checked, abilities that require the |cFFFFD100Interrupts|r toggle will be shown separately in your %s Interrupts display.", + AtlasToString( "voicechat-icon-speaker-mute" ) ), + width = 2, order = 3, }, + + defensives = { + type = "group", + name = "", + inline = true, + order = 4, + args = { + key = { + type = "keybinding", + name = "Defensives", + desc = "Set a key to toggle recommendations of Defensives on or off.\n\n" + .. "This toggle applies primarily to Tank specializations.", + order = 1, + }, + + value = { + type = "toggle", + name = "Enable Defensives", + desc = "If checked, abilities that require the |cFFFFD100Defensives|r toggle can be recommended.\n\n" + .. "This toggle applies primarily to Tank specializations.", + order = 2, + }, + + lb1 = { + type = "description", + name = "", + width = "full", + order = 2.1 + }, + + indent1 = { + type = "description", + name = "", + width = 1, + order = 2.2, + }, + + separate = { + type = "toggle", + name = format( "Show in Separate %s Defensives Display", AtlasToString( "nameplates-InterruptShield" ) ), + desc = format( "If checked, defensive/mitigation abilities will be shown separately in your |W%s |cFFFFD100Defensives|r|w display.\n\n" + .. "This toggle applies primarily to Tank specializations.", AtlasToString( "nameplates-InterruptShield" ) ), + width = 2, + order = 3, + } + } + }, } }, displayModes = { - type = "header", - name = "Display Modes", - order = 10, - }, - - mode = { type = "group", - inline = true, - name = "", - order = 10.1, + name = "Display Control", + desc = "Cycle through your preferred Display Modes using the keybinding you select.", + order = 10, args = { - key = { - type = 'keybinding', - name = 'Display Mode', - desc = "Pressing this binding will cycle your Display Mode through the options checked below.", - order = 1, - width = 1, - }, + mode = { + type = "group", + inline = true, + name = "", + order = 10.1, + args = { + key = { + type = 'keybinding', + name = 'Display Mode', + desc = "Pressing this binding will cycle your Display Mode through the options checked below.", + order = 1, + width = 1, + }, - value = { - type = "select", - name = "Current Display Mode", - desc = "Select your current Display Mode.", - values = { - automatic = "Automatic", - single = "Single-Target", - aoe = "AOE (Multi-Target)", - dual = "Fixed Dual Display", - reactive = "Reactive Dual Display" - }, - width = 2, - order = 1.02, - }, + value = { + type = "select", + name = "Select Display Mode", + desc = "Select your Display Mode.", + values = { + automatic = "Automatic", + single = "Single-Target", + aoe = "AOE (Multi-Target)", + dual = "Fixed Dual Display", + reactive = "Reactive Dual Display" + }, + width = 1, + order = 1.02, + }, - modeLB2 = { - type = "description", - name = "Select the |cFFFFD100Display Modes|r that you wish to use. Each time you press your |cFFFFD100Display Mode|r keybinding, the addon will switch to the next checked mode.", - fontSize = "medium", - width = "full", - order = 1.03 - }, + modeLB2 = { + type = "description", + name = "Select the |cFFFFD100Display Modes|r that you wish to use. Each time you press your |cFFFFD100Display Mode|r keybinding, the addon will switch to the next checked mode.", + fontSize = "medium", + width = "full", + order = 2 + }, - automatic = { - type = "toggle", - name = "Automatic", - desc = "If checked, the Display Mode toggle can select Automatic mode.\n\nThe Primary display shows recommendations based upon the detected number of enemies (based on your specialization's options).", - width = 1.5, - order = 1.1, - }, + automatic = { + type = "toggle", + name = "Automatic " .. BlizzBlue .. "(Default)|r", + desc = "If checked, the Display Mode toggle can select Automatic mode.\n\nThe Primary display shows recommendations based upon the detected number of enemies (based on your specialization's options).", + width = "full", + order = 3, + }, - single = { - type = "toggle", - name = "Single-Target", - desc = "If checked, the Display Mode toggle can select Single-Target mode.\n\nThe Primary display shows recommendations as though you have one target (even if more targets are detected).", - width = 1.5, - order = 1.2, - }, + autoIndent = { + type = "description", + name = "", + width = 0.15, + order = 3.1, + }, - aoe = { - type = "toggle", - name = "AOE (Multi-Target)", - desc = function () - return format( "If checked, the Display Mode toggle can select AOE mode.\n\nThe Primary display shows recommendations as though you have at least |cFFFFD100%d|r targets (even if fewer are detected).\n\n" .. - "The number of targets is set in your specialization's options.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) - end, - width = 1.5, - order = 1.3, - }, + --[[ autoDesc = { + type = "description", + name = "Automatic mode uses the Primary display and makes recommendations based on the number of enemies automatically detected.", + width = 2.85, + order = 3.2, + }, ]] - dual = { - type = "toggle", - name = "Fixed Dual Display", - desc = function () - return format( "If checked, the Display Mode toggle can select Dual Display mode.\n\nThe Primary display shows single-target recommendations and the AOE display shows recommendations for |cFFFFD100%d|r or more targets (even if fewer are detected).\n\n" .. - "The number of AOE targets is set in your specialization's options.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) - end, - width = 1.5, - order = 1.4, - }, + autoDesc = { + type = "description", + name = format( "%s Uses Primary Display\n" + .. "%s Recommendations based on Targets Detected", Bullet, Bullet ), + fontSize = "medium", + width = 2.85, + order = 3.2 + }, - reactive = { - type = "toggle", - name = "Reactive Dual Display", - desc = function () - return format( "If checked, the Display Mode toggle can select Reactive mode.\n\nThe Primary display shows single-target recommendations, while the AOE display remains hidden until/unless |cFFFFD100%d|r or more targets are detected.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) - end, - width = 1.5, - order = 1.5, - }, + single = { + type = "toggle", + name = "Single-Target", + desc = "If checked, the Display Mode toggle can select Single-Target mode.\n\nThe Primary display shows recommendations as though you have one target (even if more targets are detected).", + width = "full", + order = 4, + }, - --[[ type = { - type = "select", - name = "Modes", - desc = "Select the Display Modes that can be cycled using your Display Mode key.\n\n" .. - "|cFFFFD100Auto vs. Single|r - Using only the Primary display, toggle between automatic target counting and single-target recommendations.\n\n" .. - "|cFFFFD100Single vs. AOE|r - Using only the Primary display, toggle between single-target recommendations and AOE (multi-target) recommendations.\n\n" .. - "|cFFFFD100Auto vs. Dual|r - Toggle between one display using automatic target counting and two displays, with one showing single-target recommendations and the other showing AOE recommendations. This will use additional CPU.\n\n" .. - "|cFFFFD100Reactive AOE|r - Use the Primary display for single-target recommendations, and when additional enemies are detected, show the AOE display. (Disables Mode Toggle)", - values = { - AutoSingle = "Auto vs. Single", - SingleAOE = "Single vs. AOE", - AutoDual = "Auto vs. Dual", - ReactiveDual = "Reactive AOE", - }, - order = 2, - }, ]] - }, - }, + singleIndent = { + type = "description", + name = "", + width = 0.15, + order = 4.1, + }, - troubleshooting = { - type = "header", - name = "Troubleshooting", - order = 20, - }, + --[[ singleDesc = { + type = "description", + name = "Single-Target mode uses the Primary display and makes recommendations as though you have a single target. This mode can be useful when focusing down an enemy inside a larger group.", + width = 2.85, + order = 4.2, + }, ]] - pause = { - type = "group", - name = "", - inline = true, - order = 20.1, - args = { - key = { - type = 'keybinding', - name = function () return Hekili.Pause and "Unpause" or "Pause" end, - desc = "Set a key to pause processing of your action lists. Your current display(s) will freeze, " .. - "and you can mouseover each icon to see information about the displayed action.\n\n" .. - "This will also create a Snapshot that can be used for troubleshooting and error reporting.", - order = 1, - }, - value = { - type = 'toggle', - name = 'Pause', - order = 2, - }, - } - }, + singleDesc = { + type = "description", + name = format( "%s Uses Primary Display\n" + .. "%s Recommendations based on 1 Target\n" + .. "%s Useful when Focusing Damage on a High-Priority Enemy", Bullet, Bullet, Bullet ), + fontSize = "medium", + width = 2.85, + order = 4.2 + }, - snapshot = { - type = "group", - name = "", - inline = true, - order = 20.2, - args = { - key = { - type = 'keybinding', - name = 'Snapshot', - desc = "Set a key to make a snapshot (without pausing) that can be viewed on the Snapshots tab. This can be useful information for testing and debugging.", - order = 1, - }, - } - }, + aoe = { + type = "toggle", + name = "AOE (Multi-Target)", + desc = function () + return format( "If checked, the Display Mode toggle can select AOE mode.\n\nThe Primary display shows recommendations as though you have at least |cFFFFD100%d|r targets (even if fewer are detected).\n\n" .. + "The number of targets is set in your specialization's options.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + width = "full", + order = 5, + }, - customHeader = { - type = "header", - name = "Custom", - order = 30, - }, + aoeIndent = { + type = "description", + name = "", + width = 0.15, + order = 5.1, + }, - custom1 = { - type = "group", - name = "", - inline = true, - order = 30.1, - args = { - key = { - type = "keybinding", - name = "Custom #1", - desc = "Set a key to toggle your first custom set.", - order = 1, - }, + --[[ aoeDesc = { + type = "description", + name = function () + return format( "AOE mode uses the Primary display and makes recommendations as though you have |cFFFFD100%d|r (or more) targets.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + width = 2.85, + order = 5.2, + }, ]] - value = { - type = "toggle", - name = "Show Custom #1", - desc = "If checked, abilities linked to Custom #1 can be recommended.", - order = 2, - }, + aoeDesc = { + type = "description", + name = function() + return format( "%s Uses Primary Display\n" + .. "%s Recommendations based on at least |cFFFFD100%d|r Targets\n", Bullet, Bullet, self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + fontSize = "medium", + width = 2.85, + order = 5.2 + }, + + dual = { + type = "toggle", + name = "Dual", + desc = function () + return format( "If checked, the Display Mode toggle can select Dual mode.\n\nThe Primary display shows single-target recommendations and the AOE display shows recommendations for |cFFFFD100%d|r or more targets (even if fewer are detected).\n\n" .. + "The number of AOE targets is set in your specialization's options.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + width = "full", + order = 6, + }, + + dualIndent = { + type = "description", + name = "", + width = 0.15, + order = 6.1, + }, + + --[[ dualDesc = { + type = "description", + name = function () + return format( "Dual mode shows single-target recommendations in the Primary display and multi-target (|cFFFFD100%d|r or more enemies) recommendations in the AOE display. Both displays are shown at all times.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + width = 2.85, + order = 6.2, + }, ]] - name = { - type = "input", - name = "Custom #1 Name", - desc = "Specify a descriptive name for this custom toggle.", - order = 3 + dualDesc = { + type = "description", + name = function() + return format( "%s Uses Two Displays: Primary and AOE\n" + .. "%s Primary Display's Recommendations based on 1 Target\n" + .. "%s AOE Display's Recommendations based on at least |cFFFFD100%d|r Targets\n" + .. "%s Useful for Ranged Specializations using Damage-Based Target Detection\n", Bullet, Bullet, Bullet, self.DB.profile.specs[ state.spec.id ].aoe or 3, Bullet ) + end, + fontSize = "medium", + width = 2.85, + order = 6.2 + }, + + reactive = { + type = "toggle", + name = "Reactive Dual Display", + desc = function () + return format( "If checked, the Display Mode toggle can select Reactive mode.\n\nThe Primary display shows single-target recommendations, while the AOE display remains hidden until/unless |cFFFFD100%d|r or more targets are detected.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + width = "full", + order = 7, + }, + + reactiveIndent = { + type = "description", + name = "", + width = 0.15, + order = 7.1, + }, + + --[[ reactiveDesc = { + type = "description", + name = function () + return format( "Dual mode shows single-target recommendations in the Primary display and multi-target recommendations in the AOE display. The Primary display is always active, while the AOE display activates only when |cFFFFD100%d|r or more targets are detected.", self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + width = 2.85, + order = 7.2, + },]] + + reactiveDesc = { + type = "description", + name = function() return format( "%s Uses Two Displays: Primary and AOE\n" + .. "%s Primary Display's Recommendations based on 1 Target\n" + .. "%s AOE Display Shown when |cFFFFD100%d|r+ Targets Detected", Bullet, Bullet, Bullet, self.DB.profile.specs[ state.spec.id ].aoe or 3 ) + end, + fontSize = "medium", + width = 2.85, + order = 7.2 + }, + }, } } }, - custom2 = { + troubleshooting = { type = "group", - name = "", - inline = true, - order = 30.2, + name = "Troubleshooting", + desc = "These keybindings help provide critical information when troubleshooting or reporting issues.", + order = 20, args = { - key = { - type = "keybinding", - name = "Custom #2", - desc = "Set a key to toggle your second custom set.", + pause = { + type = "group", + name = "", + inline = true, order = 1, + args = { + key = { + type = 'keybinding', + name = function () return Hekili.Pause and "Unpause" or "Pause" end, + desc = "Set a key to pause processing of your action lists. Your current display(s) will freeze, " .. + "and you can mouseover each icon to see information about the displayed action.\n\n" .. + "This will also create a Snapshot that can be used for troubleshooting and error reporting.", + order = 1, + }, + value = { + type = 'toggle', + name = 'Pause', + order = 2, + }, + } }, - value = { - type = "toggle", - name = "Show Custom #2", - desc = "If checked, abilities linked to Custom #2 can be recommended.", + snapshot = { + type = "group", + name = "", + inline = true, order = 2, + args = { + key = { + type = 'keybinding', + name = 'Snapshot', + desc = "Set a key to make a snapshot (without pausing) that can be viewed on the Snapshots tab. This can be useful information for testing and debugging.", + order = 1, + }, + } }, - - name = { - type = "input", - name = "Custom #2 Name", - desc = "Specify a descriptive name for this custom toggle.", - order = 3 - } } }, - --[[ specLinks = { + custom = { type = "group", - inline = true, - name = "", - order = 10, + name = "Custom Toggles", + desc = "These toggles allow for the creation of custom keybindings to control specific abilities.", + order = 30, args = { - header = { - type = "header", - name = "Specializations", + custom1 = { + type = "group", + name = "", + inline = true, order = 1, - }, + args = { + key = { + type = "keybinding", + name = "Custom #1", + desc = "Set a key to toggle your first custom set.", + width = 1, + order = 1, + }, - specsInfo = { - type = "description", - name = "There may be additional toggles or settings for your specialization(s). Use the buttons below to jump to that section.", - order = 2, - fontSize = "medium", - }, - }, - hidden = function( info ) - local hide = true + value = { + type = "toggle", + name = "Enable Custom #1", + desc = "If checked, abilities linked to Custom #1 can be recommended.", + width = 2, + order = 2, + }, - for i = 1, 4 do - local id, name, desc = GetSpecializationInfo( i ) - if not id then break end + lb1 = { + type = "description", + name = "", + width = "full", + order = 2.1 + }, - local sName = lower( name ) + indent1 = { + type = "description", + name = "", + width = 1, + order = 2.2 + }, - if db.plugins.specializations[ sName ] then - db.args.toggles.args.specLinks.args[ sName ] = db.args.toggles.args.specLinks.args[ sName ] or { - type = "execute", - name = name, - desc = desc, - order = 5 + i, - func = function () - ACD:SelectGroup( "Hekili", sName ) - end, + name = { + type = "input", + name = "Custom #1 Name", + desc = "Specify a descriptive name for this custom toggle.", + width = 2, + order = 3 } - hide = false - end - end + } + }, - return hide - end, - } ]] + custom2 = { + type = "group", + name = "", + inline = true, + order = 30.2, + args = { + key = { + type = "keybinding", + name = "Custom #2", + desc = "Set a key to toggle your second custom set.", + width = 1, + order = 1, + }, + + value = { + type = "toggle", + name = "Enable Custom #2", + desc = "If checked, abilities linked to Custom #2 can be recommended.", + width = 2, + order = 2, + }, + + lb1 = { + type = "description", + name = "", + width = "full", + order = 2.1 + }, + + indent1 = { + type = "description", + name = "", + width = 1, + order = 2.2 + }, + + name = { + type = "input", + name = "Custom #2 Name", + desc = "Specify a descriptive name for this custom toggle.", + width = 2, + order = 3 + } + } + } + } + } } } end diff --git a/State.lua b/State.lua index 927eaa8c8..460108fbc 100644 --- a/State.lua +++ b/State.lua @@ -2683,7 +2683,7 @@ local mt_toggle = { local toggle = db.profile.toggles[ k ] - if k == "cooldowns" and toggle.override and state.buff.bloodlust.up then return true end + if k == "cooldowns" and ( toggle.override and state.buff.bloodlust.up or toggle.infusion and state.buff.power_infusion.up ) then return true end if k == "essences" and toggle.override and state.toggle.cooldowns then return true end if k == "potions" and toggle.override and state.toggle.cooldowns then return true end