-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
option_table_presets.lua
939 lines (906 loc) · 30.1 KB
/
option_table_presets.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
--=========================================================================================
-- Module to contain presets for the options table generation
--=========================================================================================
local addon_name, st = ...
local ST = LibStub("AceAddon-3.0"):GetAddon(addon_name)
local LSM = LibStub("LibSharedMedia-3.0")
--=========================================================================================
-- Selections and orderings for dropdowns
--=========================================================================================
ST.valid_anchor_points = {
TOPLEFT="TOPLEFT",
TOPRIGHT="TOPRIGHT",
BOTTOMLEFT="BOTTOMLEFT",
BOTTOMRIGHT="BOTTOMRIGHT",
TOP="TOP",
BOTTOM="BOTTOM",
LEFT="LEFT",
RIGHT="RIGHT",
CENTER="CENTER",
}
ST.outlines = {
_none="None",
outline="Outline",
thick_outline="Thick Outline",
}
ST.texts = {
attack_speed="Attack speed",
swing_timer="Swing timer",
range_finder="Range Finder",
}
ST.bar_border_modes = {
Solid="Solid",
Texture="Texture",
None="None",
}
ST.gcd_anchor_points = {
endofswing = "End of Swing",
swing = "Swing",
}
ST.gcd_marker_modes = {
DRUID = {
phys = "Physical GCD",
spell = "Spell GCD",
form = "Form-dependent",
},
NONDRUID = {
phys = "Physical GCD",
spell = "Spell GCD",
},
}
ST.gcd_marker_offsets = {
None = "None",
Fixed = "Fixed",
Dynamic = "Dynamic",
Calibrated = "Calibrated",
}
ST.show_bar_opts = {
always = "Always",
conditional = "Conditionally",
}
ST.show_bar_conditions = {
in_combat = "In Combat",
has_target = "Has attackable target",
both = "In Combat and has target",
either = "In Combat or has target",
}
ST.show_bar_conditions_sorting = {
[1] = "in_combat",
[2] = "has_target",
[3] = "either",
[4] = "both",
}
--=========================================================================================
-- Functions to create the preset tables
--=========================================================================================
function ST:construct_latency_settings_table()
-- Latency options
ST.latency_presets = {
header_latency = {
order = 3.0,
type = "header",
name = "GCD Marker Offsets",
},
desc_latency = {
order = 3.05,
type = "description",
name = "These options control fixed or latency-based offsets to the GCD marker positions. "..
"This can help give a more representative picture of available time to act before a swing.",
},
gcd_marker_offset_mode = {
type = "select",
order = 3.1,
name = "Marker Offset Mode",
desc = "The type of offset, if any, to apply to the GCD marker positions. Fixed applies the specified "..
"offset, Dynamic applies an offset based on latency, Calibrated combines the Fixed "..
"and Dynamic offsets.",
values = ST.gcd_marker_offsets,
get = "getter",
set = "latency_setter",
},
latency_linear_offset = {
type = "range",
order = 3.2,
name = "Fixed Offset (ms)",
desc = "Value in ms to add to Fixed or Calibrated latency.",
min = 0, max = 200, step = 1,
get = "getter",
set = "latency_setter",
disabled = function()
local db = ST:get_profile_table()
local is_fixed = db.gcd_marker_offset_mode == "Fixed"
local is_calibrated = db.gcd_marker_offset_mode == "Calibrated"
return not (is_fixed or is_calibrated)
end,
},
}
end
function ST:construct_strata_settings_table()
ST.draw_level_presets = {
header_strata = {
order = 4.0,
type = "header",
name = "Frame Strata and Draw Levels",
},
desc_strata = {
order = 4.05,
type = "description",
name = "These options control the frame strata and draw levels of the addon's timers."..
" Anything higher than MEDIUM will be drawn over some in-game menus, "..
"so this is the highest strata allowed.",
},
frame_strata = {
order = 7.2,
type="select",
name = "Frame strata",
desc = "The frame strata the addon's timers should be drawn at.",
values = {
BACKGROUND = "BACKGROUND",
LOW = "LOW",
MEDIUM = "MEDIUM",
},
get = "getter",
set = "strata_setter",
},
draw_level = {
type = "range",
order = 7.3,
name = "Draw level",
desc = "The bar's draw level within the frame strata.",
min = 1, max=100, step=1,
get = "getter",
set = "strata_setter",
},
}
end
function ST:construct_delay_settings_table()
ST.delay_on_full_settings = {
delay_on_full_header = {
type = "header",
order = 9,
name = "Delay on Inactive State"
},
delay_on_full_desc = {
type = "description",
order = 9.1,
name = "SwedgeTimer allows for the timer's visual state to change when filling (active) and full "..
"(inactive). This setting allows the user to specify a delay once the progress bar fills up before "..
"the timer changes to the inactive state, to prevent the timer state rapidly shifting between "..
"active/inactive due to latency effects."
},
bar_full_delay = {
type = "range",
order = 9.2,
name = "Delay (s)",
desc = "SwedgeTimer allows for different timer configurations when the swing timer bar is " ..
"full or filling. A delay can be set to prevent these states rapidaly changing during normal " ..
"combat.",
get = "getter",
set = "setter",
min = 0, max = 1.0, step = 0.01,
},
}
end
function ST:construct_advanced_settings_table()
ST.behaviour_group = {
type = "group",
name = "Advanced Behaviour",
desc = "Panel controlling advanced addon behaviour.",
order = 9.0,
args = {},
}
for k, v in pairs(ST.latency_presets) do
ST.behaviour_group.args[k] = v
end
for k, v in pairs(ST.draw_level_presets) do
ST.behaviour_group.args[k] = v
end
for k, v in pairs(ST.delay_on_full_settings) do
ST.behaviour_group.args[k] = v
end
end
function ST:construct_bar_appearance_settings_table()
ST.bar_appearance_preset = {
-- Bar size options
size_header = {
order = 0.1,
name = "Bar Dimensions",
type = "header",
},
size_desc = {
order = 0.11,
name = "It is recommended to change the timer dimensions to a ratio you like and adjust the overall "..
"size of the bar using the scale setting (either mousewheel scroll with the timer unlocked, or use the "..
"Positioning/Scale panel.",
type = "description",
},
bar_width = {
type = "range",
order = 0.2,
name = "Width",
desc = "The width of the swing timer.",
min = 100, max = 600, step = 1,
get = "getter",
set = "bar_setter",
},
bar_height = {
type = "range",
order = 0.3,
name = "Height",
desc = "The height of the swing timer.",
min = 6, max = 60, step = 1,
get = "getter",
set = "bar_setter",
},
bar_header = {
order = 1.0,
type = "header",
name = "Progress Bar Appearance",
},
bar_color_default = {
order = 1.1,
type="color",
name="Color",
desc="The color of the progress bar.",
hasAlpha=true,
get = "color_getter",
set = "color_setter",
},
bar_texture_key = {
order = 1.2,
type = "select",
name = "Texture",
desc = "The texture of the progress bar.",
dialogControl = "LSM30_Statusbar",
values = LSM:HashTable("statusbar"),
get = "getter",
set = "bar_setter",
},
background_header = {
order = 2.0,
type = "header",
name = "Background Appearance",
},
background_color = {
order = 2.1,
type="color",
name="Color",
desc="The color of the timer background.",
hasAlpha=true,
get = "color_getter",
set = "color_setter",
},
background_texture_key = {
order = 2.2,
type = "select",
name = "Texture",
desc = "The texture of the timer background.",
dialogControl = "LSM30_Statusbar",
values = LSM:HashTable("statusbar"),
get = "getter",
set = "bar_setter",
},
border_header = {
order = 3.0,
type = "header",
name = "Border Appearance"
},
border_color = {
order = 3.1,
type="color",
name="Color",
desc="The color of the timer border.",
hasAlpha=true,
get = "color_getter",
set = "color_setter",
},
border_texture_key = {
order = 3.2,
type = "select",
name = "Texture",
desc = "The border texture of the timer.",
dialogControl = "LSM30_Border",
values = LSM:HashTable("border"),
get = "getter",
set = "bar_setter",
},
border_desc = {
order = 3.21,
type = "description",
name = "Sometimes due to how the WoW client handles pixels and scaling, the border texture"..
" can be uneven around the timer."..
" If this happens, the width can be fine-tweaked until the texture is an even thickness on all sides."
},
border_width = {
order = 3.3,
type = "range",
name = "Border thickness",
desc = "The thickness of the timer border.",
min = 0.1, max = 8,
step = 0.1,
get = "getter",
set = "bar_setter",
},
}
end
function ST:construct_text_settings_table()
ST.fonts_table_preset = {
texts_header = {
order = 4.002,
type = "header",
name = "Text Appearance",
},
text_size = {
type = "range",
order = 4.03,
name = "Text size",
desc = "The size of the timer texts.",
min = 10, max = 40, softMin = 8, softMax = 34,
step = 1,
get = "getter",
set = "text_setter",
},
text_color = {
order=4.035,
type="color",
name="Text color",
desc="The color of the timer texts.",
hasAlpha=false,
get = "color_getter",
set = "color_setter",
},
text_font = {
order = 4.02,
type = "select",
name = "Font",
desc = "The font to use in the timer texts.",
dialogControl = "LSM30_Font",
values = LSM:HashTable("font"),
get = "getter",
set = "text_setter",
},
text_outline_key = {
order=4.04,
type="select",
values=ST.outlines,
style="dropdown",
desc="The outline type to use with the timer texts.",
name="Text outline",
get = "getter",
set = "text_setter",
},
texts_left_header = {
order=4.045,
type="header",
name="Left Text Control",
},
texts_left_desc = {
type = "description",
order = 4.05,
name = "Controls what text to show on the left of the timer, and when to show it.",
},
left_text_enabled = {
type = "toggle",
order = 4.06,
name = "Enabled",
desc = "Enables or disables the left timer text.",
get = "getter",
set = "setter",
},
left_text_key = {
type="select",
order = 4.08,
values=ST.texts,
style="dropdown",
name = "",
desc = "What to show on the left of the timer.",
get = "getter",
set = "text_setter",
disabled = "left_text_disable",
},
left_text_hide_inactive = {
type = "toggle",
order = 4.07,
name = "Hide when bar full",
desc = "Hides the text when the timer is full.",
get = "getter",
set = "setter",
disabled = "left_text_disable",
},
left_text_position_desc = {
type = "description",
order = 4.0811,
name = "Controls the left text's positional offsets as a percent of the timer size.",
},
left_text_x_percent_offset = {
type = "range",
order = 4.082,
name = "x offset %",
desc = "The text's horizontal offset as a percentage of the timer width.",
min = -100 , max = 100, softMin = -30, softMax = 30,
step = 0.1,
get = "getter",
set = "text_setter",
},
left_text_y_percent_offset = {
type = "range",
order = 4.083,
name = "y offset %",
desc = "The text's vertical offset as a percentage of the timer height.",
min = -250 , max = 250, softMin = -150, softMax = 150,
step = 0.1,
get = "getter",
set = "text_setter",
},
texts_center_header = {
order=4.0831,
type="header",
name="Center Text Control",
},
texts_center_desc = {
type = "description",
order = 4.0832,
name = "Controls what text to show on the center of the timer, and when to show it.",
},
center_text_enabled = {
type = "toggle",
order = 4.0833,
name = "Enabled",
desc = "Enables or disables the center timer text.",
get = "getter",
set = "setter",
},
center_text_key = {
type="select",
order = 4.0834,
values=ST.texts,
style="dropdown",
name = "",
desc = "What to show on the center of the timer.",
get = "getter",
set = "text_setter",
disabled = "center_text_disable",
},
center_text_hide_inactive = {
type = "toggle",
order = 4.0835,
name = "Hide when bar full",
desc = "Hides the text when the timer is full.",
get = "getter",
set = "setter",
disabled = "center_text_disable",
},
center_text_position_desc = {
type = "description",
order = 4.0836,
name = "Controls the center text's positional offsets as a percent of the timer size.",
},
center_text_x_percent_offset = {
type = "range",
order = 4.0837,
name = "x offset %",
desc = "The text's horizontal offset as a percentage of the timer width.",
min = -100 , max = 100, softMin = -30, softMax = 30,
step = 0.1,
get = "getter",
set = "text_setter",
},
center_text_y_percent_offset = {
type = "range",
order = 4.0838,
name = "y offset %",
desc = "The text's vertical offset as a percentage of the timer height.",
min = -250 , max = 250, softMin = -150, softMax = 150,
step = 0.1,
get = "getter",
set = "text_setter",
},
texts_right_header = {
order=4.095,
type="header",
name="Right Text Control",
},
texts_right_desc = {
type = "description",
order = 4.097,
name = "Controls what text to show on the right of the timer, and when to show it.",
},
right_text_enabled = {
type = "toggle",
order = 4.10,
name = "Right Text Enabled",
desc = "Enables or disables the right text.",
get = "getter",
set = "setter",
},
right_text_key = {
type="select",
order = 4.12,
values=ST.texts,
style="dropdown",
name = "",
desc = "What to show on the right of the timer.",
get = "getter",
set = "text_setter",
disabled = "right_text_disable",
},
right_text_hide_inactive = {
type = "toggle",
order = 4.11,
name = "Hide when bar full",
desc = "Hides the text when the timer is full.",
get = "getter",
set = "setter",
disabled = "right_text_disable",
},
right_text_position_desc = {
type = "description",
order = 4.1205,
name = "Controls the right text's positional offsets as a percent of the timer size.",
},
right_text_x_percent_offset = {
type = "range",
order = 4.121,
name = "x offset %",
desc = "The text's horizontal offset as a percentage of the timer width.",
min = -100 , max = 100, softMin = -30, softMax = 30,
step = 0.1,
get = "getter",
set = "text_setter",
},
right_text_y_percent_offset = {
type = "range",
order = 4.122,
name = "y offset %",
desc = "The text's vertical offset as a percentage of the timer height.",
min = -250 , max = 250, softMin = -150, softMax = 150,
step = 0.1,
get = "getter",
set = "text_setter",
},
}
end
function ST:construct_border_settings_table()
ST.borders_preset = {
-- Border settings
header_borders = {
order=4.0,
type="header",
name="Border Appearance",
},
-- bar_border_description = {
-- order=4.1,
-- type="description",
-- name="The bar border can either be set to a solid color, a texture, or disabled.",
-- },
-- header_borders2 = {
-- order=4.25,
-- type="header",
-- name="Solid Border width",
-- },
border_width = {
type = "range",
order = 4.4,
name = "Border thickness",
desc = "The thickness of the bar border.",
min = 0.1, max = 8,
step = 0.1,
get = "getter",
set = "bar_setter",
},
border_texture_key = {
order = 4.5,
type = "select",
name = "Texture",
desc = "The border texture of the swing bar.",
dialogControl = "LSM30_Border",
values = LSM:HashTable("border"),
get = "getter",
set = "bar_setter",
},
border_color = {
order = 4.6,
type = "color",
name = "Color",
desc = "The color of the border texture.",
get = "color_getter",
set = "color_setter"
}
}
end
function ST:construct_gcd_underlay_settings_table()
ST.gcd_underlay_preset = {
header = {
type = "header",
name = "GCD Underlay Settings",
order = 1.0,
},
desc = {
type = "description",
order = 1.1,
name = "A texture can be placed after the progress bar to show the user"..
" the ongoing duration of any active Global Cooldown."
},
lb1 = {
type = "header",
order = 1.2,
name = ""
},
show_gcd_underlay = {
type = "toggle",
order = 1.3,
name = "Enable",
desc = "Enables or disables the GCD underlay for this hand.",
get = "getter",
set = "setter",
},
lb2 = {
type = "description",
order = 1.31,
name = "",
},
gcd_texture_key = {
order = 1.4,
type = "select",
name = "Texture",
desc = "The texture of the GCD underlay bar.",
dialogControl = "LSM30_Statusbar",
values = LSM:HashTable("statusbar"),
get = "getter",
set = "bar_setter",
},
bar_color_gcd = {
order=1.5,
type="color",
name="Color",
desc="The color of the GCD underlay bar.",
hasAlpha=true,
get = "color_getter",
set = "color_setter",
},
}
end
function ST:construct_gcd_marker_settings_table()
ST.gcd_markers_preset = {
header = {
type = "header",
name = "GCD Marker Settings",
order = 0.9,
},
desc_1 = {
type="description",
order = 1.0,
name = "These settings control the GCD markers on the top and bottom of the swing timer."..
" The markers represent one standard physical or spell GCD's time on the timer from their anchor point. "..
"They can be anchored to the end of the swing, or to the swing progress itself. "..
"The spell or physical GCD duration shown can be set manually or set to be context-sensitive, e.g. "..
"changing to the physical GCD duration for druids when in bear/cat form, and spell GCD duration when "..
"in other forms.",
},
-- Marker Appearance
markers_appearance_header = {
type = "header",
name = "Marker Appearance",
order = 1.1,
},
gcd1a_marker_color = {
order=1.2,
type="color",
name="Top marker color",
desc="The color of the top GCD marker.",
hasAlpha=true,
get = "color_getter",
set = "color_setter",
},
gcd1b_marker_color = {
order=1.3,
type="color",
name="Bottom marker color",
desc="The color of the top GCD marker.",
hasAlpha=true,
get = "color_getter",
set = "color_setter",
},
gcd1a_marker_width = {
type = "range",
order = 1.4,
name = "Top marker width",
desc = "The line width of the top GCD marker.",
min = 1, max = 6,
step = 1,
get = "getter",
set = "bar_setter",
},
gcd1b_marker_width = {
type = "range",
order = 1.5,
name = "Bottom marker width",
desc = "The line width of the bottom GCD marker.",
min = 1, max = 6,
step = 1,
get = "getter",
set = "bar_setter",
},
gcd1a_marker_fractional_height = {
type = "range",
order = 1.6,
name = "Top marker height",
desc = "The height of the top marker as a fraction of the bar height",
min = 0.01, max = 1.0,
step = 0.01,
get = "getter",
set = "bar_setter",
},
gcd1b_marker_fractional_height = {
type = "range",
order = 1.6,
name = "Bottom marker height",
desc = "The height of the bottom marker as a fraction of the bar height",
min = 0.01, max = 1.0,
step = 0.01,
get = "getter",
set = "bar_setter",
},
-- Top Marker Behaviour
markers_beheaviour_header_top = {
order=2.0,
type="header",
name="Top Marker Behaviour",
},
gcd1a_marker_enabled = {
type = "toggle",
order = 2.1,
name = "Enable",
desc = "Toggles drawing the top GCD marker on the bar.",
get = "getter",
set = "bar_setter",
},
gcd1a_marker_hide_inactive = {
type = "toggle",
order = 2.12,
name = "Hide when full",
desc = "Will hide the top GCD marker when the swing timer bar is full.",
get = "getter",
set = "bar_setter",
disabled = "gcd1a_anchor_disable",
},
-- MODE WIDGET GETS INSERTED INTO THIS TABLE BY THE TABLE CREATION FUNC
-- BECAUSE THE OPTIONS ARE CLASS-SENSITIVE. order = 2.2
gcd1a_marker_anchor = {
type = "select",
order = 2.3,
name = "Anchor point",
values=ST.gcd_anchor_points,
desc = "The anchor point for the top GCD marker.",
get = "getter",
set = "bar_setter",
disabled = "gcd1a_anchor_disable",
},
gcd1a_swing_anchor_wrap = {
type = "toggle",
order = 2.4,
name = "Wrap Swing markers",
desc = "If the marker anchor is Swing, toggles the marker wrapping back to the start of the bar "..
"when the GCD marker falls in the player's next swing.",
get = "getter",
set = "bar_setter",
disabled = "gcd1a_wrap_disable",
},
-- Bottom Marker Behaviour
markers_beheaviour_header_bottom = {
order=2.5,
type="header",
name="Bottom Marker Behaviour",
},
gcd1b_marker_enabled = {
type = "toggle",
order = 2.6,
name = "Enable",
desc = "Toggles drawing the bottom GCD marker on the bar.",
get = "getter",
set = "bar_setter",
},
gcd1b_marker_hide_inactive = {
type = "toggle",
order = 2.62,
name = "Hide when full",
desc = "Will hide the bottom GCD marker when the swing timer bar is full.",
get = "getter",
set = "bar_setter",
disabled = "gcd1b_anchor_disable",
},
-- MODE WIDGET GETS INSERTED INTO THIS TABLE BY THE TABLE CREATION FUNC
-- BECAUSE THE OPTIONS ARE CLASS-SENSITIVE. order = 2.7
gcd1b_marker_anchor = {
type = "select",
order = 2.8,
name = "Anchor point",
values=ST.gcd_anchor_points,
desc = "The anchor point for the bottom GCD marker.",
get = "getter",
set = "bar_setter",
disabled = "gcd1b_anchor_disable",
},
gcd1b_swing_anchor_wrap = {
type = "toggle",
order = 2.9,
name = "Wrap Swing markers",
desc = "If the marker anchor is Swing, toggles the marker wrapping back to the start of the bar "..
"when the GCD marker falls in the player's next swing.",
get = "getter",
set = "bar_setter",
disabled = "gcd1b_wrap_disable",
},
}
end
function ST:construct_deadzone_settings_table()
ST.deadzone_settings_table = {
header = {
type = "header",
name = "Deadzone Settings",
order = 1.0,
},
desc_1 = {
type="description",
order = 1.1,
name = "The Deadzone is a shaded region at the end of the swing timer bar indicating the "..
"player's latency to the game world. When the bar progress is inside the deadzone, "..
"it should not be possible to input a new action that will occur before the swing goes off.\n\n"..
"This can be used to queue abilities that should be registered immediately after the swing, "..
"such as form changes while bearweaving.",
},
lb1 = {
type = "header",
name = "",
order = 1.2,
},
enable_deadzone = {
type = "toggle",
order = 1.3,
name = "Enable Deadzone",
desc = "Toggles drawing the Deadzone on the bar.",
get = "getter",
set = "bar_setter",
},
deadzone_hide_inactive = {
type = "toggle",
order = 1.35,
name = "Hide when bar inactive",
desc = "Hides the Deadzone when the bar is in the inactive state.",
get = "getter",
set = "bar_setter",
},
deadzone_texture_key = {
type = "select",
order = 1.4,
name = "Texture",
desc = "Texture to use for the Deadzone.",
values = LSM:HashTable("statusbar"),
dialogControl = "LSM30_Statusbar",
get = "getter",
set = "bar_setter",
},
deadzone_bar_color = {
type = "color",
order = 1.5,
name="Deadzone color",
desc="The color of the Deadzone bar.",
hasAlpha=true,
get = "color_getter",
set = "color_setter"
},
}
end
-- Finally, a function to build all of the above
function ST:build_preset_options_tables()
self:construct_latency_settings_table()
self:construct_strata_settings_table()
self:construct_delay_settings_table()
self:construct_advanced_settings_table()
self:construct_text_settings_table()
self:construct_bar_appearance_settings_table()
self:construct_border_settings_table()
self:construct_gcd_underlay_settings_table()
self:construct_gcd_marker_settings_table()
self:construct_deadzone_settings_table()
end