-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSettings.lua
1606 lines (1381 loc) · 68.7 KB
/
Settings.lua
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
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
HealersMateSettings = {}
local util = getglobal("HMUtil")
local _, playerClass = UnitClass("player")
function HealersMateSettings.UpdateTrackedDebuffTypes()
local debuffTypeCureSpells = {
["PALADIN"] = {
["Purify"] = {"Poison", "Disease"},
["Cleanse"] = {"Poison", "Disease", "Magic"}
},
["PRIEST"] = {
["Cure Disease"] = {"Disease"},
["Abolish Disease"] = {"Disease"},
["Dispel Magic"] = {"Magic"}
},
["DRUID"] = {
["Cure Poison"] = {"Poison"},
["Abolish Poison"] = {"Poison"},
["Remove Curse"] = {"Curse"}
},
["SHAMAN"] = {
["Cure Poison"] = {"Poison"},
["Cure Disease"] = {"Disease"}
},
["MAGE"] = {
["Remove Lesser Curse"] = {"Curse"}
}
}
for _, class in ipairs(util.GetClasses()) do
if not debuffTypeCureSpells[class] then
debuffTypeCureSpells[class] = {}
end
end
local trackedDebuffTypes = {}
do
local id = 1;
for i = 1, GetNumSpellTabs() do
local _, _, _, numSpells = GetSpellTabInfo(i);
for j = 1, numSpells do
local spellName = GetSpellName(id, "spell");
local types = debuffTypeCureSpells[playerClass][spellName]
if types then
for _, type in ipairs(types) do
trackedDebuffTypes[type] = 1
end
end
id = id + 1
end
end
end
HealersMateSettings.TrackedDebuffTypesSet = trackedDebuffTypes
trackedDebuffTypes = util.ToArray(trackedDebuffTypes)
HealersMateSettings.TrackedDebuffTypes = trackedDebuffTypes
end
function HealersMateSettings.SetDefaults()
if not HMOptions then
HMOptions = {}
end
local OPTIONS_VERSION = 2
local isHealer = util.IsHealerClass("player")
local isManaUser = util.ClassPowerTypes[util.GetClass("player")] == "mana"
do
local defaults = {
["ShowTargets"] = {
["Friendly"] = isHealer,
["Hostile"] = false
},
["AlwaysShowTargetFrame"] = false,
["AutoTarget"] = false,
["FrameDrag"] = {
["MoveAll"] = false,
["AltMoveKey"] = "Shift"
},
["DisablePartyFrames"] = {
["InParty"] = false,
["InRaid"] = false
},
["SpellsTooltip"] = {
["Enabled"] = isHealer,
["ShowManaCost"] = false,
["ShowManaPercentCost"] = true,
["HideCastsAbove"] = 3,
["CriticalCastsLevel"] = 3,
["AbbreviatedKeys"] = false,
["ColoredKeys"] = true,
["ShowPowerBar"] = true,
["ShowPowerAs"] = isManaUser and "Power %" or "Power" -- "Power", "Power/Max Power", "Power %"
},
["ShowAuraTimesAt"] = {
["Short"] = 5, -- <1 min
["Medium"] = 10, -- <=2 min
["Long"] = 60 * 2 -- >2 min
},
["CastWhen"] = "Mouse Up", -- Mouse Up, Mouse Down
["AutoResurrect"] = HealersMate.ResurrectionSpells[util.GetClass("player")] ~= nil,
["UseHealPredictions"] = true,
["SetMouseover"] = true,
["TestUI"] = false,
["Hidden"] = false,
["ChosenProfiles"] = {
["Party"] = "Default",
["Pets"] = "Default",
["Raid"] = "Small",
["Raid Pets"] = "Small",
["Target"] = "Long",
["Focus"] = "Default"
},
["Scripts"] = {
["OnLoad"] = "",
["OnPostLoad"] = ""
},
["OptionsVersion"] = OPTIONS_VERSION
}
local optionsUpgrades = {
{
version = 2,
upgrade = function(self, options)
local upgraded = util.CloneTable(options, true)
if options["ShowSpellsTooltip"] ~= nil then
if not options["SpellsTooltip"] then
upgraded["SpellsTooltip"] = {}
end
upgraded["SpellsTooltip"]["Enabled"] = options["ShowSpellsTooltip"]
upgraded["ShowSpellsTooltip"] = nil
end
if options["ChosenProfiles"] ~= nil then
local groupNames = {"Party", "Pets", "Raid", "Raid Pets", "Target"}
local changedProfileNames = {
["Compact"] = "Default",
["Compact (Small)"] = "Small",
["Compact (Short Bar)"] = "Default (Short Bar)"
}
for _, name in ipairs(groupNames) do
local currentlySelected = options["ChosenProfiles"][name]
if changedProfileNames[currentlySelected] then
upgraded["ChosenProfiles"][name] = changedProfileNames[currentlySelected]
end
end
end
upgraded["OptionsVersion"] = self.version
return upgraded
end,
shouldUpgrade = function(self, options)
return options.OptionsVersion < self.version
end
}
}
if HMOptions.OptionsVersion and HMOptions.OptionsVersion < OPTIONS_VERSION then
for _, upgrade in ipairs(optionsUpgrades) do
if upgrade:shouldUpgrade(HMOptions) then
local prevVersion = HMOptions.OptionsVersion
HMOptions = upgrade:upgrade(HMOptions)
DEFAULT_CHAT_FRAME:AddMessage("[HealersMate] Upgraded options from version "..
prevVersion.." to "..upgrade.version)
end
end
end
for field, value in pairs(defaults) do
if HMOptions[field] == nil then
if type(value) == "table" then
HMOptions[field] = HMUtil.CloneTable(value, true)
else
HMOptions[field] = value
end
elseif type(value) == "table" then
for field2, value2 in pairs(value) do
if HMOptions[field][field2] == nil then
if type(value2) == "table" then
HMOptions[field][field2] = HMUtil.CloneTable(value2, true)
else
HMOptions[field][field2] = value2
end
end
end
end
end
end
end
-- This file needs serious cleaning and refactoring
setmetatable(HealersMateSettings, {__index = getfenv(1)})
setfenv(1, HealersMateSettings)
TrackedBuffs = nil -- Default tracked is variable based on class
TrackedDebuffs = nil -- Default tracked is variable based on class
TrackedDebuffTypes = {} -- Default tracked is variable based on class
-- Buffs/debuffs that significantly modify healing
TrackedHealingBuffs = {"Amplify Magic", "Dampen Magic"}
TrackedHealingDebuffs = {"Mortal Strike", "Wound Poison", "Curse of the Deadwood", "Veil of Shadow", "Gehennas' Curse",
"Necrotic Poison", "Blood Fury", "Necrotic Aura",
"Shadowbane Curse" -- Turtle WoW
}
do
-- Tracked buffs for all classes
local defaultTrackedBuffs = {
"Blessing of Protection", "Hand of Protection", "Divine Protection", "Divine Shield", "Divine Intervention", -- Paladin
"Bulwark of the Righteous", "Blessing of Sacrifice", "Hand of Sacrifice",
"Power Infusion", "Spirit of Redemption", "Inner Focus", "Abolish Disease", "Power Word: Shield", -- Priest
"Shield Wall", "Recklessness", "Last Stand", -- Warrior
"Evasion", "Vanish", -- Rogue
"Deterrence", "Feign Death", "Mend Pet", -- Hunter
"Frenzied Regeneration", "Innervate", "Abolish Poison", -- Druid
"Soulstone Resurrection", "Hellfire", -- Warlock
"Ice Block", "Evocation", "Ice Barrier", "Mana Shield", -- Mage
"Quel'dorei Meditation", "Grace of the Sunwell", -- Racial
"First Aid", "Food", "Drink" -- Generic
}
-- Tracked buffs for specific classes
local defaultClassTrackedBuffs = {
["PALADIN"] = {"Blessing of Wisdom", "Blessing of Might", "Blessing of Salvation", "Blessing of Sanctuary",
"Blessing of Kings", "Greater Blessing of Wisdom", "Greater Blessing of Might",
"Greater Blssing of Salvation", "Greater Blessing of Sanctuary", "Greater Blessing of Kings", "Daybreak",
"Blessing of Freedom", "Hand of Freedom", "Redoubt", "Holy Shield"},
["PRIEST"] = {"Prayer of Fortitude", "Power Word: Fortitude", "Prayer of Spirit", "Divine Spirit",
"Prayer of Shadow Protection", "Shadow Protection", "Holy Champion", "Champion's Grace", "Empower Champion",
"Fear Ward", "Inner Fire", "Renew", "Lightwell Renew", "Inspiration",
"Fade", "Spirit Tap"},
["WARRIOR"] = {"Battle Shout"},
["DRUID"] = {"Gift of the Wild", "Mark of the Wild", "Thorns", "Rejuvenation", "Regrowth"},
["SHAMAN"] = {"Water Walking", "Healing Way", "Ancestral Fortitude"},
["MAGE"] = {"Arcane Brilliance", "Arcane Intellect", "Frost Armor", "Ice Armor", "Mage Armor"},
["WARLOCK"] = {"Demon Armor", "Demon Skin", "Unending Breath", "Shadow Ward", "Fire Shield"},
["HUNTER"] = {"Rapid Fire", "Quick Shots", "Quick Strikes", "Aspect of the Pack",
"Aspect of the Wild", "Bestial Wrath", "Feed Pet Effect"}
}
local trackedBuffs = defaultClassTrackedBuffs[playerClass] or {}
util.AppendArrayElements(trackedBuffs, TrackedHealingBuffs)
util.AppendArrayElements(trackedBuffs, defaultTrackedBuffs)
trackedBuffs = util.ToSet(trackedBuffs, true)
-- Tracked debuffs for all classes
local defaultTrackedDebuffs = {
"Forbearance", -- Paladin
"Death Wish", -- Warrior
"Enrage", -- Druid
"Recently Bandaged", "Resurrection Sickness", "Ghost", -- Generic
"Deafening Screech" -- Applied by mobs
}
-- Tracked debuffs for specific classes
local defaultClassTrackedDebuffs = {
["PRIEST"] = {"Weakened Soul"}
}
local trackedDebuffs = defaultClassTrackedDebuffs[playerClass] or {}
util.AppendArrayElements(trackedDebuffs, TrackedHealingDebuffs)
util.AppendArrayElements(trackedDebuffs, defaultTrackedDebuffs)
trackedDebuffs = util.ToSet(trackedDebuffs, true)
TrackedBuffs = trackedBuffs
TrackedDebuffs = trackedDebuffs
TrackedHealingBuffs = util.ToSet(TrackedHealingBuffs)
TrackedHealingDebuffs = util.ToSet(TrackedHealingDebuffs)
end
ShowEmptySpells = true
IgnoredEmptySpells = {--[["MiddleButton"]]}
IgnoredEmptySpells = util.ToSet(IgnoredEmptySpells)
CustomButtonOrder = {
"LeftButton",
"MiddleButton",
"RightButton",
"Button5",
"Button4"
}
CustomButtonNames = {
["Button4"] = "Back",
["Button5"] = "Forward"
}
DebuffTypeColors = {
["Magic"] = {0.35, 0.35, 1},
["Curse"] = {0.5, 0, 1},
["Disease"] = {0.45, 0.35, 0.16},
["Poison"] = {0.6, 0.7, 0}
}
EditedSpells = {}
SpellsContext = {}
function GetSelectedProfileName(frame)
local selected = HMOptions.ChosenProfiles[frame]
if not HMDefaultProfiles[selected] then
selected = "Default"
end
return selected
end
function GetSelectedProfile(frame)
return HMDefaultProfiles[GetSelectedProfileName(frame)]
end
function InitSettings()
--Used too set custom tooltip information when you mouse over things; like in the settings checkboxes
local MyTooltip = CreateFrame("GameTooltip", "HMSettingsInfoTooltip", UIParent, "GameTooltipTemplate")
--Fucntion that is called to set the text of a custom tooltip and where to display it.
local function ShowTooltip(AttachTo, TooltipText1, TooltipText2)
MyTooltip:SetOwner(AttachTo, "ANCHOR_RIGHT")
MyTooltip:SetPoint("RIGHT", AttachTo, "LEFT", 0, 0)
MyTooltip:AddLine(TooltipText1, 0.3, 1, 0.3)
if TooltipText2 ~= "" then
MyTooltip:AddLine(TooltipText2, 0.5, 1, 0.5)
end
HMSettingsInfoTooltipTextLeft1:SetFont("Fonts\\FRIZQT__.TTF", 12, "OUTLINE")
HMSettingsInfoTooltipTextLeft2:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
MyTooltip:Show()
end
--Used to hide custom tooltips
local function HideTooltip()
MyTooltip:Hide()
end
local function ApplyTooltip(component, header, footer)
component:SetScript("OnEnter", function()
ShowTooltip(component, header, footer)
end)
component:SetScript("OnLeave", HideTooltip)
end
-- Create the main SETTINGS frame
local container = CreateFrame("Frame", "HM_SettingsContainer", UIParent)
container:SetToplevel(true)
container:SetFrameLevel(15)
container:SetWidth(425) -- width
container:SetHeight(475) -- height
container:SetPoint("CENTER", UIParent, "CENTER")
--container:SetBackdrop({bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"})
container:EnableMouse(true)
container:SetMovable(true)
container:Hide()
if Aero then
Aero:RegisterAddon("HealersMate", "HM_SettingsContainer")
end
container:SetScript("OnMouseDown", function()
local button = arg1
if button == "LeftButton" and not container.isMoving then
container:StartMoving();
container.isMoving = true;
end
end)
container:SetScript("OnMouseUp", function()
local button = arg1
if button == "LeftButton" and container.isMoving then
container:StopMovingOrSizing();
container.isMoving = false;
end
end)
table.insert(UISpecialFrames, container:GetName()) -- Allows frame to the closed with escape
local containerBorder = CreateFrame("Frame", "$parentBorder", container)
containerBorder:SetWidth(450) -- width
containerBorder:SetHeight(500) -- height
containerBorder:SetPoint("CENTER", container, "CENTER")
containerBorder:SetBackdrop({bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 32,
insets = { left = 8, right = 8, top = 8, bottom = 8 }, tile = true, tileSize = 32})
containerBorder.title = CreateFrame("Frame", container:GetName().."Title", containerBorder)
containerBorder.title:SetPoint("TOP", containerBorder, "TOP", 0, 12)
containerBorder.title:SetWidth(350)
containerBorder.title:SetHeight(64)
containerBorder.title.header = containerBorder.title:CreateTexture(nil, "MEDIUM")
containerBorder.title.header:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
containerBorder.title.header:SetAllPoints()
containerBorder.title.text = containerBorder.title:CreateFontString(nil, "HIGH", "GameFontNormal")
containerBorder.title.text:SetText("HealersMate Settings")
containerBorder.title.text:SetPoint("TOP", 0, -14)
function resetSpells()
EditedSpells = {}
for context, spells in pairs(HMSpells) do
EditedSpells[context] = {}
local copy = EditedSpells[context]
for modifier, buttons in pairs(spells) do
copy[modifier] = {}
for button, spell in pairs(buttons) do
copy[modifier][button] = spell
end
end
end
SpellsContext = EditedSpells[UIDropDownMenu_GetSelectedName(targetDropdown)]
end
-- Main Settings Page - Close Button
local closeButton = CreateFrame("Button", nil, container, "UIPanelCloseButton")
closeButton:SetPoint("TOPRIGHT", container, "TOPRIGHT", -5, -5)
closeButton:SetScript("OnClick", function() container:Hide() end)
local frameNames = {}
local frames = {}
local function addFrame(name, frame)
table.insert(frameNames, name)
frames[name] = frame
end
local spellsFrame = CreateFrame("Frame", "spellsFrame", container)
addFrame("Spells", spellsFrame)
spellsFrame:SetWidth(400)
spellsFrame:SetHeight(440)
spellsFrame:SetPoint("CENTER", container, "CENTER", 0, -20)
local spellsFrameOldShow = spellsFrame.Show
spellsFrame.Show = function(self)
spellsFrameOldShow(self)
resetSpells()
end
spellsFrame:Hide()
local optionsScrollFrame = CreateFrame("ScrollFrame", "$parentOptionsScrollFrame", container, "UIPanelScrollFrameTemplate")
optionsScrollFrame:SetWidth(400) -- width
optionsScrollFrame:SetHeight(440) -- height
optionsScrollFrame:SetPoint("CENTER", container, "CENTER", -10, -20)
optionsScrollFrame:Hide() -- Initially hidden
local optionsFrame = CreateFrame("Frame", "$parentOptionsFrame", optionsScrollFrame)
optionsFrame:SetWidth(400) -- width
optionsFrame:SetHeight(440) -- height
--optionsFrame:SetPoint("CENTER", container, "CENTER", -200, 0)
optionsScrollFrame:SetScrollChild(optionsFrame)
optionsScrollFrame:Hide()
addFrame("Options", optionsScrollFrame)
local xOffset = 140
local xDropdownOffset = 30
local yOffset = 0
local yCheckboxOffset = -2
local yDropdownOffset = -5
local yInterval = -30
do
local TargetSettingsLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
TargetSettingsLabel:SetPoint("TOPLEFT", optionsFrame, "TOPLEFT", 0, yOffset)
TargetSettingsLabel:SetFont("Fonts\\FRIZQT__.TTF", 14)
TargetSettingsLabel:SetWidth(optionsFrame:GetWidth())
TargetSettingsLabel:SetJustifyH("CENTER")
TargetSettingsLabel:SetText("Target Settings")
end
yOffset = yOffset + yInterval
do
local ShowTargetLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
ShowTargetLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
ShowTargetLabel:SetText("Always Show Target")
local ShowTargetCheckbox = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
ShowTargetCheckbox:SetPoint("LEFT", ShowTargetLabel, "RIGHT", 5, yCheckboxOffset)
ShowTargetCheckbox:SetWidth(20) -- width
ShowTargetCheckbox:SetHeight(20) -- height
ShowTargetCheckbox:SetChecked(HMOptions.AlwaysShowTargetFrame)
ShowTargetCheckbox:SetScript("OnClick", function()
HMOptions.AlwaysShowTargetFrame = ShowTargetCheckbox:GetChecked() == 1
HealersMate.CheckTarget()
end)
ApplyTooltip(ShowTargetCheckbox, "Always show the target frame, regardless of whether you have a target or not")
end
yOffset = yOffset - 20
do
-- Label for the checkbox
local CheckboxShowTargetLabel = optionsFrame:CreateFontString("CheckboxShowTargetLabel", "OVERLAY", "GameFontNormal")
CheckboxShowTargetLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
CheckboxShowTargetLabel:SetText("Show Targets:")
-- Label for the "Friendly" checkbox
local CheckboxFriendlyLabel = optionsFrame:CreateFontString("CheckboxFriendlyLabel", "OVERLAY", "GameFontNormal")
CheckboxFriendlyLabel:SetPoint("LEFT", CheckboxShowTargetLabel, "RIGHT", 20, 0)
CheckboxFriendlyLabel:SetText("Friendly")
-- Create the "Friendly" checkbox
local CheckboxFriendly = CreateFrame("CheckButton", "$parentTargetFriendly", optionsFrame, "UICheckButtonTemplate")
CheckboxFriendly:SetPoint("LEFT", CheckboxFriendlyLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxFriendly:SetWidth(20) -- width
CheckboxFriendly:SetHeight(20) -- height
CheckboxFriendly:SetChecked(HMOptions.ShowTargets.Friendly)
CheckboxFriendly:SetScript("OnClick", function()
HMOptions.ShowTargets.Friendly = CheckboxFriendly:GetChecked() == 1
HealersMate.CheckTarget()
end)
ApplyTooltip(CheckboxFriendly, "Show the Target frame when targeting friendlies",
"No effect if Always Show Target is checked")
-- Label for the "Enemy" checkbox
local CheckboxEnemyLabel = optionsFrame:CreateFontString("CheckboxEnemyLabel", "OVERLAY", "GameFontNormal")
CheckboxEnemyLabel:SetPoint("LEFT", CheckboxFriendly, "RIGHT", 10, -yCheckboxOffset)
CheckboxEnemyLabel:SetText("Hostile")
-- Create the "Enemy" checkbox
local CheckboxHostile = CreateFrame("CheckButton", "$parentTargetHostile", optionsFrame, "UICheckButtonTemplate")
CheckboxHostile:SetPoint("LEFT", CheckboxEnemyLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxHostile:SetWidth(20) -- width
CheckboxHostile:SetHeight(20) -- height
CheckboxHostile:SetChecked(HMOptions.ShowTargets.Hostile)
CheckboxHostile:SetScript("OnClick", function()
HMOptions.ShowTargets.Hostile = CheckboxHostile:GetChecked() == 1
HealersMate.CheckTarget()
end)
ApplyTooltip(CheckboxHostile, "Show the Target frame when targeting hostiles",
"No effect if Always Show Target is checked")
end
yOffset = yOffset - 30
local CheckboxAutoTargetLabel = optionsFrame:CreateFontString("CheckboxAutoTargetLabel", "OVERLAY", "GameFontNormal")
CheckboxAutoTargetLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
CheckboxAutoTargetLabel:SetText("Target On Cast")
local CheckboxAutoTarget = CreateFrame("CheckButton", "$parentAutoTarget", optionsFrame, "UICheckButtonTemplate")
CheckboxAutoTarget:SetPoint("LEFT", CheckboxAutoTargetLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxAutoTarget:SetWidth(20) -- width
CheckboxAutoTarget:SetHeight(20) -- height
CheckboxAutoTarget:SetChecked(HMOptions.AutoTarget)
CheckboxAutoTarget:SetScript("OnClick", function()
HMOptions.AutoTarget = CheckboxAutoTarget:GetChecked() == 1
end)
ApplyTooltip(CheckboxAutoTarget, "If enabled, casting a spell on a player will also cause you to target them")
yOffset = yOffset - 30
do
local CastingSettingsLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
CastingSettingsLabel:SetPoint("TOPLEFT", optionsFrame, "TOPLEFT", 0, yOffset)
CastingSettingsLabel:SetFont("Fonts\\FRIZQT__.TTF", 14)
CastingSettingsLabel:SetWidth(optionsFrame:GetWidth())
CastingSettingsLabel:SetJustifyH("CENTER")
CastingSettingsLabel:SetText("Casting Settings")
end
yOffset = yOffset - 30
do
local AutoResurrectLabel = optionsFrame:CreateFontString("CheckboxShowSpellsTooltipLabel", "OVERLAY", "GameFontNormal")
AutoResurrectLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
AutoResurrectLabel:SetText("Auto Resurrect")
local AutoResurrectCheckbox = CreateFrame("CheckButton", "$parentShowSpellsTooltip", optionsFrame, "UICheckButtonTemplate")
AutoResurrectCheckbox:SetPoint("LEFT", AutoResurrectLabel, "RIGHT", 5, yCheckboxOffset)
AutoResurrectCheckbox:SetWidth(20) -- width
AutoResurrectCheckbox:SetHeight(20) -- height
AutoResurrectCheckbox:SetChecked(HMOptions.AutoResurrect)
AutoResurrectCheckbox:SetScript("OnClick", function()
HMOptions.AutoResurrect = AutoResurrectCheckbox:GetChecked() == 1
end)
ApplyTooltip(AutoResurrectCheckbox, "Cast your resurrection spell when clicking on a dead target instead of bound spells",
"Special binds, such as \"Target\", can still be used")
end
yOffset = yOffset - 30
do
local castWhenDropdown = CreateFrame("Frame", "$parentCastWhenDropdown", optionsFrame, "UIDropDownMenuTemplate")
castWhenDropdown:Show()
--castWhenDropdown:SetPoint("TOP", -65, -100)
castWhenDropdown:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset + xDropdownOffset, yOffset + yDropdownOffset)
local label = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
label:SetPoint("RIGHT", castWhenDropdown, "RIGHT", -30, 5)
label:SetText("Cast When")
local states = {"Mouse Up", "Mouse Down"}
local options = {}
for _, key in ipairs(states) do
table.insert(options, {
text = key,
arg1 = key,
func = function(targetArg)
UIDropDownMenu_SetSelectedName(castWhenDropdown, targetArg, false)
HMOptions.CastWhen = targetArg
for _, ui in ipairs(HealersMate.AllUnitFrames) do
ui:RegisterClicks()
end
end
})
end
UIDropDownMenu_Initialize(castWhenDropdown, function(self, level)
for _, targetOption in ipairs(options) do
targetOption.checked = false
UIDropDownMenu_AddButton(targetOption)
end
if UIDropDownMenu_GetSelectedName(castWhenDropdown) == nil then
UIDropDownMenu_SetSelectedName(castWhenDropdown, HMOptions.CastWhen, false)
end
end)
end
yOffset = yOffset - 30
do
local SpellsTooltipSettingsLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
SpellsTooltipSettingsLabel:SetPoint("TOPLEFT", optionsFrame, "TOPLEFT", 0, yOffset)
SpellsTooltipSettingsLabel:SetFont("Fonts\\FRIZQT__.TTF", 14)
SpellsTooltipSettingsLabel:SetWidth(optionsFrame:GetWidth())
SpellsTooltipSettingsLabel:SetJustifyH("CENTER")
SpellsTooltipSettingsLabel:SetText("Spells Tooltip Settings")
end
yOffset = yOffset - 30
do
local CheckboxShowSpellsTooltipLabel = optionsFrame:CreateFontString("CheckboxShowSpellsTooltipLabel", "OVERLAY", "GameFontNormal")
CheckboxShowSpellsTooltipLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
CheckboxShowSpellsTooltipLabel:SetText("Show Spells Tooltip")
local CheckboxShowSpellsTooltip = CreateFrame("CheckButton", "$parentShowSpellsTooltip", optionsFrame, "UICheckButtonTemplate")
CheckboxShowSpellsTooltip:SetPoint("LEFT", CheckboxShowSpellsTooltipLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxShowSpellsTooltip:SetWidth(20) -- width
CheckboxShowSpellsTooltip:SetHeight(20) -- height
CheckboxShowSpellsTooltip:SetChecked(HMOptions.SpellsTooltip.Enabled)
CheckboxShowSpellsTooltip:SetScript("OnClick", function()
HMOptions.SpellsTooltip.Enabled = CheckboxShowSpellsTooltip:GetChecked() == 1
end)
ApplyTooltip(CheckboxShowSpellsTooltip, "Show the spells tooltip when hovering over frames")
end
yOffset = yOffset - 30
do
local ShowPercManaCostLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
ShowPercManaCostLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
ShowPercManaCostLabel:SetText("Show % Mana Cost")
local ShowPercManaCostCheckbox = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
ShowPercManaCostCheckbox:SetPoint("LEFT", ShowPercManaCostLabel, "RIGHT", 5, yCheckboxOffset)
ShowPercManaCostCheckbox:SetWidth(20) -- width
ShowPercManaCostCheckbox:SetHeight(20) -- height
ShowPercManaCostCheckbox:SetChecked(HMOptions.SpellsTooltip.ShowManaPercentCost)
ShowPercManaCostCheckbox:SetScript("OnClick", function()
HMOptions.SpellsTooltip.ShowManaPercentCost = ShowPercManaCostCheckbox:GetChecked() == 1
end)
ApplyTooltip(ShowPercManaCostCheckbox, "Show the percent mana cost in the spells tooltip", "Does nothing for non-mana users")
local ShowManaCostLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
ShowManaCostLabel:SetPoint("LEFT", ShowPercManaCostCheckbox, "RIGHT", 20, -yCheckboxOffset)
ShowManaCostLabel:SetText("Show # Mana Cost")
local ShowManaCostCheckbox = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
ShowManaCostCheckbox:SetPoint("LEFT", ShowManaCostLabel, "RIGHT", 5, yCheckboxOffset)
ShowManaCostCheckbox:SetWidth(20) -- width
ShowManaCostCheckbox:SetHeight(20) -- height
ShowManaCostCheckbox:SetChecked(HMOptions.SpellsTooltip.ShowManaCost)
ShowManaCostCheckbox:SetScript("OnClick", function()
HMOptions.SpellsTooltip.ShowManaCost = ShowManaCostCheckbox:GetChecked() == 1
end)
ApplyTooltip(ShowManaCostCheckbox, "Show the number mana cost in the spells tooltip", "Does nothing for non-mana users")
end
yOffset = yOffset - 30
do
local HideCastsAboveLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
HideCastsAboveLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
HideCastsAboveLabel:SetText("Hide Casts Above")
local HideCastsAboveEditBox = CreateFrame("Editbox", "$parentHideCastsAboveEditBox", optionsFrame, "InputBoxTemplate")
HideCastsAboveEditBox:SetPoint("LEFT", HideCastsAboveLabel, "RIGHT", 10, yCheckboxOffset)
HideCastsAboveEditBox:SetWidth(30)
HideCastsAboveEditBox:SetHeight(20)
HideCastsAboveEditBox:SetText(tostring(HMOptions.SpellsTooltip.HideCastsAbove))
HideCastsAboveEditBox:SetAutoFocus(false)
HideCastsAboveEditBox:SetScript("OnTextChanged" , function()
local num = tonumber(this:GetText())
if not num then
return
end
num = math.floor(num)
HMOptions.SpellsTooltip.HideCastsAbove = num
end)
HideCastsAboveEditBox:SetScript("OnEnterPressed", function()
this:ClearFocus()
end)
HideCastsAboveEditBox:SetScript("OnEditFocusLost", function()
this:SetText(tostring(HMOptions.SpellsTooltip.HideCastsAbove))
end)
ApplyTooltip(HideCastsAboveEditBox, "Hides the cast count for a spell if above this threshold")
local CriticalCastsLevelLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
CriticalCastsLevelLabel:SetPoint("LEFT", HideCastsAboveEditBox, "RIGHT", 20, 0)
CriticalCastsLevelLabel:SetText("Critical Casts Level")
local CriticalCastsLevelEditBox = CreateFrame("Editbox", "$parentCriticalCastsLevelEditBox", optionsFrame, "InputBoxTemplate")
CriticalCastsLevelEditBox:SetPoint("LEFT", CriticalCastsLevelLabel, "RIGHT", 10, 0)
CriticalCastsLevelEditBox:SetWidth(30)
CriticalCastsLevelEditBox:SetHeight(20)
CriticalCastsLevelEditBox:SetText(tostring(HMOptions.SpellsTooltip.CriticalCastsLevel))
CriticalCastsLevelEditBox:SetAutoFocus(false)
CriticalCastsLevelEditBox:SetScript("OnTextChanged" , function()
local num = tonumber(this:GetText())
if not num then
return
end
num = math.floor(num)
HMOptions.SpellsTooltip.CriticalCastsLevel = num
end)
CriticalCastsLevelEditBox:SetScript("OnEnterPressed", function()
this:ClearFocus()
end)
CriticalCastsLevelEditBox:SetScript("OnEditFocusLost", function()
this:SetText(tostring(HMOptions.SpellsTooltip.CriticalCastsLevel))
end)
ApplyTooltip(CriticalCastsLevelEditBox, "At how many casts to show yellow casts text")
end
yOffset = yOffset - 30
do
local AbbreviateKeysLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
AbbreviateKeysLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
AbbreviateKeysLabel:SetText("Shortened Keys")
local AbbreviateKeysCheckbox = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
AbbreviateKeysCheckbox:SetPoint("LEFT", AbbreviateKeysLabel, "RIGHT", 5, yCheckboxOffset)
AbbreviateKeysCheckbox:SetWidth(20) -- width
AbbreviateKeysCheckbox:SetHeight(20) -- height
AbbreviateKeysCheckbox:SetChecked(HMOptions.SpellsTooltip.AbbreviatedKeys)
AbbreviateKeysCheckbox:SetScript("OnClick", function()
HMOptions.SpellsTooltip.AbbreviatedKeys = AbbreviateKeysCheckbox:GetChecked() == 1
end)
ApplyTooltip(AbbreviateKeysCheckbox, "Shortens keys to 1 letter")
local ColorKeysLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
ColorKeysLabel:SetPoint("LEFT", AbbreviateKeysCheckbox, "RIGHT", 20, -yCheckboxOffset)
ColorKeysLabel:SetText("Colored Keys")
local ColorKeysCheckbox = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
ColorKeysCheckbox:SetPoint("LEFT", ColorKeysLabel, "RIGHT", 5, yCheckboxOffset)
ColorKeysCheckbox:SetWidth(20) -- width
ColorKeysCheckbox:SetHeight(20) -- height
ColorKeysCheckbox:SetChecked(HMOptions.SpellsTooltip.ColoredKeys)
ColorKeysCheckbox:SetScript("OnClick", function()
HMOptions.SpellsTooltip.ColoredKeys = ColorKeysCheckbox:GetChecked() == 1
end)
ApplyTooltip(ColorKeysCheckbox, "Color code the keys as opposed to all being white")
end
yOffset = yOffset - 30
do
local showPowerAsDropdown = CreateFrame("Frame", "$parentShowPowerAsDropdown", optionsFrame, "UIDropDownMenuTemplate")
showPowerAsDropdown:Show()
--castWhenDropdown:SetPoint("TOP", -65, -100)
showPowerAsDropdown:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset + xDropdownOffset, yOffset + yDropdownOffset)
local label = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
label:SetPoint("RIGHT", showPowerAsDropdown, "RIGHT", -30, 5)
label:SetText("Show Power As")
local states = {"Power", "Power/Max Power", "Power %"}
local options = {}
for _, key in ipairs(states) do
table.insert(options, {
text = key,
arg1 = key,
func = function(targetArg)
UIDropDownMenu_SetSelectedName(showPowerAsDropdown, targetArg, false)
HMOptions.SpellsTooltip.ShowPowerAs = targetArg
end
})
end
UIDropDownMenu_Initialize(showPowerAsDropdown, function(self, level)
for _, targetOption in ipairs(options) do
targetOption.checked = false
UIDropDownMenu_AddButton(targetOption)
end
if UIDropDownMenu_GetSelectedName(showPowerAsDropdown) == nil then
UIDropDownMenu_SetSelectedName(showPowerAsDropdown, HMOptions.SpellsTooltip.ShowPowerAs, false)
end
end)
end
yOffset = yOffset - 30
do
local ShowPowerBarLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
ShowPowerBarLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
ShowPowerBarLabel:SetText("Show Power Bar")
local ShowPowerBarCheckbox = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
ShowPowerBarCheckbox:SetPoint("LEFT", ShowPowerBarLabel, "RIGHT", 5, yCheckboxOffset)
ShowPowerBarCheckbox:SetWidth(20) -- width
ShowPowerBarCheckbox:SetHeight(20) -- height
ShowPowerBarCheckbox:SetChecked(HMOptions.SpellsTooltip.ShowPowerBar)
ShowPowerBarCheckbox:SetScript("OnClick", function()
HMOptions.SpellsTooltip.ShowPowerBar = ShowPowerBarCheckbox:GetChecked() == 1
if HMOptions.SpellsTooltip.ShowPowerBar then
HealersMate.SpellsTooltipPowerBar:Show()
else
HealersMate.SpellsTooltipPowerBar:Hide()
end
end)
ApplyTooltip(ShowPowerBarCheckbox, "Show a power bar in the spells tooltip")
-- Disable power bar now if it's disabled
if not HMOptions.SpellsTooltip.ShowPowerBar then
HealersMate.SpellsTooltipPowerBar:Hide()
end
end
yOffset = yOffset - 30
do
local OtherSettingsLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
OtherSettingsLabel:SetPoint("TOPLEFT", optionsFrame, "TOPLEFT", 0, yOffset)
OtherSettingsLabel:SetFont("Fonts\\FRIZQT__.TTF", 14)
OtherSettingsLabel:SetWidth(optionsFrame:GetWidth())
OtherSettingsLabel:SetJustifyH("CENTER")
OtherSettingsLabel:SetText("Other Settings")
end
yOffset = yOffset - 30
do
local CheckboxMoveAllLabel = optionsFrame:CreateFontString("$parentMoveAllLabel", "OVERLAY", "GameFontNormal")
CheckboxMoveAllLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
CheckboxMoveAllLabel:SetText("Drag All Frames")
local CheckboxMoveAll = CreateFrame("CheckButton", "$parentMoveAll", optionsFrame, "UICheckButtonTemplate")
CheckboxMoveAll:SetPoint("LEFT", CheckboxMoveAllLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxMoveAll:SetWidth(20)
CheckboxMoveAll:SetHeight(20)
CheckboxMoveAll:SetChecked(HMOptions.FrameDrag.MoveAll)
CheckboxMoveAll:SetScript("OnClick", function()
HMOptions.FrameDrag.MoveAll = CheckboxMoveAll:GetChecked() == 1
end)
ApplyTooltip(CheckboxMoveAll, "If enabled, all frames will be moved when dragging", "Use the inverse key to move a single frame; Opposite effect if disabled")
local inverseKeyDropdown = CreateFrame("Frame", "$parentMoveAllInverseKeyDropdown", optionsFrame, "UIDropDownMenuTemplate")
inverseKeyDropdown:Show()
inverseKeyDropdown:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset + xDropdownOffset + 110, yOffset + yDropdownOffset)
local label = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
label:SetPoint("RIGHT", inverseKeyDropdown, "RIGHT", -30, 5)
label:SetText("Inverse Key")
local keys = {"Shift", "Control", "Alt"}
local options = {}
for _, key in ipairs(keys) do
table.insert(options, {
text = key,
arg1 = key,
func = function(targetArg)
UIDropDownMenu_SetSelectedName(inverseKeyDropdown, targetArg, false)
HMOptions.FrameDrag.AltMoveKey = targetArg
end
})
end
UIDropDownMenu_Initialize(inverseKeyDropdown, function(self, level)
for _, targetOption in ipairs(options) do
targetOption.checked = false
UIDropDownMenu_AddButton(targetOption)
end
if UIDropDownMenu_GetSelectedName(inverseKeyDropdown) == nil then
UIDropDownMenu_SetSelectedName(inverseKeyDropdown, HMOptions.FrameDrag.AltMoveKey, false)
end
end)
end
yOffset = yOffset - 30
do
local CheckboxHealPredictLabel = optionsFrame:CreateFontString("$parentHealPredictionsLabel", "OVERLAY", "GameFontNormal")
CheckboxHealPredictLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
CheckboxHealPredictLabel:SetText("Use Heal Predictions")
local CheckboxHealPredict = CreateFrame("CheckButton", "$parentHealPredictions", optionsFrame, "UICheckButtonTemplate")
CheckboxHealPredict:SetPoint("LEFT", CheckboxHealPredictLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxHealPredict:SetWidth(20)
CheckboxHealPredict:SetHeight(20)
CheckboxHealPredict:SetChecked(HMOptions.UseHealPredictions)
CheckboxHealPredict:SetScript("OnClick", function()
HMOptions.UseHealPredictions = CheckboxHealPredict:GetChecked() == 1
HealersMate.UpdateAllIncomingHealing()
end)
ApplyTooltip(CheckboxHealPredict, "See predictions on incoming healing",
"Improved predictions if using SuperWoW")
end
yOffset = yOffset - 30
do
-- Label for the checkbox
local HidePartyFramesLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
HidePartyFramesLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
HidePartyFramesLabel:SetText("Hide Party Frames:")
-- Label for the "Friendly" checkbox
local InPartyLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
InPartyLabel:SetPoint("LEFT", HidePartyFramesLabel, "RIGHT", 20, 0)
InPartyLabel:SetText("In Party")
-- Create the "Friendly" checkbox
local CheckboxInParty = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
CheckboxInParty:SetPoint("LEFT", InPartyLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxInParty:SetWidth(20) -- width
CheckboxInParty:SetHeight(20) -- height
CheckboxInParty:SetChecked(HMOptions.DisablePartyFrames.InParty)
CheckboxInParty:SetScript("OnClick", function()
HMOptions.DisablePartyFrames.InParty = CheckboxInParty:GetChecked() == 1
HealersMate.CheckPartyFramesEnabled()
end)
ApplyTooltip(CheckboxInParty, "Hide default party frames while in party", "This may cause issues with other addons")
-- Label for the "Enemy" checkbox
local InRaidLabel = optionsFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
InRaidLabel:SetPoint("LEFT", CheckboxInParty, "RIGHT", 10, -yCheckboxOffset)
InRaidLabel:SetText("In Raid")
-- Create the "Enemy" checkbox
local CheckboxInRaid = CreateFrame("CheckButton", nil, optionsFrame, "UICheckButtonTemplate")
CheckboxInRaid:SetPoint("LEFT", InRaidLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxInRaid:SetWidth(20) -- width
CheckboxInRaid:SetHeight(20) -- height
CheckboxInRaid:SetChecked(HMOptions.DisablePartyFrames.InRaid)
CheckboxInRaid:SetScript("OnClick", function()
HMOptions.DisablePartyFrames.InRaid = CheckboxInRaid:GetChecked() == 1
HealersMate.CheckPartyFramesEnabled()
end)
ApplyTooltip(CheckboxInRaid, "Hide default party frames while in raid", "This may cause issues with other addons")
end
yOffset = yOffset - 40
local superwow = util.IsSuperWowPresent()
do
local SuperWoWLabel = optionsFrame:CreateFontString("$parentSuperWoWLabel", "OVERLAY", "GameFontNormal")
SuperWoWLabel:SetPoint("TOPLEFT", optionsFrame, "TOPLEFT", 0, yOffset)
SuperWoWLabel:SetFont("Fonts\\FRIZQT__.TTF", 14)
SuperWoWLabel:SetWidth(optionsFrame:GetWidth())
SuperWoWLabel:SetJustifyH("CENTER")
SuperWoWLabel:SetText("SuperWoW Required Settings")
yOffset = yOffset - 20
local SuperWoWDetectedLabel = optionsFrame:CreateFontString("$parentSuperWoWDetectedLabel", "OVERLAY", "GameFontNormal")
SuperWoWDetectedLabel:SetPoint("TOPLEFT", optionsFrame, "TOPLEFT", 0, yOffset)
SuperWoWDetectedLabel:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
SuperWoWDetectedLabel:SetWidth(optionsFrame:GetWidth())
SuperWoWDetectedLabel:SetJustifyH("CENTER")
SuperWoWDetectedLabel:SetText(superwow and util.Colorize("SuperWoW Detected", 0.5, 1, 0.5) or
util.Colorize("SuperWoW Not Detected", 1, 0.6, 0.6))
end
yOffset = yOffset - 30
do
local CheckboxMouseoverLabel = optionsFrame:CreateFontString("$parentMouseoverLabel", "OVERLAY", "GameFontNormal")
CheckboxMouseoverLabel:SetPoint("RIGHT", optionsFrame, "TOPLEFT", xOffset, yOffset)
CheckboxMouseoverLabel:SetText("Set Mouseover")
local CheckboxMouseover = CreateFrame("CheckButton", "$parentMouseover", optionsFrame, "UICheckButtonTemplate")
CheckboxMouseover:SetPoint("LEFT", CheckboxMouseoverLabel, "RIGHT", 5, yCheckboxOffset)
CheckboxMouseover:SetWidth(20)
CheckboxMouseover:SetHeight(20)
CheckboxMouseover:SetChecked(HMOptions.SetMouseover)
if not superwow then