forked from SwimmingTiger/TotemTimers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.lua
executable file
·720 lines (631 loc) · 24.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
-- Copyright © 2008 - 2012 Xianghar <[email protected]>
-- All Rights Reserved.
-- This code is not to be modified or distributed without written permission by the author.
-- Current distribution permissions only include curse.com, wowinterface.com and their respective addon updaters
if select(2,UnitClass("player")) ~= "SHAMAN" then return end
local TRACKER_START = 5
local TRACKER_END = 8
local Timers = XiTimers.timers
local SpellIDs = TotemTimers.SpellIDs
local SpellNames = TotemTimers.SpellNames
local AvailableSpells = TotemTimers.AvailableSpells
-- local TotemFrameScript = TotemFrame:GetScript("OnShow")
local LSM = LibStub:GetLibrary("LibSharedMedia-3.0", true)
local TotemColors = {
[AIR_TOTEM_SLOT] = {0.7,0.7,1.0},
[WATER_TOTEM_SLOT] = {0.4,0.4,1.0},
[FIRE_TOTEM_SLOT] = {1.0,0.1,0.1},
[EARTH_TOTEM_SLOT] = {0.7,0.5,0.3},
}
local SettingsFunctions
function TotemTimers.ProcessSetting(setting)
if SettingsFunctions[setting] then
SettingsFunctions[setting](TotemTimers.ActiveProfile[setting], XiTimers.timers)
end
end
function TotemTimers.ProcessAllSettings()
for k,v in pairs(TotemTimers.ActiveProfile) do
TotemTimers.ProcessSetting(k)
end
end
SettingsFunctions = {
ShowTimerBars =
function(value, Timers)
for _,timer in pairs(Timers) do
timer.visibleTimerBars = value
for n,t in pairs(timer.timers) do
if t>0 and value then
timer:ShowTimerBar(n)
else
timer.timerBars[n].background:Hide()
timer.timerBars[n]:SetValue(0)
end
end
end
--[[ TotemTimers.fs.visibleTimerBars = true
if TotemTimers.fs.timers[1]>0 then
TotemTimers.fs:ShowTimerBar(1)
end --]]
end,
FlashRed =
function(value, Timers)
for _,timer in pairs(Timers) do
timer.flashRed = value
end
end,
TimeStyle =
function(value, Timers)
for k,timer in pairs(Timers) do
if ((k<6 or not TotemTimers.ActiveProfile.ShieldChargesOnly) or k>7) then
timer.timeStyle = value
end
end
end,
TimerSize =
function(value, Timers)
local v = value
for e=1,4 do
Timers[e]:SetScale(v/36)
end
end,
TrackerSize =
function(value, Timers)
for e=TRACKER_START, TRACKER_END do
Timers[e]:SetScale(value/36)
end
end,
TimerTimeHeight =
function(value, Timers)
for e=1,4 do
Timers[e]:SetTimeHeight(value)
Timers[e].button.time:SetFont(Timers[e].button.time:GetFont(),value+5,"OUTLINE")
end
end,
TrackerTimeHeight =
function(value, Timers)
for e=TRACKER_START, TRACKER_END do
Timers[e]:SetTimeHeight(value)
Timers[e].button.time:SetFont(Timers[e].button.time:GetFont(),value+5,"OUTLINE")
end
--[[ for e=22, 23 do
Timers[e]:SetTimeHeight(value)
Timers[e].button.time:SetFont(Timers[e].button.time:GetFont(),value+5,"OUTLINE")
end ]]
end,
TimerSpacing =
function(value, Timers)
for e=1,4 do
Timers[e]:SetSpacing(value)
end
end,
TrackerSpacing =
function(value, Timers)
for e=TRACKER_START, TRACKER_END do
Timers[e]:SetSpacing(value)
end
--[[ for e=22, 23 do
Timers[e]:SetSpacing(value)
end ]]
end,
TimerTimeSpacing =
function(value, Timers)
for e=1,4 do
Timers[e]:SetTimeSpacing(value)
end
end,
TrackerTimeSpacing =
function(value, Timers)
for e=TRACKER_START, TRACKER_END do
Timers[e]:SetTimeSpacing(value)
end
--[[ for e=22, 23 do
Timers[e]:SetTimeSpacing(value)
end ]]
end,
TimerTimePos =
function(value, Timers)
for e=1,4 do
Timers[e]:SetTimerBarPos(value)
end
end,
TrackerTimePos =
function(value, Timers)
for e=TRACKER_START, TRACKER_END do
Timers[e]:SetTimerBarPos(value)
end
end,
AnkhTracker =
function(value, Timers)
if value and AvailableSpells[SpellIDs.Ankh] then
Timers[5]:Activate()
else
Timers[5]:Deactivate()
end
TotemTimers.OrderTrackers()
end,
ShieldTracker =
function(value, Timers)
Timers[6].ActiveWhileHidden = TotemTimers.ActiveProfile.ActivateHiddenTimers and not value
if (value or TotemTimers.ActiveProfile.ActivateHiddenTimers) and (AvailableSpells[SpellIDs.LightningShield] or AvailableSpells[SpellIDs.WaterShield]) then
Timers[6]:Activate()
else
Timers[6]:Deactivate()
end
TotemTimers.OrderTrackers()
end,
ShieldChargesOnly =
function(value, Timers)
TotemTimers.SetShieldUpdate()
end,
--[[ EarthShieldTracker =
function(value, Timers)
Timers[7].ActiveWhileHidden = TotemTimers.ActiveProfile.ActivateHiddenTimers and not value
if (value or TotemTimers.ActiveProfile.ActivateHiddenTimers) and AvailableSpells[SpellIDs.EarthShield] then
Timers[7]:Activate()
else
Timers[7]:Deactivate()
end
TotemTimers.OrderTrackers()
end, --]]
WeaponTracker =
function(value, Timers)
Timers[8].ActiveWhileHidden = TotemTimers.ActiveProfile.ActivateHiddenTimers and not value
if (value or TotemTimers.ActiveProfile.ActivateHiddenTimers) and AvailableSpells[SpellIDs.RockbiterWeapon] then
Timers[8]:Activate()
else
Timers[8]:Deactivate()
end
TotemTimers.OrderTrackers()
end,
LastWeaponEnchant =
function(value, Timers)
if value == 5 then
Timers[8].button:SetAttribute("type1", "macro")
Timers[8].button:SetAttribute("macrotext", "/cast "..SpellNames[SpellIDs.WindfuryWeapon].."\n/use 16")
Timers[8].button:SetAttribute("doublespell1", SpellNames[SpellIDs.WindfuryWeapon])
Timers[8].button:SetAttribute("doublespell2", SpellNames[SpellIDs.FlametongueWeapon])
Timers[8].button:SetAttribute("ds", 1)
elseif value == 6 then
Timers[8].button:SetAttribute("type1", "macro")
Timers[8].button:SetAttribute("macrotext", "/cast "..SpellNames[SpellIDs.WindfuryWeapon].."\n/use 16")
Timers[8].button:SetAttribute("*spell1", SpellNames[SpellIDs.WindfuryWeapon])
Timers[8].button:SetAttribute("doublespell1", SpellNames[SpellIDs.WindfuryWeapon])
Timers[8].button:SetAttribute("doublespell2", SpellNames[SpellIDs.FrostbrandWeapon])
Timers[8].button:SetAttribute("ds", 1)
else
Timers[8].button:SetAttribute("type1", "spell")
Timers[8].button:SetAttribute("spell1", value)
end
end,
--[[ HideBlizzTimers =
function(value)
if value then
TotemFrame:UnregisterEvent("PLAYER_TOTEM_UPDATE")
TotemFrame:UnregisterEvent("PLAYER_ENTERING_WORLD")
TotemFrame:SetScript("OnShow", function() TotemFrame:Hide() end)
TotemFrame:Hide()
else
TotemFrame:RegisterEvent("PLAYER_TOTEM_UPDATE")
TotemFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
TotemFrame:Show()
TotemFrame:SetScript("OnShow", TotemFrameScript)
end
end, ]]
--[[ ShieldLeftButton =
function(value, Timers)
Timers[6].button:SetAttribute("*spell1",value)
end,
ShieldRightButton =
function(value, Timers)
Timers[6].button:SetAttribute("*spell2", value)
end,
ShieldMiddleButton =
function(value, Timers)
Timers[6].button:SetAttribute("*spell3", value)
end, ]]
Order =
function(value, Timers)
for i=1,4 do Timers[i] = _G["XiTimers_Timer"..value[i]].timer end
TotemTimers.OrderTimers()
end,
OpenOnRightclick =
function(value, Timers)
for i = 1,4 do
if value and not TotemTimers.ActiveProfile.MenusAlwaysVisible then
Timers[i].button:SetAttribute("OpenMenu", "RightButton")
--Timers[i].button:SetAttribute("*macrotext3", "/script XiTimers.timers["..i.."].stopQuiet = true DestroyTotem("..Timers[i].nr..")")
Timers[i].button:SetAttribute("*macrotext3", "/cast Totemic Recall")
Timers[i].button:SetAttribute("*macrotext2", "")
else
Timers[i].button:SetAttribute("OpenMenu", "mouseover")
Timers[i].button:SetAttribute("*macrotext3", "/cast Totemic Recall")
Timers[i].button:SetAttribute("*macrotext2", "/cast Totemic Recall")
--Timers[i].button:SetAttribute("*macrotext2", "/script XiTimers.timers["..i.."].stopQuiet = true DestroyTotem("..Timers[i].nr..")")
end
end
end,
MenusAlwaysVisible =
function(value, Timers)
if value then
for i=1,4 do
Timers[i].button:SetAttribute("OpenMenu", "always")
end
end
for i=1,4 do
TTActionBars.bars[i]:SetAlwaysVisible(value)
end
end,
MiniIcons =
function(value, Timers)
for e=1,4 do
if value then
Timers[e].button.miniIconFrame:Show()
else
Timers[e].button.miniIconFrame:Hide()
end
end
end,
Lock =
function(value, Timers)
for k,v in pairs(Timers) do
v.locked = value
end
end,
Show =
function(value, Timers)
if value then
for i=1,4 do
if (Timers[i].nr == FIRE_TOTEM_SLOT and AvailableSpells[SpellIDs.Searing])
or (Timers[i].nr == EARTH_TOTEM_SLOT and (AvailableSpells[SpellIDs.Stoneskin] or AvailableSpells[SpellIDs.Earthbind] or AvailableSpells[SpellIDs.StoneBulwark]))
or (Timers[i].nr == WATER_TOTEM_SLOT and AvailableSpells[SpellIDs.HealingStream])
or (Timers[i].nr == AIR_TOTEM_SLOT and (AvailableSpells[SpellIDs.Grounding] or AvailableSpells[SpellIDs.NatureResistance] or AvailableSpells[SpellIDs.Windfury])) then
Timers[i]:Activate()
end
end
--TotemTimersFrame:Show()
TotemTimers.OrderTimers()
else
for i=1,4 do
Timers[i]:Deactivate()
end
--TotemTimersFrame:Hide()
end
end,
ProcFlash =
function(value, Timers)
for i=1,4 do
Timers[i].procFlash = value
end
end,
TimeFont =
function(value, Timers)
local font = LSM:Fetch("font", value)
if font then
for _,timer in pairs(Timers) do
timer:SetFont(font)
end
end
end,
TimerBarTexture =
function(value, Timers)
local texture = LSM:Fetch("statusbar", value)
if texture then
for _,timer in pairs(Timers) do
timer:SetBarTexture(texture)
end
end
end,
ColorTimerBars =
function(value, Timers)
for i=1,#Timers do
if value and i<5 then
Timers[i]:SetBarColor(TotemColors[Timers[i].nr][1], TotemColors[Timers[i].nr][2], TotemColors[Timers[i].nr][3],1)
elseif i ~= 21 then
Timers[i]:SetBarColor(TotemTimers.ActiveProfile.TimerBarColor.r,TotemTimers.ActiveProfile.TimerBarColor.g,
TotemTimers.ActiveProfile.TimerBarColor.b,TotemTimers.ActiveProfile.TimerBarColor.a)
end
end
end,
ShowCooldowns =
function(value, Timers)
if TotemTimers_IsSetUp then
TotemTimers.OrderTimers()
for i = 1,4 do TotemTimers.TotemEvent(Timers[i].button,"SPELL_UPDATE_COOLDOWN", i) end
end
end,
BarBindings =
function(value, Timers)
for i=1,4 do
for j=1,5 do
local key = GetBindingKey("TOTEMTIMERSCAST"..i..j)
if TotemTimers.ActiveProfile.BarBindings and not TotemTimers.ActiveProfile.MenusAlwaysVisible then
if TotemTimers.ActiveProfile.ReverseBarBindings then
getglobal("TT_ActionButton"..i..j.."HotKey"):SetText(key or tostring(10-j))
getglobal("TT_ActionButton"..i..j):SetAttribute("binding", tostring(10-j))
else
getglobal("TT_ActionButton"..i..j.."HotKey"):SetText(key or tostring(j))
getglobal("TT_ActionButton"..i..j):SetAttribute("binding", tostring(j))
end
else
getglobal("TT_ActionButton"..i..j.."HotKey"):SetText(key or "")
getglobal("TT_ActionButton"..i..j):SetAttribute("binding", nil)
end
end
end
end,
--[[ EnhanceCDs =
function(value)
if value then
TotemTimers.ActivateEnhanceCDs()
else
TotemTimers.DeactivateEnhanceCDs()
end
end,
EnhanceCDsSize =
function(value)
local Timers = TotemTimers.EnhanceCDs
for i=1,#Timers-1 do
Timers[i]:SetScale(value/36)
end
TotemTimers.maelstrom.background:SetWidth(value*3+10)
TotemTimers.maelstrom:SetWidth(value*3+10)
TotemTimers.maelstrombutton:SetWidth(value*3+10)
Timers[#Timers-1]:SetTimeWidth(value*3+10)
TotemTimers.LayoutEnhanceCDs()
for i = 1,#TotemTimers.LongCooldowns do
TotemTimers.LongCooldowns[i]:SetScale(value/36)
end
end,
EnhanceCDsTimeHeight =
function(value)
local AllTimers = {TotemTimers.EnhanceCDs, TotemTimers.LongCooldowns}
for t=1,2 do
local Timers = AllTimers[t]
for e=1,#Timers-1 do
Timers[e]:SetTimeHeight(value)
local font, _ = Timers[e].button.time:GetFont()
Timers[e].button.time:SetFont(font, value+5, "OUTLINE")
end
end
TotemTimers.LayoutEnhanceCDs()
TotemTimers.LayoutLongCooldowns()
end,
EnhanceCDsMaelstromHeight =
function(value, Timers)
TotemTimers.maelstrom:SetHeight(value)
TotemTimers.maelstrom.background:SetHeight(value)
TotemTimers.maelstrombutton:SetHeight(value)
TotemTimers.maelstrom.icon:SetWidth(value)
TotemTimers.maelstrom.icon:SetHeight(value)
Timers[21]:SetScale(value/36)
Timers[21]:SetTimeHeight(value)
Timers[21].timerBars[1]:SetScale(36/value)
local font = TotemTimers.maelstrom.text:GetFont()
local outline
if Timers[9].timerOnButton then outline = "OUTLINE" end
TotemTimers.maelstrom.text:SetFont(font, value, outline)
local font, value = _G["XiTimers_TimerBar17_1Time"]:GetFont()
_G["XiTimers_TimerBar17_1Time"]:SetFont(font, value, outline)
TotemTimers.LayoutEnhanceCDs()
end, --]]
Tooltips =
function(value, Timers)
for i=1,TRACKER_END do
Timers[i].button:SetAttribute("tooltip", value)
end
for i=1,TTActionBars.numbars do
TTActionBars.bars[i]:SetTooltip(value)
end
end,
TotemTimerBarWidth =
function(value, Timers)
for i=1,4 do
for j=1,Timers[i].nrOfTimers do
Timers[i].timerBars[j]:SetWidth(value)
end
end
end,
TrackerTimerBarWidth =
function(value, Timers)
for i=TRACKER_START,TRACKER_END do
for j=1,Timers[i].nrOfTimers do
Timers[i].timerBars[j]:SetWidth(value)
end
end
--[[ for i=22,23 do
for j=1,Timers[i].nrOfTimers do
Timers[i].timerBars[j]:SetWidth(value)
end
end ]]
end,
ActivateHiddenTimers =
function(value, Timers)
TotemTimers.ProcessSetting("ShieldTracker")
-- TotemTimers.ProcessSetting("EarthShieldTracker")
TotemTimers.ProcessSetting("WeaponTracker")
end,
ShowKeybinds =
function(value, Timers)
for _,t in pairs(Timers) do
if value then
t.button.hotkey:Show()
else
t.button.hotkey:Hide()
end
end
end,
FramePositions =
function(value, Timers)
for name, pos in pairs(value) do
if _G[name] and pos and pos[1] then
_G[name]:ClearAllPoints()
_G[name]:SetPoint(pos[1],pos[2],pos[3],pos[4],pos[5])
end
end
end,
WeaponBarDirection =
function(value, Timers)
TTActionBars.bars[5]:SetDirection(value, TotemTimers.ActiveProfile.TrackerArrange)
--if #TTActionBars.bars > 5 then TotemTimers.ProcessSetting("MultiSpellBarDirection") end
end,
WeaponMenuOnRightclick =
function(value, Timers)
if value then
XiTimers.timers[8].button:SetAttribute("OpenMenu", "RightButton")
else
XiTimers.timers[8].button:SetAttribute("OpenMenu", "mouseover")
end
TotemTimers.ProcessSetting("LastWeaponEnchant2")
end,
--[[ ESMainTankMenuDirection =
function(value, Timers)
TTActionBars.bars[5]:SetDirection(value, TotemTimers.ActiveProfile.TrackerArrange)
--if #TTActionBars.bars > 5 then TotemTimers.ProcessSetting("MultiSpellBarDirection") end
end, --]]
--[[EnhanceCDsOOCAlpha =
function(value)
local Timers = TotemTimers.EnhanceCDs
for i = 1,#Timers do
Timers[i].OOCAlpha = value
end
TotemTimers.maelstrom:SetAlpha(value)
XiTimers.invokeOOCFader()
end, --]]
TimersOnButtons =
function(value, Timers)
for i=1,#Timers do
if i ~= 21 then
Timers[i].timerOnButton = value
if not value and i > 8 and TotemTimers.ActiveProfile.CDTimersOnButtons then Timers[i].timerOnButton = true end
if Timers[i].timers[1] > 0 then Timers[i]:Start(1, Timers[i].timers[1], Timers[i].durations[1]) end
if Timers[i].nrOfTimers > 1 and Timers[i].timers[2] > 0 then Timers[i]:Start(2, Timers[i].timers[2], Timers[i].durations[1]) end
end
end
TotemTimers.ProcessSetting("EnhanceCDsMaelstromHeight")
end,
TimeColor =
function(value, Timers)
for i=1,#Timers do
Timers[i].button.time:SetTextColor(value.r, value.g, value.b, 1)
Timers[1].timeColor = value
for j=1,#Timers[i].timerBars do
Timers[i].timerBars[j].time:SetTextColor(value.r,value.g,value.b,1)
end
end
end,
--[[ HideInVehicle =
function(value, Timers)
if value then
for k,v in pairs(Timers) do
RegisterStateDriver(v.button,"invehicle","[bonusbar:5]hide;show")
end
--RegisterStateDriver(TotemTimers.MB,"invehicle","[bonusbar:5]hide;show")
else
for k,v in pairs(Timers) do
UnregisterStateDriver(v.button,"invehicle")
end
--UnregisterStateDriver(TotemTimers.MB,"invehicle")
end
end, --]]
StopPulse =
function(value, Timers)
for i = 1,4 do
Timers[i].StopPulse = value
end
for i = 6,TRACKER_END do
Timers[i].StopPulse = value
end
end,
--[[ HideEnhanceCDsOOC =
function(value)
local Timers = TotemTimers.EnhanceCDs
for i = 1,#Timers do
Timers[i].HideOOC = value
Timers[i].button:SetAttribute("HideOOC", value)
end
TotemTimers.ConfigEnhanceCDs()
end, --]]
--[[ EarthShieldTargetName =
function(value, Timers)
if value then
Timers[7].nameframe:Show()
else
Timers[7].nameframe:Hide()
end
end, ]]
--[[ EnhanceCDs_Clickthrough =
function(value)
local Timers = TotemTimers.EnhanceCDs
for i = 1,#Timers do
Timers[i].button:EnableMouse(not value)
end
Timers = TotemTimers.LongCooldowns
for i = 1,#Timers do
Timers[i].button:EnableMouse(not value)
end
TotemTimers.maelstrom:EnableMouse(not value)
TotemTimers.maelstrombutton:EnableMouse(not value)
end, --]]
Timer_Clickthrough =
function(value, Timers)
for i = 1,4 do
Timers[i].button:EnableMouse(not value)
end
end,
Tracker_Clickthrough =
function(value, Timers)
for i = TRACKER_START,TRACKER_END do
Timers[i].button:EnableMouse(not value)
end
end,
--[[ ESChargesOnly =
function(value, Timers)
TotemTimers.SetEarthShieldUpdate()
end, --]]
--[[ CrowdControlSize =
function(value, Timers)
TotemTimers.CrowdControl[1]:SetScale(value/36)
TotemTimers.CrowdControl[2]:SetScale(value/36)
end,
CrowdControlTimePos =
function(value, Timers)
TotemTimers.CrowdControl[1]:SetTimerBarPos(value)
TotemTimers.CrowdControl[2]:SetTimerBarPos(value)
end,
CrowdControlClickthrough =
function(value, Timers)
TotemTimers.CrowdControl[1].button:EnableMouse(not value)
TotemTimers.CrowdControl[2].button:EnableMouse(not value)
end,
CrowdControlEnable =
function(value)
local Timers = TotemTimers.CrowdControl
if not value then
Timers[1]:Deactivate()
Timers[2]:Deactivate()
TotemTimers_CrowdControlFrame:Hide()
else
if TotemTimers.ActiveProfile.CrowdControlHex and AvailableSpells[SpellIDs.Hex] then Timers[1]:Activate() else Timers[1]:Deactivate() end
if TotemTimers.ActiveProfile.CrowdControlBindElemental and AvailableSpells[SpellIDs.BindElemental] then Timers[2]:Activate() else Timers[2]:Deactivate() end
TotemTimers_CrowdControlFrame:Show()
end
end,
LongCooldowns =
function(value, Timers)
TotemTimers.ActivateLongCooldowns(value)
end,
LongCooldownsArrange =
function(value, Timers)
TotemTimers.LayoutLongCooldowns()
end,
CooldownSpacing =
function(value, Timers)
for k,v in pairs(TotemTimers.LongCooldowns) do
v:SetSpacing(value)
end
for k,v in pairs(TotemTimers.EnhanceCDs) do
v:SetSpacing(value)
end
end, --]]
}
SettingsFunctions.ReverseBarBindings = SettingsFunctions.BarBindings