-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptions.lua
More file actions
941 lines (930 loc) · 34.4 KB
/
Copy pathOptions.lua
File metadata and controls
941 lines (930 loc) · 34.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
local addonName, addonTable = ...
setfenv(1, _G.SlackHacks)
-- Documentation for AceConfig "Options" tables: https://www.wowace.com/projects/ace3/pages/ace-config-3-0-options-tables
function openOptions()
-- If Blizzard SettingsPanel is already open, toggle it closed:
if SettingsPanel and SettingsPanel:IsShown() then
HideUIPanel(SettingsPanel)
return
end
local categoryID = Self.configCategoryID or (Self.configDialog and Self.configDialog.name)
if Settings and Settings.OpenToCategory and categoryID and not InCombatLockdown() then
Settings.OpenToCategory(categoryID)
return
end
if InterfaceOptionsFrame_OpenToCategory and Self.configDialog and not InCombatLockdown() then
if InterfaceOptionsFrame and InterfaceOptionsFrame:IsShown() then
InterfaceOptionsFrame:Hide()
return
end
InterfaceOptionsFrame_OpenToCategory(Self.configDialog)
return
end
local acd = LibStub("AceConfigDialog-3.0")
if acd.OpenFrames and acd.OpenFrames["SlackHacks"] and acd.OpenFrames["SlackHacks"]:IsShown() then
acd:Close("SlackHacks")
else
acd:Open("SlackHacks")
end
end
toggleOptions = openOptions
function handleSlashCommand(input)
local command = strlower(strtrim(input or ""))
if command == "vendor" then
print("Usage: /slack vendor [consumablesmissing|consumables|flaskandoil|oil|runes|augments] [wowhead|icyveins|murlok]")
elseif command == "clearlogs" then
clearLogs()
print("SlackHacks: logs cleared")
elseif command == "options" or command == "config" or command == "opt" then
openOptions()
elseif command:find("^vendor%s+") then
Self.SelfVendor:HandleSlash(command:sub(8))
elseif command:find("^sendaugs%s+") then
if not isSlackwise() then
print("SlackHacks: unknown command.")
return
end
local arguments = command:match("^sendaugs%s+(.+)$")
if arguments then
Self.SelfVendor:SendAugsForClassSpec(arguments)
else
print("Usage: /slack sendaugs <class> <spec> [wowhead|icyveins|murlok]")
print("SlackHacks: personal overrides use /slack sendaugs <character> <realm> [wowhead|icyveins|murlok]")
end
else
LibStub("AceConfigCmd-3.0"):HandleCommand("slack", "SlackHacks", input or "")
end
end
local selfVendorEmoteValues, selfVendorEmoteSorting = {}, {}
for token, emote in pairs(SELF_VENDOR_TRIGGER_EMOTES) do
selfVendorEmoteValues[token] = emote.slashCommands
table.insert(selfVendorEmoteSorting, token)
end
table.sort(selfVendorEmoteSorting, function(left, right)
return selfVendorEmoteValues[left] < selfVendorEmoteValues[right]
end)
local selfVendorModeSorting = {
Enum.SelfVendorMode.CONSUMABLES_MISSING,
Enum.SelfVendorMode.CONSUMABLES_ALL,
Enum.SelfVendorMode.CONSUMABLES_PERSISTENT,
Enum.SelfVendorMode.OIL,
Enum.SelfVendorMode.RUNES,
Enum.SelfVendorMode.AUGMENTS,
}
local function selfVendorModeOptions()
local args = {}
args.enabled = {
name = "Enable Self Vendor",
desc = "Enable or disable all Self Vendor emote and slash-command triggers.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.selfVendor.enabled end,
set = function(_, value) Self.SelfVendor:SetEnabled(value) end,
order = 0,
}
for order, mode in ipairs(selfVendorModeSorting) do
local configuredMode = mode
local details = SELF_VENDOR_MODES[mode]
args[details.key] = {
type = "group",
name = details.name,
inline = true,
order = order,
args = {
description = {
type = "description",
name = details.description,
width = "full",
order = 1,
},
enabled = {
name = "Enable",
type = "toggle",
width = 1.1,
get = function() return db.profile.selfVendor.modes[configuredMode].enabled end,
set = function(_, value) Self.SelfVendor:SetModeEnabled(configuredMode, value) end,
order = 2,
},
triggerEmote = {
name = "Trigger Emote",
type = "select",
width = 1.9,
values = selfVendorEmoteValues,
sorting = selfVendorEmoteSorting,
get = function() return db.profile.selfVendor.modes[configuredMode].triggerEmote end,
set = function(_, value) Self.SelfVendor:SetModeTriggerEmote(configuredMode, value) end,
order = 3,
},
},
}
if mode == Enum.SelfVendorMode.RUNES then
args[details.key].args.runeQuantity = {
name = "Rune Stack Size",
type = "input",
width = 0.7,
get = function() return tostring(db.profile.selfVendor.modes[configuredMode].runeQuantity) end,
set = function(_, value) Self.SelfVendor:SetRuneQuantity(value) end,
validate = function(_, value) return tonumber(value) and tonumber(value) >= 1 and tonumber(value) <= 100 end,
order = 4,
}
end
end
return args
end
options = {
type = "group",
icon = SLACKHACKS_ICON,
args = {
enable = {
name = "Enable",
desc = "Fully enables/disables the entire addon",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return Self:IsEnabled() end,
set = function() if Self:IsEnabled() then Self:Disable() else Self:Enable() end end,
order = 0 -- first
},
general = {
type = "group",
name = "General",
desc = "Small quality-of-life features.",
order = 5,
args = {
maximumCameraZoom = {
name = "Maximum Camera Zoom",
desc = "Allow the camera to zoom out to its maximum distance.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.general.maximumCameraZoom end,
set = function(_, value)
db.profile.general.maximumCameraZoom = value
setCVars()
end,
order = 1
},
autoSellGreyItems = {
name = "Auto Sell Grey Items",
desc = "Automatically sell grey-quality items when visiting a merchant.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.general.autoSellGreyItems end,
set = function(_, value) db.profile.general.autoSellGreyItems = value end,
order = 3
},
autoRepairGroup = {
type = "group",
name = "Auto Repair",
desc = "Automatically repair all items when visiting a merchant.",
inline = true,
order = 4,
args = {
autoRepair = {
name = "Enable Auto Repair",
desc = "Automatically repair all items when visiting a merchant.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.general.autoRepair end,
set = function(_, value) db.profile.general.autoRepair = value end,
order = 1
},
autoRepairMode = {
name = "Funds",
desc = "Choose which funds to use for automatic repairs.",
type = "select",
width = "full",
values = {
personal = "Personal Funds",
guild = "Guild Funds",
guildRaid = "Guild Funds (Only in Raids)"
},
sorting = { "personal", "guild", "guildRaid" },
get = function() return db.profile.general.autoRepairMode end,
set = function(_, value) db.profile.general.autoRepairMode = value end,
disabled = function() return not db.profile.general.autoRepair end,
order = 2
},
autoRepairModeDescription = {
type = "description",
name = "Choose which funds to use for automatic repairs.",
width = "full",
order = 3
}
},
}
}
},
debug = {
type = "group",
name = "Debug",
desc = "Debugging and logging options.",
order = 6,
args = {
toggle = {
name = "Debug Mode",
desc = "Prints debug information to the chat window and logs to DB for later analysis",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.global.isDebugging end,
set = function()
db.global.isDebugging = not db.global.isDebugging
if db.global.isDebugging then
print("SlackHacks Debugging ON")
else
print("SlackHacks Debugging OFF")
end
Self.Buffs:Refresh()
end,
order = 1
},
clearLogs = {
name = "Clear Logs",
desc = "Clear all debug logs stored in SlackHacksDB.",
type = "execute",
func = function()
clearLogs()
print("SlackHacks: logs cleared")
end,
confirm = true,
order = 2
},
logPurgeGroup = {
type = "group",
name = "Log Purging",
desc = "Automatically remove old debug logs so SlackHacksDB doesn't grow unbounded.",
inline = true,
order = 3,
args = {
logPurgeEnabled = {
name = "Automatically Purge Old Logs",
desc = "Once per login, remove logged entries older than the configured number of hours.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.global.logPurgeEnabled end,
set = function(_, value) db.global.logPurgeEnabled = value end,
order = 1
},
logPurgeHours = {
name = "Keep Logs For (Hours)",
desc = "Number of hours to keep a log entry before it is eligible for automatic purging.",
type = "input",
width = "full",
get = function() return tostring(db.global.logPurgeHours) end,
set = function(_, value) db.global.logPurgeHours = tonumber(value) end,
validate = function(_, value)
local hours = tonumber(value)
return hours and hours >= LOG_PURGE_MIN_HOURS and hours <= LOG_PURGE_MAX_HOURS
end,
disabled = function() return not db.global.logPurgeEnabled end,
order = 2
},
purgeNow = {
name = "Purge Old Logs Now",
desc = "Immediately remove logged entries older than the configured number of hours.",
type = "execute",
func = function()
purgeOldLogs()
print("SlackHacks: old logs purged")
end,
order = 3
}
}
}
}
},
combat = {
type = "group",
name = "Combat",
desc = "Combat-related features.",
order = 7,
args = {
general = {
type = "group",
name = "General",
desc = "Combat features that apply to all classes.",
order = 1,
args = {
raiseCastingNameplates = {
name = "Raise Casting Nameplates",
desc = "Raise enemy nameplates while they are casting.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.combat.raiseCastingNameplates end,
set = function(_, value)
db.profile.combat.raiseCastingNameplates = value
resetNameplateCastLift()
end,
order = 1
}
}
},
paladin = {
type = "group",
name = "Paladin",
desc = "Combat features specific to Paladins.",
order = 2,
args = {
trackHolyShockCharges = {
name = "Track Holy Shock Charges",
desc = "Show two circular charge trackers next to the Holy Power bar for Holy Shock.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.combat.paladin.trackHolyShockCharges end,
set = function(_, value)
db.profile.combat.paladin.trackHolyShockCharges = value
Self.ChargeTracking:Refresh()
end,
order = 1
},
holyShockChargesPosition = {
name = "Position",
desc = "Where to anchor the Holy Shock charge trackers relative to the Holy Power bar.",
type = "select",
width = "full",
values = {
above = "Above Holy Power Bar",
below = "Below Holy Power Bar"
},
sorting = { "above", "below" },
get = function() return db.profile.combat.paladin.holyShockChargesPosition end,
set = function(_, value)
db.profile.combat.paladin.holyShockChargesPosition = value
Self.ChargeTracking:Refresh()
end,
disabled = function() return not db.profile.combat.paladin.trackHolyShockCharges end,
order = 2
}
}
}
}
},
minimap = {
type = "group",
name = "Minimap",
desc = "Minimap shape, opacity, and button visibility.",
order = 7.5,
args = {
enabled = {
name = "Enable",
desc = "Enable minimap enhancements. When disabled, the minimap looks and behaves exactly like stock Blizzard UI.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.minimap.enabled end,
set = function(_, value)
db.profile.minimap.enabled = value
if value then
Self.Minimap:Enable()
else
Self.Minimap:Disable()
end
Self.Minimap:Refresh()
end,
order = 0
},
openEditMode = {
name = "Open Visual Settings via Edit Mode",
desc = "Open Blizzard's Edit Mode and select the Minimap to configure its visual settings and position/size.",
type = "execute",
func = function()
if InCombatLockdown() then return end
if SettingsPanel and SettingsPanel:IsShown() then
HideUIPanel(SettingsPanel)
end
if EditModeManagerFrame then
ShowUIPanel(EditModeManagerFrame)
end
end,
disabled = function() return not db.profile.minimap.enabled end,
order = 0.1
},
showAllMinimapTracking = {
name = "Show All Tracking Options",
desc = "Show all minimap tracking options,\nincluding the option to turn off target tracking.",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled end,
get = function() return db.profile.minimap.showAllMinimapTracking end,
set = function(_, value)
db.profile.minimap.showAllMinimapTracking = value
Self.Minimap:Refresh()
end,
order = 0.2
},
showAddonIconsOnHover = {
name = "Show Addon Icons on Hover Only",
desc = "Only show addon minimap icons and the Addon Compartment when hovering over the minimap.",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled end,
get = function() return db.profile.minimap.showAddonIconsOnHover end,
set = function(_, value)
db.profile.minimap.showAddonIconsOnHover = value
Self.Minimap:Refresh()
end,
order = 1
},
addonsInCompartment = {
name = "Move Addon Icons to Addon Compartment",
desc = "Move third-party addon icons into the Addon Compartment menu instead of showing them on the minimap.",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled end,
get = function() return db.profile.minimap.addonsInCompartment end,
set = function(_, value)
db.profile.minimap.addonsInCompartment = value
Self.Minimap:Refresh()
end,
order = 2
},
hideDiel = {
name = "Hide Day/Night Icon",
desc = [[Hide the big useless day/night (diel) icon (Classic/Forever).]],
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled end,
get = function() return db.profile.minimap.hideDiel end,
set = function(_, value)
db.profile.minimap.hideDiel = value
Self.Minimap:Refresh()
end,
hidden = function() return isRetail() end,
order = 3
},
opacityGroup = {
type = "group",
name = "Opacity",
inline = true,
disabled = function() return not db.profile.minimap.enabled end,
order = 5,
args = {
alpha = {
name = "Opacity",
desc = "Base opacity of the minimap.",
type = "range",
min = 0,
max = 100,
step = 1,
get = function() return db.profile.minimap.alpha end,
set = function(_, value)
db.profile.minimap.alpha = value
Self.Minimap:Refresh()
end,
order = 1
},
fadeEnabled = {
name = "Fade Based on Combat / Movement",
desc = "Temporarily use a different opacity while in combat or while moving.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.minimap.fadeEnabled end,
set = function(_, value)
db.profile.minimap.fadeEnabled = value
Self.Minimap:Refresh()
end,
order = 2
},
combatAlpha = {
name = "Combat Opacity",
type = "range",
min = 0,
max = 100,
step = 1,
get = function() return db.profile.minimap.combatAlpha end,
set = function(_, value)
db.profile.minimap.combatAlpha = value
Self.Minimap:Refresh()
end,
disabled = function() return not db.profile.minimap.fadeEnabled end,
order = 3
},
movingAlpha = {
name = "Moving Opacity",
type = "range",
min = 0,
max = 100,
step = 1,
get = function() return db.profile.minimap.movingAlpha end,
set = function(_, value)
db.profile.minimap.movingAlpha = value
Self.Minimap:Refresh()
end,
disabled = function() return not db.profile.minimap.fadeEnabled end,
order = 4
}
}
},
squareGroup = {
type = "group",
name = "Square Minimap",
inline = true,
disabled = function() return not db.profile.minimap.enabled end,
order = 6,
args = {
enableSquare = {
name = "Enable",
desc = "Enable square minimap shape with title bar.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.minimap.shape == "square" end,
set = function(_, value)
db.profile.minimap.shape = value and "square" or "circle"
Self.Minimap:Refresh()
end,
order = 1
},
showIconsOnHover = {
name = "Show Blizzard Icons On Hover",
desc = "Only show standard minimap icons (Calendar, Tracking, etc.) when hovering over the minimap.",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showIconsOnHover end,
set = function(_, value)
db.profile.minimap.showIconsOnHover = value
Self.Minimap:Refresh()
end,
order = 2
},
showZoneText = {
name = "Show Zone Text",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showZoneText end,
set = function(_, value)
db.profile.minimap.showZoneText = value
Self.Minimap:Refresh()
end,
order = 3
},
showClock = {
name = "Show Clock",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showClock end,
set = function(_, value)
db.profile.minimap.showClock = value
Self.Minimap:Refresh()
end,
order = 4
},
showTracking = {
name = "Show Tracking",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showTracking end,
set = function(_, value)
db.profile.minimap.showTracking = value
Self.Minimap:Refresh()
end,
order = 5
},
showCalendar = {
name = "Show Calendar",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showCalendar end,
set = function(_, value)
db.profile.minimap.showCalendar = value
Self.Minimap:Refresh()
end,
order = 6
},
showInstanceDifficulty = {
name = "Show Instance Difficulty",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showInstanceDifficulty end,
set = function(_, value)
db.profile.minimap.showInstanceDifficulty = value
Self.Minimap:Refresh()
end,
order = 8
},
showGarrison = {
name = "Show Garrison/Expansion Landing Page",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showGarrison end,
set = function(_, value)
db.profile.minimap.showGarrison = value
Self.Minimap:Refresh()
end,
order = 9
},
showAddonCompartment = {
name = "Show Addon Compartment",
type = "toggle",
descStyle = "inline",
width = "full",
disabled = function() return not db.profile.minimap.enabled or db.profile.minimap.shape ~= "square" end,
get = function() return db.profile.minimap.showAddonCompartment end,
set = function(_, value)
db.profile.minimap.showAddonCompartment = value
Self.Minimap:Refresh()
end,
order = 10
}
}
}
}
},
buffs = {
type = "group",
name = "Consumable Buff Reminders",
desc = "Reminds you to keep up raid/dungeon consumables\nwith clickable icons.",
order = 8,
args = {
enabled = {
name = "Enable",
desc = "Show consumable buff reminders.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.enabled end,
set = function(_, value)
db.profile.buffs.enabled = value
Self.Buffs:Refresh()
end,
order = 0
},
openEditMode = {
name = "Position Buff Icons via Edit Mode",
desc = "Open Blizzard's Edit Mode to position the buff reminder icons.",
type = "execute",
func = function()
if InCombatLockdown() then return end
if SettingsPanel and SettingsPanel:IsShown() then
HideUIPanel(SettingsPanel)
end
if EditModeManagerFrame then
ShowUIPanel(EditModeManagerFrame)
end
end,
order = 0.1
},
showGlow = {
name = "Show Item Glow",
desc = "Show the proc golden glow on the icons to catch your attention.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.showGlow end,
set = function(_, value)
db.profile.buffs.showGlow = value
Self.Buffs:Refresh()
end,
order = 0.5
},
showIfExpiringGroup = {
type = "group",
name = "Buff Expiration",
inline = true,
order = 0.6,
args = {
showIfExpiring = {
name = "Show Buffs if They'll Expire Mid-Mythic / Raid Boss",
desc = "Show reminders when a timed buff will expire before the Mythic dungeon timer or estimated raid boss fight ends.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.showIfExpiring end,
set = function(_, value)
db.profile.buffs.showIfExpiring = value
Self.Buffs:Refresh()
end,
order = 1
},
durationPosition = {
name = "Duration Remaining Position",
desc = "Where to show the buff's remaining duration relative to its icon.",
type = "select",
width = "full",
values = {
above = "Above Icon",
below = "Below Icon"
},
sorting = { "above", "below" },
get = function() return db.profile.buffs.durationPosition end,
set = function(_, value)
db.profile.buffs.durationPosition = value
Self.Buffs:Refresh()
end,
disabled = function() return not db.profile.buffs.showIfExpiring end,
order = 2
}
}
},
contentGroup = {
type = "group",
name = "Where to Remind",
inline = true,
order = 1,
args = {
mythicDungeons = {
name = "In Mythic Dungeons",
desc = "Show buff reminders while in a Mythic (or Mythic Keystone)\ndungeon with a group.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.contentTypes.mythicDungeons end,
set = function(_, value)
db.profile.buffs.contentTypes.mythicDungeons = value
Self.Buffs:Refresh()
end,
order = 1
},
nonLfrRaids = {
name = "In (Non-LFR) Raids",
desc = "Show buff reminders while in a Normal, Heroic, or Mythic raid\nwith a group.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.contentTypes.nonLfrRaids end,
set = function(_, value)
db.profile.buffs.contentTypes.nonLfrRaids = value
Self.Buffs:Refresh()
end,
order = 2
}
}
},
categoriesGroup = {
type = "group",
name = "Buffs to Track",
inline = true,
order = 2,
args = {
wellFed = {
name = "Food Buff",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.categories.wellFed end,
set = function(_, value)
db.profile.buffs.categories.wellFed = value
Self.Buffs:Refresh()
end,
order = 1
},
flask = {
name = "Flask Buff",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.categories.flask end,
set = function(_, value)
db.profile.buffs.categories.flask = value
Self.Buffs:Refresh()
end,
order = 2
},
oil = {
name = "Oil Buff",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.categories.oil end,
set = function(_, value)
db.profile.buffs.categories.oil = value
Self.Buffs:Refresh()
end,
order = 3
},
rune = {
name = "Augment Rune Buff",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.buffs.categories.rune end,
set = function(_, value)
db.profile.buffs.categories.rune = value
Self.Buffs:Refresh()
end,
order = 4
}
}
},
iconSize = {
name = "Icon Size",
desc = "Size of the buff reminder icons as a percentage of the standard aura icon size.",
type = "range",
min = 50,
max = 300,
step = 5,
get = function() return db.profile.buffs.iconSize end,
set = function(_, value)
db.profile.buffs.iconSize = value
Self.Buffs:Refresh()
end,
order = 5
},
iconGap = {
name = "Icon Gap",
desc = "Space between the buff reminder icons.",
type = "range",
min = 0,
max = 100,
step = 1,
get = function() return db.profile.buffs.iconGap end,
set = function(_, value)
db.profile.buffs.iconGap = value
Self.Buffs:Refresh()
end,
order = 6
}
}
},
vendor = {
type = "group",
name = "Self Vendor",
desc = "Trade recommended enchants, gems, and consumables to nearby group or guild members using targeted emotes.",
order = 10,
args = selfVendorModeOptions()
},
weeklies = {
type = "group",
name = "Weeklies",
desc = "Track weekly quest completions and activities.",
order = 11,
args = {
enabled = {
name = "Enable",
desc = "Track weekly quest completions and activities.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.weeklies.enabled end,
set = function(_, value) Self.Weeklies:SetEnabled(value) end,
order = 0
},
trackDelves = {
name = "Track Delves",
desc = "Show a Delves button on the Objective Tracker with the weekly Gilded Stash, Trovehunter's Bounty, Valeera's level, and Delve Renown.",
type = "toggle",
descStyle = "inline",
width = "full",
get = function() return db.profile.weeklies.trackDelves end,
set = function(_, value) Self.Weeklies:SetTrackDelves(value) end,
disabled = function() return not db.profile.weeklies.enabled end,
order = 1
}
}
},
bind = {
type = "execute",
name = "Set Bindings",
desc = "Set binding presets for current character's class and spec.",
func = function() setBindings() end,
hidden = true -- Current just used by me
},
reset = {
type = "execute",
name = "Reset All Data",
desc = "DANGER: Wipes all settings! Cannot be undone!",
func = function()
db:ResetDB()
print("SlackHacks: ALL DATA WIPED")
end,
confirm = true
}
},
-- mount = {
-- type = "group",
-- name = "Mount",
-- desc = "Mount binding configuration",
-- func = function()
-- -- mount()
-- print("SlackHacks: mounting...")
-- end,
-- args = {
-- }
-- }
}