forked from nyyr/ArcHUD3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.lua
More file actions
1081 lines (1056 loc) · 28.9 KB
/
Config.lua
File metadata and controls
1081 lines (1056 loc) · 28.9 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
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
-- Locale object
local L = LibStub("AceLocale-3.0"):GetLocale("ArcHUD_Core")
local LM = LibStub("AceLocale-3.0"):GetLocale("ArcHUD_Module")
-- Ace config libs
local AceConfig = LibStub("AceConfig-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local AceConfigRegistry = LibStub("AceConfigRegistry-3.0")
-- List of profiles
local profilesTable = {}
local function ArcHUD_updateProfilesTable()
while #profilesTable > 1 do
table.remove(profilesTable)
end
local pt = ArcHUD.db:GetProfiles()
for i,p in ipairs(pt) do
if not (p == "profile") then
table.insert(profilesTable, p)
end
end
end
-- Debugging levels
-- 1 Warning
-- 2 Info
-- 3 Notice
-- 4 Off
local debugLevels = {"warn", "info", "notice", "off"}
local d_warn = 1
local d_info = 2
local d_notice = 3
local testSwitch = false
----------------------------------------------
-- Command line options
----------------------------------------------
ArcHUD.configOptionsTableCmd = {
type = "group",
name = "ArcHUD",
args = {
config = {
type = "execute",
name = "config",
desc = L["CMD_OPTS_FRAME"],
order = 0,
func = function()
AceConfigDialog:Open("ArcHUD_Core")
end,
},
modules = {
type = "execute",
name = "modules",
desc = L["CMD_OPTS_MODULES"],
order = 1,
func = function()
AceConfigDialog:Open("ArcHUD_Modules")
end,
},
custom = {
type = "execute",
name = "custom",
desc = L["CMD_OPTS_CUSTOM"],
order = 2,
func = function()
AceConfigDialog:Open("ArcHUD_CustomModules")
end,
},
toggle = {
type = "execute",
name = "toggle",
desc = L["CMD_OPTS_TOGGLE"],
order = 3,
func = function()
if ArcHUDFrame:IsVisible() then
ArcHUDFrame:Hide()
else
ArcHUDFrame:Show()
end
end,
},
reset = {
type = "group",
name = "reset",
desc = L["CMD_RESET"],
order = 4,
args = {
confirm = {
type = "execute",
name = "CONFIRM",
desc = L["CMD_RESET_CONFIRM"],
func = function()
ArcHUD:ResetOptionsConfirm()
end
}
}
},
debug = {
type = "select",
name = "debug",
desc = L["CMD_OPTS_DEBUG"],
order = 5,
values = {"warn", "info", "notice", "off"},
get = function()
return debugLevels[ArcHUD:GetDebugLevel() or 4]
end,
set = function(info, v)
if (v == 1) then
ArcHUD:SetDebugLevel(nil)
ArcHUD.db.profile.Debug = nil
else
ArcHUD:SetDebugLevel(v)
ArcHUD.db.profile.Debug = v
end
end,
},
--[[ perf = {
type = "execute",
name = "config",
desc = "Show performance infos on timers (developers only!)",
order = 10,
func = function()
ArcHUD:TimersPrintPerf()
end,
},
test = {
type = "execute",
name = "test",
desc = "Internal testing of some functions (developers only!)",
order = 11,
func = function()
if ArcHUD.UnitFrames then
if (not testSwitch) then
if not (ArcHUD.UnitFrames["target"]) then
ArcHUD:UF_Create("target")
end
for k,v in pairs(ArcHUD.UnitFrames) do
v:Show()
end
else
for k,v in pairs(ArcHUD.UnitFrames) do
v:Hide()
end
end
testSwitch = not testSwitch
end
end,
},]]
},
}
----------------------------------------------
-- Core options
----------------------------------------------
ArcHUD.configOptionsTableCore = {
type = "group",
name = L["TEXT"]["TITLE"],
args = {
info1 = {
type = "description",
name = L["Version"].." "..ArcHUD.version..", code name "..ArcHUD.codename,
order = 0,
},
info2 = {
type = "description",
name = L["Authors"]..": "..ArcHUD.authors,
order = 1,
},
header = {
type = "header",
name = L["TEXT"]["GENERAL"],
order = 2,
},
profiles = {
type = "group",
name = L["TEXT"]["PROFILES"],
order = 9,
args = {
selectProfile = {
type = "select",
name = L["TEXT"]["PROFILES_SELECT"],
desc = L["TOOLTIP"]["PROFILES_SELECT"],
order = 1,
values = profilesTable,
get = function (info)
local p = ArcHUD.db:GetCurrentProfile()
if p == "profile" then
return 1
else
for i,v in ipairs(profilesTable) do
if v == p then
return i
end
end
end
end,
set = function (info, value)
if value == 1 then
ArcHUD.db:SetProfile("profile")
else
ArcHUD.db:SetProfile(profilesTable[value])
end
end,
},
createProfile = {
type = "input",
name = L["TEXT"]["PROFILES_CREATE"],
desc = L["TOOLTIP"]["PROFILES_CREATE"],
order = 2,
get = function ()
return ""
end,
set = function (info, value)
if value and not (value == "") then
if value == "profile" then -- default profile
ArcHUD:Print(L["TEXT"]["PROFILES_EXISTS"])
return
end
for i,v in ipairs(profilesTable) do
if v == value then
ArcHUD:Print(L["TEXT"]["PROFILES_EXISTS"])
return
end
end
local oldprofile = ArcHUD.db:GetCurrentProfile()
ArcHUD.db:SetProfile(value)
ArcHUD.db:CopyProfile(oldprofile)
ArcHUD_updateProfilesTable()
end
end,
},
deleteProfile = {
type = "execute",
name = L["TEXT"]["PROFILES_DELETE"],
desc = L["TOOLTIP"]["PROFILES_DELETE"],
order = 3,
func = function ()
local oldprofile = ArcHUD.db:GetCurrentProfile()
if (oldprofile == "profile") then
ArcHUD:Print(L["TEXT"]["PROFILES_CANNOTDELETE"])
else
ArcHUD.db:SetProfile("profile") -- default profile
ArcHUD.db:DeleteProfile(oldprofile)
ArcHUD_updateProfilesTable()
end
end,
},
},
},
display = {
type = "group",
name = L["TEXT"]["DISPLAY"],
order = 10,
args = {
-- Player Frame
playerFrame = {
type = "toggle",
name = L["TEXT"]["PLAYERFRAME"],
desc = L["TOOLTIP"]["PLAYERFRAME"],
order = 0,
get = function ()
return ArcHUD.db.profile.PlayerFrame
end,
set = function (info, v)
ArcHUD.db.profile.PlayerFrame = v
if (v) then
ArcHUD.Nameplates.player:Show()
ArcHUD.Nameplates.pet:Show()
else
ArcHUD.Nameplates.player:Hide()
ArcHUD.Nameplates.pet:Hide()
end
end,
},
-- Target Frame
targetFrame = {
type = "toggle",
name = L["TEXT"]["TARGETFRAME"],
desc = L["TOOLTIP"]["TARGETFRAME"],
order = 1,
get = function ()
return ArcHUD.db.profile.TargetFrame
end,
set = function (info, v)
ArcHUD.db.profile.TargetFrame = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Player 3d Model
playerModel = {
type = "toggle",
name = L["TEXT"]["PLAYERMODEL"],
desc = L["TOOLTIP"]["PLAYERMODEL"],
order = 2,
get = function ()
return ArcHUD.db.profile.PlayerModel
end,
set = function (info, v)
ArcHUD.db.profile.PlayerModel = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Mob 3d Model
mobModel = {
type = "toggle",
name = L["TEXT"]["MOBMODEL"],
desc = L["TOOLTIP"]["MOBMODEL"],
order = 3,
get = function ()
return ArcHUD.db.profile.MobModel
end,
set = function (info, v)
ArcHUD.db.profile.MobModel = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Show Guild
showGuild = {
type = "toggle",
name = L["TEXT"]["SHOWGUILD"],
desc = L["TOOLTIP"]["SHOWGUILD"],
order = 4,
get = function ()
return ArcHUD.db.profile.ShowGuild
end,
set = function (info, v)
ArcHUD.db.profile.ShowGuild = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Show Class
showClass = {
type = "toggle",
name = L["TEXT"]["SHOWCLASS"],
desc = L["TOOLTIP"]["SHOWCLASS"],
order = 5,
get = function ()
return ArcHUD.db.profile.ShowClass
end,
set = function (info, v)
ArcHUD.db.profile.ShowClass = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Show Buffs
showBuffs = {
type = "toggle",
name = L["TEXT"]["SHOWBUFFS"],
desc = L["TOOLTIP"]["SHOWBUFFS"],
order = 6,
get = function ()
return ArcHUD.db.profile.ShowBuffs
end,
set = function (info, v)
ArcHUD.db.profile.ShowBuffs = v
if(ArcHUD.db.profile.ShowBuffs) then
ArcHUD:RegisterEvent("UNIT_AURA", "TargetAuras")
else
ArcHUD:UnregisterEvent("UNIT_AURA")
for i=1,16 do
ArcHUD.TargetHUD["Buff"..i]:Hide()
ArcHUD.TargetHUD["Debuff"..i]:Hide()
end
end
ArcHUD:UpdateTargetHUD()
end,
},
-- Show only buffs cast by player
showOnlyBuffsCastByPlayer = {
type = "toggle",
name = L["TEXT"]["SHOWONLYBUFFSCASTBYPLAYER"],
desc = L["TOOLTIP"]["SHOWONLYBUFFSCASTBYPLAYER"],
order = 7,
get = function ()
return ArcHUD.db.profile.ShowOnlyBuffsCastByPlayer
end,
set = function (info, v)
ArcHUD.db.profile.ShowOnlyBuffsCastByPlayer = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Show Buff tooltips
showBuffTooltips = {
type = "toggle",
name = L["TEXT"]["SHOWBUFFTT"],
desc = L["TOOLTIP"]["SHOWBUFFTT"],
order = 8,
get = function ()
return ArcHUD.db.profile.ShowBuffTooltips
end,
set = function (info, v)
ArcHUD.db.profile.ShowBuffTooltips = v
end,
},
-- Hide Buff tooltips in combat
hideBuffTooltipsIC = {
type = "toggle",
name = L["TEXT"]["HIDEBUFFTTIC"],
desc = L["TOOLTIP"]["HIDEBUFFTTIC"],
order = 9,
get = function ()
return ArcHUD.db.profile.HideBuffTooltipsIC
end,
set = function (info, v)
ArcHUD.db.profile.HideBuffTooltipsIC = v
end,
},
-- Buff icon size
buffIconSize = {
type = "range",
name = L["TEXT"]["BUFFICONSIZE"],
desc = L["TOOLTIP"]["BUFFICONSIZE"],
min = 16,
max = 40,
step = 4,
order = 10,
get = function ()
return ArcHUD.db.profile.BuffIconSize
end,
set = function (info, v)
ArcHUD.db.profile.BuffIconSize = v
-- update buff icons
for i=1,16 do
ArcHUDFrame.TargetHUD["Buff"..i]:SetWidth(v)
ArcHUDFrame.TargetHUD["Buff"..i]:SetHeight(v)
end
for i=1,16 do
ArcHUDFrame.TargetHUD["Debuff"..i]:SetWidth(v)
ArcHUDFrame.TargetHUD["Debuff"..i]:SetHeight(v)
end
end,
},
-- Show PvP flag
showPVP = {
type = "toggle",
name = L["TEXT"]["SHOWPVP"],
desc = L["TOOLTIP"]["SHOWPVP"],
order = 11,
get = function ()
return ArcHUD.db.profile.ShowPVP
end,
set = function (info, v)
ArcHUD.db.profile.ShowPVP = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Show health/power maximum text
ShowHealthPowerTextMax = {
type = "toggle",
name = L["TEXT"]["SHOWTEXTMAX"],
desc = L["TOOLTIP"]["SHOWTEXTMAX"],
order = 12,
get = function ()
return ArcHUD.db.profile.ShowHealthPowerTextMax
end,
set = function (info, v)
ArcHUD.db.profile.ShowHealthPowerTextMax = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Target of target
targetTarget = {
type = "toggle",
name = L["TEXT"]["TOT"],
desc = L["TOOLTIP"]["TOT"],
order = 13,
get = function ()
return ArcHUD.db.profile.TargetTarget
end,
set = function (info, v)
ArcHUD.db.profile.TargetTarget = v
ArcHUD:UpdateTargetHUD()
end,
},
-- Target of target of target
targetTargetTarget = {
type = "toggle",
name = L["TEXT"]["TOTOT"],
desc = L["TOOLTIP"]["TOTOT"],
order = 14,
get = function ()
return ArcHUD.db.profile.TargetTargetTarget
end,
set = function (info, v)
ArcHUD.db.profile.TargetTargetTarget = v
ArcHUD:UpdateTargetHUD()
end,
},
},
}, -- display
nameplates = {
type = "group",
name = L["TEXT"]["NAMEPLATES"],
order = 11,
args = {
-- Hint
NameplateHint = {
type = "description",
name = L["TEXT"]["NPHINT"],
order = 1,
},
-- Separator
NameplatePlayerSep = {
type = "header",
name = L["TEXT"]["NPPLAYEROPT"],
order = 11,
},
-- Player nameplate
NameplatePlayer = {
type = "toggle",
name = L["TEXT"]["NPPLAYER"],
desc = L["TOOLTIP"]["NPPLAYER"],
order = 12,
get = function ()
return ArcHUD.db.profile.Nameplate_player
end,
set = function (info, v)
ArcHUD:UpdateNameplateSetting("player", v)
end,
},
-- Pet nameplate
NameplatePet = {
type = "toggle",
name = L["TEXT"]["NPPET"],
desc = L["TOOLTIP"]["NPPET"],
order = 13,
get = function ()
return ArcHUD.db.profile.Nameplate_pet
end,
set = function (info, v)
ArcHUD:UpdateNameplateSetting("pet", v)
end,
},
-- Player/pet nameplates hover delay
NameplateHoverMsg = {
type = "toggle",
name = L["TEXT"]["HOVERMSG"],
desc = L["TOOLTIP"]["HOVERMSG"],
order = 15,
get = function ()
return ArcHUD.db.profile.HoverMsg
end,
set = function (info, v)
ArcHUD.db.profile.HoverMsg = v
end,
},
-- Player/pet nameplates hover delay
NameplateHoverDelay = {
type = "range",
name = L["TEXT"]["HOVERDELAY"],
desc = L["TOOLTIP"]["HOVERDELAY"],
min = 0,
max = 5,
step = 0.1,
order = 16,
get = function ()
return ArcHUD.db.profile.HoverDelay
end,
set = function (info, v)
ArcHUD.db.profile.HoverDelay = v
ArcHUD:RestartNamePlateTimers()
end,
},
-- Separator
NameplateTargetSep = {
type = "header",
name = L["TEXT"]["NPTARGETOPT"],
order = 20,
},
-- Target nameplate
NameplateTarget = {
type = "toggle",
name = L["TEXT"]["NPTARGET"],
desc = L["TOOLTIP"]["NPTARGET"],
order = 21,
get = function ()
return ArcHUD.db.profile.Nameplate_target
end,
set = function (info, v)
ArcHUD:UpdateNameplateSetting("target", v)
end,
},
-- Target of target nameplate
NameplateTargettarget = {
type = "toggle",
name = L["TEXT"]["NPTOT"],
desc = L["TOOLTIP"]["NPTOT"],
order = 22,
get = function ()
return ArcHUD.db.profile.Nameplate_targettarget
end,
set = function (info, v)
ArcHUD:UpdateNameplateSetting("targettarget", v)
end,
},
-- Target of target of target nameplate
NameplateTargettargettarget = {
type = "toggle",
name = L["TEXT"]["NPTOTOT"],
desc = L["TOOLTIP"]["NPTOTOT"],
order = 23,
get = function ()
return ArcHUD.db.profile.Nameplate_targettargettarget
end,
set = function (info, v)
ArcHUD:UpdateNameplateSetting("targettargettarget", v)
end,
},
},
}, -- nameplates
fade = {
type = "group",
name = L["TEXT"]["FADE"],
order = 12,
args = {
-- Fade behaviour
ringvis = {
type = "select",
name = L["TEXT"]["RINGVIS"],
desc = L["TOOLTIP"]["RINGVIS"],
values = {L["TEXT"]["RINGVIS_1"], L["TEXT"]["RINGVIS_2"], L["TEXT"]["RINGVIS_3"]},
order = 0,
get = function ()
return ArcHUD.db.profile.RingVisibility
end,
set = function (info, v)
ArcHUD.db.profile.RingVisibility = v
end,
},
-- FadeIC
FadeIC = {
type = "range",
min = 0.0,
max = 1.0,
step = 0.05,
name = L["TEXT"]["FADE_IC"],
desc = L["TOOLTIP"]["FADE_IC"],
order = 1,
get = function ()
return ArcHUD.db.profile.FadeIC
end,
set = function (info, v)
ArcHUD.db.profile.FadeIC = v
ArcHUD:UpdateTargetHUD()
end,
},
-- FadeOOC
FadeOOC = {
type = "range",
min = 0.0,
max = 1.0,
step = 0.05,
name = L["TEXT"]["FADE_OOC"],
desc = L["TOOLTIP"]["FADE_OOC"],
order = 2,
get = function ()
return ArcHUD.db.profile.FadeOOC
end,
set = function (info, v)
ArcHUD.db.profile.FadeOOC = v
ArcHUD:UpdateTargetHUD()
end,
},
-- FadeFull
FadeFull = {
type = "range",
min = 0.0,
max = 1.0,
step = 0.05,
name = L["TEXT"]["FADE_FULL"],
desc = L["TOOLTIP"]["FADE_FULL"],
order = 3,
get = function ()
return ArcHUD.db.profile.FadeFull
end,
set = function (info, v)
ArcHUD.db.profile.FadeFull = v
ArcHUD:UpdateTargetHUD()
end,
},
},
}, -- fade
positioning = {
type = "group",
name = L["TEXT"]["POSITIONING"],
order = 13,
args = {
-- Scaling
Scale = {
type = "range",
min = 0.2,
max = 2.0,
step = 0.1,
name = L["TEXT"]["SCALE"],
desc = L["TOOLTIP"]["SCALE"],
order = 0,
get = function ()
return ArcHUD.db.profile.Scale
end,
set = function (info, v)
ArcHUD.db.profile.Scale = v
ArcHUDFrame:SetScale(v)
end,
},
-- Scaling of TargetFrame
ScaleTargetFrame = {
type = "range",
min = 0.2,
max = 2.0,
step = 0.1,
name = L["TEXT"]["SCALETARGETFRAME"],
desc = L["TOOLTIP"]["SCALETARGETFRAME"],
order = 1,
get = function ()
return ArcHUD.db.profile.ScaleTargetFrame
end,
set = function (info, v)
ArcHUD.db.profile.ScaleTargetFrame = v
ArcHUD.TargetHUD:SetScale(v)
end,
},
-- YLoc
YLoc = {
type = "range",
min = -500,
max = 500,
step = 1,
name = L["TEXT"]["YLOC"],
desc = L["TOOLTIP"]["YLOC"],
order = 2,
get = function ()
return ArcHUD.db.profile.YLoc
end,
set = function (info, v)
ArcHUD.db.profile.YLoc = v
ArcHUDFrame:ClearAllPoints()
ArcHUDFrame:SetPoint("CENTER", WorldFrame, "CENTER", ArcHUD.db.profile.XLoc, ArcHUD.db.profile.YLoc)
end,
},
-- XLoc
XLoc = {
type = "range",
min = -500,
max = 500,
step = 1,
name = L["TEXT"]["XLOC"],
desc = L["TOOLTIP"]["XLOC"],
order = 3,
get = function ()
return ArcHUD.db.profile.XLoc
end,
set = function (info, v)
ArcHUD.db.profile.XLoc = v
ArcHUDFrame:ClearAllPoints()
ArcHUDFrame:SetPoint("CENTER", WorldFrame, "CENTER", ArcHUD.db.profile.XLoc, ArcHUD.db.profile.YLoc)
end,
},
-- Width
Width = {
type = "range",
min = 0,
max = 500,
step = 1,
name = L["TEXT"]["WIDTH"],
desc = L["TOOLTIP"]["WIDTH"],
order = 4,
get = function ()
return ArcHUD.db.profile.Width
end,
set = function (info, v)
ArcHUD.db.profile.Width = v
-- Position the HUD according to user settings
anchorModule = ArcHUD:GetModule("Anchors", true)
if not (anchorModule == nil) then
ArcHUD:GetModule("Anchors").Left:ClearAllPoints()
ArcHUD:GetModule("Anchors").Left:SetPoint("TOPLEFT", ArcHUDFrame, "TOPLEFT", 0-ArcHUD.db.profile.Width, 0)
ArcHUD:GetModule("Anchors").Right:ClearAllPoints()
ArcHUD:GetModule("Anchors").Right:SetPoint("TOPLEFT", ArcHUDFrame, "TOPRIGHT", ArcHUD.db.profile.Width, 0)
end
end,
},
header1 = {
type = "header",
name = L["TEXT"]["TARGETFRAME"],
order = 10,
},
-- Attach to top
attachTop = {
type = "toggle",
name = L["TEXT"]["ATTACHTOP"],
desc = L["TOOLTIP"]["ATTACHTOP"],
order = 11,
get = function ()
return ArcHUD.db.profile.AttachTop
end,
set = function (info, v)
ArcHUD.db.profile.AttachTop = v
if (v) then
ArcHUD.TargetHUD:ClearAllPoints()
ArcHUD.TargetHUD:SetPoint("BOTTOM", ArcHUD.TargetHUD:GetParent(), "TOP", 0, -100)
else
ArcHUD.TargetHUD:ClearAllPoints()
ArcHUD.TargetHUD:SetPoint("TOP", ArcHUD.TargetHUD:GetParent(), "BOTTOM", 0, -60)
end
end,
},
-- Unlock frames
unlock = {
type = "toggle",
name = L["TEXT"]["MFUNLOCK"],
desc = L["TOOLTIP"]["MFUNLOCK"],
order = 12,
get = function ()
return not ArcHUD.TargetHUD.locked
end,
set = function (info, v)
if (v) then
ArcHUD.TargetHUD:Unlock()
ArcHUD.TargetHUD.Target:Unlock()
ArcHUD.TargetHUD.TargetTarget:Unlock()
else
ArcHUD.TargetHUD:Lock()
ArcHUD.TargetHUD.Target:Lock()
ArcHUD.TargetHUD.TargetTarget:Lock()
end
end,
},
-- Reset frames
reset = {
type = "execute",
name = L["TEXT"]["MFRESET"],
desc = L["TOOLTIP"]["MFRESET"],
order = 13,
func = function ()
ArcHUD.TargetHUD:ResetPos()
ArcHUD.TargetHUD.Target:ResetPos()
ArcHUD.TargetHUD.TargetTarget:ResetPos()
end,
},
},
}, -- positioning
comboPoints = {
type = "group",
name = L["TEXT"]["COMBOPOINTS"],
order = 14,
args = {
info1 = {
type = "description",
name = L["TEXT"]["COMBOPOINTSSETTINGS1"],
order = 0,
},
info2 = {
type = "description",
name = L["TEXT"]["COMBOPOINTSSETTINGS2"],
order = 1,
},
},
}, -- comboPoints
misc = {
type = "group",
name = L["TEXT"]["MISC"],
order = 20,
args = {
-- Blizzard player frame
blizzPlayer = {
type = "toggle",
name = L["TEXT"]["BLIZZPLAYER"],
desc = L["TOOLTIP"]["BLIZZPLAYER"],
order = 0,
get = function ()
return ArcHUD.db.profile.BlizzPlayer
end,
set = function (info, v)
ArcHUD.db.profile.BlizzPlayer = v
ArcHUD:HideBlizzardPlayer(v)
end,
},
-- Blizzard target frame
blizzTarget = {
type = "toggle",
name = L["TEXT"]["BLIZZTARGET"],
desc = L["TOOLTIP"]["BLIZZTARGET"],
order = 1,
get = function ()
return ArcHUD.db.profile.BlizzTarget
end,
set = function (info, v)
ArcHUD.db.profile.BlizzTarget = v
ArcHUD:HideBlizzardTarget(v)
end,
},
-- Blizzard focus frame
blizzFocus = {
type = "toggle",
name = L["TEXT"]["BLIZZFOCUS"],
desc = L["TOOLTIP"]["BLIZZFOCUS"],
order = 2,
get = function ()
return ArcHUD.db.profile.BlizzFocus
end,
set = function (info, v)
ArcHUD.db.profile.BlizzFocus = v
ArcHUD:HideBlizzardFocus(v)
end,
},
-- Blizzard Spell Activation Center on ArcHUD
blizzSpellActCenter = {
type = "toggle",
name = L["TEXT"]["BLIZZSPELLACT_CENTER"],
desc = L["TOOLTIP"]["BLIZZSPELLACT_CENTER"],
order = 10,
get = function ()
return ArcHUD.db.profile.BlizzSpellActCenter
end,
set = function (info, v)
ArcHUD.db.profile.BlizzSpellActCenter = v
if v then
SpellActivationOverlayFrame:ClearAllPoints()
SpellActivationOverlayFrame:SetPoint("CENTER", ArcHUDFrame, "CENTER", 0, -175)
else
SpellActivationOverlayFrame:ClearAllPoints()
SpellActivationOverlayFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
end
end,
},
-- Blizzard Spell Activation Opacity
blizzSpellActScale = {
type = "range",
name = L["TEXT"]["BLIZZSPELLACT_SCALE"],
desc = L["TOOLTIP"]["BLIZZSPELLACT_SCALE"],
min = 0.2,
max = 2.0,
step = 0.1,
order = 11,
get = function ()
return ArcHUD.db.profile.BlizzSpellActScale
end,
set = function (info, v)
ArcHUD.db.profile.BlizzSpellActScale = v
SpellActivationOverlayFrame:SetScale(v)
if ArcHUD.db.profile.BlizzSpellActCenter then
SpellActivationOverlayFrame:ClearAllPoints()
SpellActivationOverlayFrame:SetPoint("CENTER", ArcHUDFrame, "CENTER", 0, -87)
else
SpellActivationOverlayFrame:ClearAllPoints()
SpellActivationOverlayFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
end
end,
},
-- Blizzard Spell Activation Opacity
blizzSpellActOpacity = {
type = "range",
name = L["TEXT"]["BLIZZSPELLACT_OPAC"],
desc = L["TOOLTIP"]["BLIZZSPELLACT_OPAC"],
min = 0.2,
max = 1.0,
step = 0.1,
order = 12,
get = function ()
return ArcHUD.db.profile.BlizzSpellActOpacity
end,
set = function (info, v)
ArcHUD.db.profile.BlizzSpellActOpacity = v
ArcHUD:HookBlizzardSpellActivation((ArcHUD.db.profile.BlizzSpellActOpacity < 1.0))
end,
},
},
}, -- misc
},
}
----------------------------------------------
-- Module options
----------------------------------------------
ArcHUD.configOptionsTableModules = {
type = "group",
name = LM["TEXT"]["TITLE"],
args = {},
}
----------------------------------------------
-- Custom modules options
----------------------------------------------
ArcHUD.configOptionsTableCustomModules = {
type = "group",
name = LM["TEXT"]["CUSTOM"],
args = {
-- new custom arc
new = {
type = "execute",
name = LM["TEXT"]["CUSTNEW"],
desc = LM["TOOLTIP"]["CUSTNEW"],
order = 1,