-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSpellOverlay Enhanced.lua
More file actions
executable file
·1194 lines (1024 loc) · 56.3 KB
/
SpellOverlay Enhanced.lua
File metadata and controls
executable file
·1194 lines (1024 loc) · 56.3 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
local addonName = "SpellOverlay Enhanced"
-- Safe Load
local AceAddon = LibStub("AceAddon-3.0", true)
if not AceAddon then return end
local SOE = AceAddon:NewAddon(addonName, "AceConsole-3.0", "AceEvent-3.0", "AceHook-3.0")
-- Global state for Maelstrom stack tracking to prevent "0 stack" flicker
SOE.LastMaelstromStack = 0
-----------------------------------------------------------------------
-- 1. DATA & CONSTANTS
-----------------------------------------------------------------------
local DUAL_PROCS = {
["Hot Streak"] = true, ["Heating Up"] = true, ["Hyperthermia"] = true, ["Fingers of Frost"] = true, ["Clearcasting"] = true, ["Clearcasting (2nd proc)"] = true, ["Clearcasting (3rd proc)"] = true, ["Overpowered Missiles"] = true,
["Essence Burst"] = true, ["Killing Machine"] = true, ["Sudden Doom"] = true, ["Crimson Scourge"] = true,
["Lava Surge"] = true, ["High Tide"] = true, ["Nightfall"] = true,
["Demonic Core"] = true, ["Surge of Light"] = true, ["Power of the Dark Side"] = true, ["Dark Thoughts"] = true,
["Infusion of Light"] = true, ["Mind Flay: Insanity"] = true,
["Ancient Arts"] = true, ["Blindside"] = true,
["Grand Crusader"] = true, ["Art of War"] = true,
["Voidfall"] = true, ["Light Stagger"] = true, ["Moderate Stagger"] = true, ["Heavy Stagger"] = true,
["Howl of the Pack Leader"] = true, ["Precise Shot"] = true, ["Precise Shot (2nd proc)"] = true,
["Rampage"] = true, ["Tactician"] = true,
}
local LEFT_PROCS = {
["Lunar Eclipse"] = true, ["Galactic Guardian"] = true,
["Shield Slam"] = true,
["Strength of the Black Ox"] = true,
}
local RIGHT_PROCS = {
["Solar Eclipse"] = true,
["Riposte"] = true,
["Blackout Kick!"] = true,
["Zen Pulse"] = true,
["Celestial Might"] = true,
}
local SUPPRESSED_BY = {
[270436] = { 270437 }, -- Precise Shots 1 hides if Precise Shots 2 is active
[1277420] = { 1277421 }, -- Clearcasting replacing with 1 or 2 procs
[1277421] = { 1277422 },
}
local SPELL_GROUPS = {
[1467] = { ["Essence Burst"] = { 359618, 369297, 369299 } },
[1468] = { ["Essence Burst"] = { 359618, 369297, 369299 }, ["Lifespark"] = { 370960 } },
[1473] = { ["Essence Burst"] = { 359618, 369297, 369299 } },
[63] = { ["Hot Streak"] = { 48108 }, ["Heating Up"] = { 48107 }, ["Pyroclasm"] = { 269651 }, ["Hyperthermia"] = { 449619, 383874 } },
[64] = { ["Brain Freeze"] = { 190446 }, ["Fingers of Frost"] = { 44544 } },
[62] = { ["Clearcasting"] = { 1277420 }, ["Clearcasting (2nd proc)"] = { 1277421 }, ["Clearcasting (3rd proc)"] = { 1277422 }, ["Overpowered Missiles"] = { 1277009 }, ["Arcane Soul"] = { 451038 } },
[102] = { ["Lunar Eclipse"] = { 93431, 48518 }, ["Solar Eclipse"] = { 93430, 48517 }, ["Owlkin Frenzy"] = { 157228 } },
[103] = { ["Clearcasting"] = { 135700 } },
[104] = { ["Galactic Guardian"] = { 213708 }, ["Gore"] = { 93622 }, ["Celestial Might"] = { 1272376 } },
[105] = { ["Clearcasting"] = { 16870 } },
[70] = { ["Divine Purpose"] = { 408458 }, ["Art of War"] = { 406086 } },
[65] = { ["Infusion of Light"] = { 54149 }, ["Divine Purpose"] = { 223819 } },
[66] = { ["Grand Crusader"] = { 85416 }, ["Divine Purpose"] = { 223819 } },
[253] = { ["Howl of the Pack Leader"] = { 472324 } },
[254] = { ["Lock and Load"] = { 194594 }, ["Precise Shot"] = { 270436 }, ["Precise Shot (2nd proc)"] = { 270437 } },
[255] = { ["Howl of the Pack Leader"] = { 472325 } },
[251] = { ["Rime"] = { 59052 }, ["Killing Machine"] = { 51124 } },
[252] = { ["Sudden Doom"] = { 81340 } },
[250] = { ["Crimson Scourge"] = { 81141 }, ["Dance of Midnight"] = { 1264568 } },
[260] = { ["Opportunity"] = { 195627 } },
[259] = { ["Blindside"] = { 121153 } },
[261] = { ["Ancient Arts"] = { 1268932, 1268936, 1268939 } },
[72] = { ["Rampage"] = { 209697 } },
[71] = { ["Tactician"] = { 199864 } },
[73] = { ["Shield Slam"] = { 224324 }, ["Riposte"] = { 5302 } },
[258] = { ["Shadowy Insight"] = { 375981 }, ["Mind Flay: Insanity"] = { 391401 } },
[256] = { ["Power of the Dark Side"] = { 198069 }, ["Surge of Light"] = { 114255, 128654 } },
[257] = { ["Surge of Light"] = { 114255 }, ["Benediction"] = { 1262755 } },
[262] = { ["Lava Surge"] = { 77762, 77756 } },
[263] = { ["Maelstrom Weapon"] = { 344179 } },
[264] = { ["High Tide"] = { 157153 }, ["Lava Surge"] = { 77762, 77756 } },
[266] = { ["Demonic Core"] = { 264173 } },
[265] = { ["Nightfall"] = { 108558 } },
[1480] = { ["Moment of Craving"] = { 1238488 },["Voidfall"] = { 1253304 } },
[581] = { ["Voidfall"] = { 1253304, 1256302 }, ["Untethered Rage"] = { 1270476 } },
[269] = { ["Blackout Kick!"] = { 116768, 439045 }, ["Strength of the Black Ox"] = { 443112 } },
[270] = { ["Strength of the Black Ox"] = { 443112 }, ["Zen Pulse"] = { 446334 }, ["Harmonic Surge"] = { 1270990 } },
[268] = { ["Blackout Kick!"] = { 116768, 439045 }, ["Light Stagger"] = { 124275 }, ["Moderate Stagger"] = { 124274 }, ["Heavy Stagger"] = { 124273 }, ["Harmonic Surge"] = { 1270990 } },
}
local ID_TO_GROUP_MAP = {}
local LOCALIZED_TO_GROUP_MAP = {}
local defaults = {
global = {
snapshots = {},
uiPos = { width = 550, height = 500, point = "CENTER", relativePoint = "CENTER", x = 0, y = 0 },
},
profile = {
specs = {
['*'] = {
global = {
scale = 1.0,
x = nil, y = nil, x2 = nil, y2 = nil,
rotation = 0, rotation2 = 0,
mirror = false, mirror2 = false,
width = 0, height = 0, width2 = 0, height2 = 0, -- [NEW]
alpha = 1.0, alpha2 = 1.0,
desaturate = false,
blendMode = "BLEND",
gradient = "NONE",
color = { r = 1, g = 1, b = 1, a = 1 },
color2 = { r = 1, g = 1, b = 1, a = 1 },
pulseEnabled = false, pulseSpeed = 1.5, pulseMin = 0.3,
borderEnabled = false, borderScale = 1.05, borderAlpha = 1.0,
borderColor = { r = 1, g = 0.9, b = 0, a = 1 },
borderBlendMode = "ADD",
},
spells = {},
}
}
}
}
local DUMMY_CONFIG = {
scale = 1.0, x = 0, y = 0, x2 = 0, y2 = 0,
rotation = 0, rotation2 = 0,
mirror = false, mirror2 = false,
width = 0, height = 0, width2 = 0, height2 = 0, -- [NEW]
alpha = 1.0, alpha2 = 1.0,
desaturate = false, gradient = "NONE", blendMode = "BLEND",
color = { r = 1, g = 1, b = 1, a = 1 },
color2 = { r = 1, g = 1, b = 1, a = 1 },
pulseEnabled = false, pulseSpeed = 1.5, pulseMin = 0.3,
borderEnabled = false, borderScale = 1.05, borderAlpha = 1.0,
borderColor = { r = 1, g = 0.9, b = 0, a = 1 },
borderBlendMode = "ADD"
}
local selectedClassID = nil
local selectedSpecID = nil
local selectedGroupName = nil
-----------------------------------------------------------------------
-- 2. HELPER FUNCTIONS
-----------------------------------------------------------------------
local function UnpackColor(t, fallbackA)
if not t then return 1, 1, 1, (fallbackA or 1) end
return (t.r or 1), (t.g or 1), (t.b or 1), (t.a or fallbackA or 1)
end
function SOE:BuildLookupMap()
ID_TO_GROUP_MAP = {}
LOCALIZED_TO_GROUP_MAP = {}
for specID, groups in pairs(SPELL_GROUPS) do
ID_TO_GROUP_MAP[specID] = {}
for groupName, ids in pairs(groups) do
for _, spellID in ipairs(ids) do
ID_TO_GROUP_MAP[specID][spellID] = groupName
-- Building internal translate and map to English
local info = C_Spell.GetSpellInfo(spellID)
if info and info.name then
LOCALIZED_TO_GROUP_MAP[info.name] = groupName
end
end
end
end
end
-- TRACK STACKS PERSISTENTLY
function SOE:GetMaelstromStackCount()
if not C_UnitAuras then return 0 end
local aura = C_UnitAuras.GetPlayerAuraBySpellID(344179)
if aura then
SOE.LastMaelstromStack = aura.applications or 0
return SOE.LastMaelstromStack
end
return SOE.LastMaelstromStack or 0
end
-- VISUAL FINGERPRINTING: Detect Stage based on Texture Crop Height
function SOE:DetectMaelstromStage(texture)
if SOE:GetMaelstromStackCount() >= 10 then
return "Maelstrom Weapon (Max 10)"
end
if not texture then
local s = SOE:GetMaelstromStackCount()
if s > 0 and s < 5 then return "Maelstrom Weapon (Stage 1-4)" end
return "Maelstrom Weapon (Stage 5-9)"
end
-- Measure the texture crop
local _, uly, _, lly = texture:GetTexCoord()
local height = lly - uly
-- "Full" textures usually span 0.0 to 1.0 (height ~1.0)
if height < 0.90 then
return "Maelstrom Weapon (Stage 1-4)"
end
return "Maelstrom Weapon (Stage 5-9)"
end
function SOE:GetGroupKey(spellID, texture)
local specIndex = GetSpecialization()
local specID = specIndex and GetSpecializationInfo(specIndex) or nil
local baseName = nil
if texture and texture.GetTexture then
local texID = texture:GetTexture()
if texID == 1028136 or texID == 1028137 or texID == 1028138 or texID == 1028139 then
return "Maelstrom Weapon (Stage 1-4)"
end
end
if specID and ID_TO_GROUP_MAP[specID] and ID_TO_GROUP_MAP[specID][spellID] then
baseName = ID_TO_GROUP_MAP[specID][spellID]
else
local info = C_Spell.GetSpellInfo(spellID)
if info and info.name then
-- Translate names back to English Config
if LOCALIZED_TO_GROUP_MAP[info.name] then
baseName = LOCALIZED_TO_GROUP_MAP[info.name]
else
baseName = info.name
end
end
end
if not baseName then return spellID end
-- SPECIAL HANDLING: Maelstrom Weapon (Fallback for 5-10)
if spellID == 344179 or baseName == "Maelstrom Weapon" then
return SOE:DetectMaelstromStage(texture)
end
return baseName
end
function SOE:GetSpellIDFromKey(key)
if not selectedSpecID then return nil end
local cleanKey = key
if string.find(key, "Maelstrom Weapon") then cleanKey = "Maelstrom Weapon" end
if SPELL_GROUPS[selectedSpecID] and SPELL_GROUPS[selectedSpecID][cleanKey] then
return SPELL_GROUPS[selectedSpecID][cleanKey][1]
end
return nil
end
function SOE:ResolveDefaultsFor(groupName)
local d = {
x = 0, y = 0, x2 = 0, y2 = 0,
rotation = 0, rotation2 = 0, mirror = false, mirror2 = false,
width = 0, height = 0, width2 = 0, height2 = 0
}
if not groupName then return d end
-- MAGE: Fire Overlaps
if groupName == "Heating Up" then
d.x = -120; d.y = 0; d.x2 = 120; d.y2 = 0
elseif groupName == "Hot Streak" then
d.x = -150; d.y = 0; d.x2 = 150; d.y2 = 0
elseif groupName == "Hyperthermia" then
d.x = -180; d.y = 0; d.x2 = 180; d.y2 = 0
-- PRIEST: Discipline Overlaps
elseif groupName == "Power of the Dark Side" then
d.x = -120; d.y = 0; d.x2 = 120; d.y2 = 0
elseif groupName == "Surge of Light" then
d.x = -150; d.y = 0; d.x2 = 150; d.y2 = 0
-- MONK: Brewmaster Overlaps (with Stagger)
elseif groupName == "Strenght of the Black Ox" then
d.x = -180; d.y = 0
elseif groupName == "Blackout Kick!" then
d.x = 180; d.y = 0
-- DEFAULT FALLBACKS
elseif DUAL_PROCS[groupName] then
d.x = -150; d.y = 0; d.x2 = 150; d.y2 = 0
elseif LEFT_PROCS[groupName] then
d.x = -150; d.y = 0
elseif RIGHT_PROCS[groupName] then
d.x = 150; d.y = 0
end
-- [2] Snapshot fallback for uncategorized spells
local snap = self.db.global.snapshots[groupName]
local function AnalyzeShape(s)
if not s or not s.width or not s.height then return "SQUARE" end
local ratio = s.width / s.height
if ratio > 1.3 then return "WIDE" end
if ratio < 0.7 then return "TALL" end
return "SQUARE"
end
if snap and not (DUAL_PROCS[groupName] or LEFT_PROCS[groupName] or RIGHT_PROCS[groupName]) then
if snap.left then
local shape = AnalyzeShape(snap.left)
if shape == "TALL" then d.x = -150; d.y = 0 elseif shape == "WIDE" then d.x = 0; d.y = 120 end
end
if snap.right and not snap.left then
-- Single right-sided proc: map to primary X offset
local shape = AnalyzeShape(snap.right)
if shape == "TALL" then d.x = 150; d.y = 0 elseif shape == "WIDE" then d.x = 0; d.y = 120 end
end
end
return d
end
function SOE:GetSettingsForActiveOverlay(spellID, overrideGroup, texture)
local specIndex = GetSpecialization()
local specID = specIndex and GetSpecializationInfo(specIndex) or nil
if not specID or not self.db.profile.specs then return nil end
local specDB = self.db.profile.specs[specID]
if not specDB then return nil end
local groupName = overrideGroup or SOE:GetGroupKey(spellID, texture)
local settings = specDB.global
if groupName and specDB.spells and specDB.spells[groupName] then
settings = specDB.spells[groupName]
end
local dynDefaults = SOE:ResolveDefaultsFor(groupName)
local safeSettings = setmetatable({}, {
__index = function(t, k)
if settings[k] ~= nil then return settings[k] end
if dynDefaults[k] ~= nil then return dynDefaults[k] end
return nil
end,
__newindex = function(t, k, v) settings[k] = v end
})
return safeSettings
end
-----------------------------------------------------------------------
-- 3. CORE LOGIC
-----------------------------------------------------------------------
function SOE:EnsureHelperExists(overlay)
if overlay.SOE_Created then return end
overlay.SOE_Created = true
if not overlay.SOE_Glow then
overlay.SOE_Glow = overlay:CreateTexture(nil, "BACKGROUND")
overlay.SOE_Glow:SetBlendMode("ADD")
overlay.SOE_Glow:SetParent(overlay)
end
end
-- Move offscreen to bypass fade-in animations overriding alpha.
function SOE:HideOverlay(overlay)
overlay:ClearAllPoints()
overlay:SetPoint("BOTTOMRIGHT", UIParent, "TOPLEFT", -10000, 10000)
if overlay.SOE_Glow then overlay.SOE_Glow:Hide() end
end
function SOE:ApplyToOverlay(overlay)
if not overlay:IsShown() then
if overlay.SOE_Glow then overlay.SOE_Glow:Hide() end
return
end
if overlay.animOut and overlay.animOut:IsPlaying() then return end
local mainTexture = overlay.texture
if not mainTexture then return end
-- [1] SUPPRESSION SYSTEM (Fixes overlaps for progressive procs)
if SUPPRESSED_BY then
local suppressors = SUPPRESSED_BY[overlay.spellID]
if suppressors and not overlay.IsDummy then
local isSuppressed = false
local frame = SpellActivationOverlayFrame
if frame and frame.overlayPool then
for o in frame.overlayPool:EnumerateActive() do
for _, sID in ipairs(suppressors) do
if o.spellID == sID and o:IsShown() and not o.IsDummy then
isSuppressed = true
break
end
end
if isSuppressed then break end
end
end
if isSuppressed then
SOE:HideOverlay(overlay)
return
end
end
end
-- [2] DUMMY LOGIC
if overlay.IsDummy then
if overlay.SOE_UseAtlas then
overlay.texture:SetAtlas(overlay.SOE_UseAtlas)
elseif overlay.SOE_UseTexture then
overlay.texture:SetTexture(overlay.SOE_UseTexture)
elseif overlay.SOE_UseIcon then
overlay.texture:SetTexture(overlay.SOE_UseIcon)
end
if overlay.SOE_TexCoords then
local c = overlay.SOE_TexCoords
overlay.texture:SetTexCoord(c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8])
else
overlay.texture:SetTexCoord(0, 1, 0, 1)
end
end
local forcedGroup = overlay.SOE_GroupName
local currentGroup = forcedGroup or SOE:GetGroupKey(overlay.spellID, mainTexture)
-- Auto-Snapshot (Live Only)
if not forcedGroup and not overlay.IsDummy and currentGroup then
local snap = self.db.global.snapshots[currentGroup]
local ulx = 0
if mainTexture then ulx = mainTexture:GetTexCoord() end
local posStr = overlay.position and string.lower(overlay.position) or ""
local isRight = string.find(posStr, "right") or (ulx and ulx > 0.4)
local currentSide = isRight and "right" or "left"
if not snap or not snap[currentSide] then
SOE:SnapshotOverlay(overlay)
end
end
local settings = self:GetSettingsForActiveOverlay(overlay.spellID, currentGroup, mainTexture)
if not settings then return end
SOE:EnsureHelperExists(overlay)
local glow = overlay.SOE_Glow
-- [3] POSITIONAL LOGIC & BASE SIZE
-- Added a check for overlay.position so recycled frames don't keep hiding or overlapping
if not overlay.SOE_BaseCoords or overlay.SOE_LastSpellBase ~= overlay.spellID or overlay.SOE_LastPos ~= overlay.position then
overlay.SOE_BaseCoords = { mainTexture:GetTexCoord() }
overlay.SOE_LastSpellBase = overlay.spellID
overlay.SOE_LastPos = overlay.position
end
local c = overlay.SOE_BaseCoords
local ULx = c[1] or 0
local isRightSide = (overlay.position and string.find(string.lower(overlay.position), "right")) or (ULx and ULx > 0.5)
local groupName = currentGroup
local isDualProc = groupName and DUAL_PROCS[groupName]
local baseW, baseH = 256, 256
if overlay.IsDummy then
baseW = overlay.SOE_OrigW or 256
baseH = overlay.SOE_OrigH or 256
elseif overlay.SOE_OrigW then
baseW = overlay.SOE_OrigW
baseH = overlay.SOE_OrigH
end
local mainW, mainH = baseW, baseH
local offsetX = settings.x or 0
local offsetY = settings.y or 0
local targetRotation = settings.rotation or 0
local targetMirror = settings.mirror or false
local targetWidth = settings.width or 0
local targetHeight = settings.height or 0
if isDualProc and isRightSide then
offsetX = settings.x2 or 0
offsetY = settings.y2 or 0
targetRotation = settings.rotation2 or 0
targetMirror = settings.mirror2 or false
targetWidth = settings.width2 or 0
targetHeight = settings.height2 or 0
end
if targetWidth > 0 then mainW = targetWidth end
if targetHeight > 0 then mainH = targetHeight end
-- exclusive to change default size of the proc
if groupName == "Heating Up" then
if targetWidth <= 0 then mainW = baseW * 0.5 end
if targetHeight <= 0 then mainH = baseH * 0.5 end
end
-- [4] CALCULATE VISUALS & PULSE
local pulseFactor = 1.0
if settings.pulseEnabled then
local speed = settings.pulseSpeed or 1.5
local min = settings.pulseMin or 0.3
pulseFactor = min + (1 - min) * (0.5 * (math.sin(GetTime() * speed) + 1))
end
local baseAlpha = (isRightSide and isDualProc) and (settings.alpha2 or 1.0) or (settings.alpha or 1.0)
local finalAlpha = baseAlpha * pulseFactor
if finalAlpha <= 0 then
SOE:HideOverlay(overlay)
return
end
-- [5] APPLY SCALE & POSITION
local scale = settings.scale or 1.0
overlay:SetSize(mainW * scale, mainH * scale)
local currentPoint, _, _, currentX, currentY = overlay:GetPoint()
if not currentPoint or math.abs(currentX - offsetX) > 0.1 or math.abs(currentY - offsetY) > 0.1 then
overlay:ClearAllPoints()
overlay:SetPoint("CENTER", UIParent, "CENTER", offsetX, offsetY)
end
-- [6] APPLY SYMMETRY, COLORS & TEXTURE STYLING
mainTexture:SetDesaturated(settings.desaturate)
mainTexture:SetBlendMode(settings.blendMode or "BLEND")
-- Rotation
mainTexture:SetRotation(math.rad(targetRotation))
-- Mirroring (Swaps the Left X and Right X texture coordinates)
if targetMirror then
mainTexture:SetTexCoord(c[5], c[6], c[7], c[8], c[1], c[2], c[3], c[4])
else
mainTexture:SetTexCoord(c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8])
end
local r1, g1, b1, a1 = UnpackColor(settings.color)
local r2, g2, b2, a2 = UnpackColor(settings.color2)
local combinedAlpha1 = a1 * finalAlpha
local combinedAlpha2 = a2 * finalAlpha
if settings.gradient and settings.gradient ~= "NONE" then
mainTexture:SetGradient(settings.gradient, CreateColor(r1, g1, b1, combinedAlpha1), CreateColor(r2, g2, b2, combinedAlpha2))
else
mainTexture:SetVertexColor(r1, g1, b1, combinedAlpha1)
end
-- [7] BORDER / GLOW APPLICATION
if settings.borderEnabled and glow then
glow:Show()
local atlasName = mainTexture:GetAtlas()
if atlasName then
glow:SetAtlas(atlasName)
else
if mainTexture:GetTexture() then
glow:SetTexture(mainTexture:GetTexture())
end
end
glow:SetBlendMode(settings.borderBlendMode or "ADD")
-- Sync Glow Symmetry
glow:SetRotation(math.rad(targetRotation))
if targetMirror then
glow:SetTexCoord(c[5], c[6], c[7], c[8], c[1], c[2], c[3], c[4])
else
glow:SetTexCoord(c[1], c[2], c[3], c[4], c[5], c[6], c[7], c[8])
end
local bScale = settings.borderScale or 1.05
glow:SetSize(mainW * scale * bScale, mainH * scale * bScale)
glow:ClearAllPoints()
glow:SetPoint("CENTER", overlay, "CENTER", 0, 0)
local br, bg, bb, ba = UnpackColor(settings.borderColor)
glow:SetVertexColor(br, bg, bb, ba)
glow:SetAlpha(finalAlpha * (settings.borderAlpha or 1.0))
else
if glow then glow:Hide() end
end
end
function SOE:RefreshAllOverlays()
local frame = SpellActivationOverlayFrame
if frame and frame.overlayPool then
for overlay in frame.overlayPool:EnumerateActive() do
SOE:ApplyToOverlay(overlay)
end
end
if SOE.DummyFrame1 and SOE.DummyFrame1:IsShown() then SOE:ApplyToOverlay(SOE.DummyFrame1) end
if SOE.DummyFrame2 and SOE.DummyFrame2:IsShown() then SOE:ApplyToOverlay(SOE.DummyFrame2) end
end
function SOE:TriggerUpdate(spellID)
if not spellID then return end
self:RefreshAllOverlays()
end
function SOE:OnFrameUpdate(elapsed)
if SOE.IsPreviewActive then
local ACD = LibStub("AceConfigDialog-3.0")
local container = ACD.OpenFrames[addonName]
if not container or not container.frame or not container.frame:IsShown() then
SOE:HidePreview()
end
if SOE.DummyFrame1 and SOE.DummyFrame1:IsShown() then SOE:ApplyToOverlay(SOE.DummyFrame1) end
if SOE.DummyFrame2 and SOE.DummyFrame2:IsShown() then SOE:ApplyToOverlay(SOE.DummyFrame2) end
end
local frame = SpellActivationOverlayFrame
if frame and frame.overlayPool then
for overlay in frame.overlayPool:EnumerateActive() do
if not overlay.IsDummy and overlay:IsShown() then
SOE:ApplyToOverlay(overlay)
end
end
end
end
function SOE:SnapshotOverlay(overlay)
if not overlay.spellID then return end
local texPath = nil
local isAtlas = false
local atlasName = overlay.texture and overlay.texture:GetAtlas()
if atlasName then
texPath = atlasName
isAtlas = true
else
texPath = overlay.texture and overlay.texture:GetTexture()
end
if not texPath then texPath = overlay.SOE_RealTexture end
if not texPath then return end
local group = SOE:GetGroupKey(overlay.spellID, overlay.texture)
if not group then return end
if not self.db.global.snapshots[group] then self.db.global.snapshots[group] = {} end
-- FIXED: Prevent corrupted snapshot dimensions
local w = overlay.SOE_OrigW or 256
local h = overlay.SOE_OrigH or 256
if w <= 0 or h <= 0 then return end -- reject 0x0 invisible frames
if w > 1024 then w = 256 end
if h > 1024 then h = 256 end
local s = overlay.SOE_OrigScale or 1.0
local ulx, uly, llx, lly, urx, ury, lrx, lry = 0,0,0,1,1,0,1,1
if overlay.texture then
ulx, uly, llx, lly, urx, ury, lrx, lry = overlay.texture:GetTexCoord()
end
-- FIXED: Rely on Blizzard's position tag first, fallback to math if missing
local posStr = overlay.position and string.lower(overlay.position) or ""
local isRight = string.find(posStr, "right") or (ulx and ulx > 0.4)
local slot = isRight and "right" or "left"
local exists = self.db.global.snapshots[group][slot]
self.db.global.snapshots[group][slot] = {
texture = texPath, width = w, height = h, scale = s,
isAtlas = isAtlas,
texCoords = { ulx, uly, llx, lly, urx, ury, lrx, lry }
}
if not exists then
LibStub("AceConfigRegistry-3.0"):NotifyChange(addonName)
end
end
function SOE:HidePreview()
if SOE.DummyFrame1 then SOE.DummyFrame1:Hide() end
if SOE.DummyFrame2 then SOE.DummyFrame2:Hide() end
SOE.IsPreviewActive = false
end
function SOE:PreviewSelected()
if not selectedSpecID then print("|cff33ff99SOE:|r Select a Spec first.") return end
local snapshots = self.db.global.snapshots[selectedGroupName or "Unknown"]
if selectedGroupName ~= "Maelstrom Weapon (Stage 1-4)" and (not snapshots or (not snapshots.left and not snapshots.right)) then
print("|cff33ff99SOE:|r No snapshot data for " .. (selectedGroupName or "Unknown"))
print("|cff33ff99SOE:|r Please trigger the proc in combat first to capture it.")
return
end
if SOE.IsPreviewActive and SOE.LastPreviewedGroup == selectedGroupName and not SOE.ForceShow then
SOE:HidePreview()
print("|cff33ff99SOE:|r Preview Hidden.")
return
end
SOE:HidePreview()
SOE.IsPreviewActive = true
SOE.ForceShow = false
SOE.LastPreviewedGroup = selectedGroupName
local function SpawnDummy(index, snapshotData)
local fName = "SOE_PreviewFrame"..index
local f = _G[fName]
if not f then
f = CreateFrame("Frame", fName, SpellActivationOverlayFrame)
f:SetFrameStrata("DIALOG")
f.IsDummy = true
f.texture = f:CreateTexture(nil, "ARTWORK")
f.texture:SetAllPoints()
SOE:EnsureHelperExists(f)
if index == 1 then SOE.DummyFrame1 = f else SOE.DummyFrame2 = f end
end
f.spellID = SOE:GetSpellIDFromKey(selectedGroupName)
f.SOE_GroupName = selectedGroupName
f.SOE_UseAtlas = nil
f.SOE_UseTexture = nil
f.SOE_TexCoords = nil
f.texture:SetTexture(nil)
f.texture:SetAtlas(nil)
f.texture:SetTexCoord(0, 1, 0, 1)
-- FIXED: Explicitly tell ApplyToOverlay which dummy this is so Right-side config options apply
f.position = (index == 2) and "Right" or "Left"
if selectedGroupName == "Maelstrom Weapon (Stage 1-4)" then
f.SOE_UseTexture = 1028139
if snapshotData then
f.SOE_OrigW = snapshotData.width
f.SOE_OrigH = snapshotData.height
else
f.SOE_OrigW = 256
f.SOE_OrigH = 256
end
f:Show()
SOE:ApplyToOverlay(f)
return
end
if snapshotData then
f.SOE_OrigW = snapshotData.width
f.SOE_OrigH = snapshotData.height
if snapshotData.isAtlas then
f.SOE_UseAtlas = snapshotData.texture
else
f.SOE_UseTexture = snapshotData.texture
end
if snapshotData.texCoords then
f.SOE_TexCoords = snapshotData.texCoords
end
f:Show()
SOE:ApplyToOverlay(f)
end
end
if selectedGroupName == "Maelstrom Weapon (Stage 1-4)" then
SpawnDummy(1, snapshots and snapshots.left)
else
if snapshots.left then SpawnDummy(1, snapshots.left) end
if snapshots.right then SpawnDummy(2, snapshots.right) end
end
print("|cff33ff99SOE:|r Previewing: " .. (selectedGroupName or "Unknown"))
end
-----------------------------------------------------------------------
-- 4. CONFIGURATION UI
-----------------------------------------------------------------------
function SOE:GetEditingConfig()
if not selectedSpecID then return DUMMY_CONFIG end
local profile = self.db.profile
if not profile.specs then profile.specs = {} end
local specDB = profile.specs[selectedSpecID]
if not specDB then
specDB = { global = CopyTable(defaults.profile.specs['*'].global), spells = {} }
profile.specs[selectedSpecID] = specDB
end
if not specDB.global then specDB.global = CopyTable(defaults.profile.specs['*'].global) end
if not specDB.spells then specDB.spells = {} end
local targetDB = specDB.global
if selectedGroupName and selectedGroupName ~= "Global" then
if not specDB.spells[selectedGroupName] then
local source = specDB.global
-- Only auto-inherit for Max or 5-9. Leave 1-4 clean or copy 5-9 if exists.
if string.find(selectedGroupName, "Maelstrom Weapon") then
if specDB.spells["Maelstrom Weapon (Stage 5-9)"] then
source = specDB.spells["Maelstrom Weapon (Stage 5-9)"]
elseif specDB.spells["Maelstrom Weapon"] then
source = specDB.spells["Maelstrom Weapon"]
end
end
specDB.spells[selectedGroupName] = CopyTable(source)
end
targetDB = specDB.spells[selectedGroupName]
end
local uiDefaults = SOE:ResolveDefaultsFor(selectedGroupName)
local safeUI = setmetatable({}, {
__index = function(t, k)
if targetDB[k] ~= nil then return targetDB[k] end
if uiDefaults[k] ~= nil then return uiDefaults[k] end
return 0
end,
__newindex = function(t, k, v) targetDB[k] = v end
})
return safeUI
end
function SOE:GetOptions()
local function GetProcList()
local list = { ["Global"] = "Global (All Spells)" }
if not selectedSpecID then return list end
if SPELL_GROUPS[selectedSpecID] then
for groupName, ids in pairs(SPELL_GROUPS[selectedSpecID]) do
local firstID = ids[1]
local info = C_Spell.GetSpellInfo(firstID)
local icon = info and info.iconID
-- Names displayed in dropdown
local displayName = groupName
if info and info.name then
displayName = info.name
-- Keeping custom mods like "(2nd proc) into the name"
local modifier = string.match(groupName, "%s*(%(.+%))")
if modifier and not string.find(displayName, "%(") then
displayName = displayName .. " " .. modifier
end
end
if groupName ~= "Maelstrom Weapon" then
list[groupName] = icon and ("|T"..icon..":14:14:0:0|t " .. displayName) or displayName
end
end
end
if SPELL_GROUPS[selectedSpecID] and SPELL_GROUPS[selectedSpecID]["Maelstrom Weapon"] then
local ids = SPELL_GROUPS[selectedSpecID]["Maelstrom Weapon"]
local info = C_Spell.GetSpellInfo(ids[1])
local icon = info and info.iconID
local p = icon and "|T"..icon..":14:14:0:0|t " or ""
-- Localized name for Maelstrom Weapon, fallback to English if nil
local localBase = (info and info.name) and info.name or "Maelstrom Weapon"
-- Applying the custom modifiers to the dropdown
list["Maelstrom Weapon (Stage 1-4)"] = p .. localBase .. " (Stage 1-4)"
list["Maelstrom Weapon (Stage 5-9)"] = p .. localBase .. " (Stage 5-9)"
list["Maelstrom Weapon (Max 10)"] = p .. localBase .. " (Max 10)"
end
local specDB = SOE.db.profile.specs[selectedSpecID]
if specDB and specDB.spells then
for name, _ in pairs(specDB.spells) do
local isValid = list[name] ~= nil
or (SPELL_GROUPS[selectedSpecID] and SPELL_GROUPS[selectedSpecID][name])
or string.find(name, "Maelstrom Weapon")
if not list[name] and isValid then
list[name] = name .. " (Saved)"
end
end
end
return list
end
local function GetSortedProcKeys()
local list = GetProcList()
local keys = {}
for k in pairs(list) do if k ~= "Global" then table.insert(keys, k) end end
table.sort(keys)
table.insert(keys, 1, "Global")
return keys
end
local function IsDual() return selectedGroupName and DUAL_PROCS[selectedGroupName] end
return {
type = "group", name = "|cff33ff99SpellOverlay Enhanced|r", childGroups = "tab",
args = {
settings = {
order = 1, type = "group", name = "Settings",
args = {
selection = {
order = 1, type = "group", name = "Configuration Target", inline = true,
args = {
classSelect = { order = 1, type = "select", name = "Class", width = "fill",
values = function()
local classes = {}
for i = 1, GetNumClasses() do
local name, tag, id = GetClassInfo(i)
if name then classes[id] = "|c" .. (RAID_CLASS_COLORS[tag].colorStr or "ffffffff") .. name .. "|r" end
end
return classes
end,
get = function() return selectedClassID end,
set = function(_, val) selectedClassID = val; selectedSpecID = nil; selectedGroupName = nil; SOE:HidePreview() end,
},
specSelect = { order = 2, type = "select", name = "Specialization", width = "fill", disabled = function() return not selectedClassID end,
values = function()
local specs = {}
if not selectedClassID then return specs end
for i = 1, 4 do
local id, name, _, icon = GetSpecializationInfoForClassID(selectedClassID, i)
if id then specs[id] = "|T"..icon..":14:14:0:0|t " .. name end
end
return specs
end,
get = function() return selectedSpecID end,
set = function(_, val) selectedSpecID = val; selectedGroupName = nil; SOE:HidePreview() end,
},
break_line = { order = 4, type = "description", name = "\n" },
procSelect = { order = 5, type = "select", name = "Spell / Proc", width = "double", values = GetProcList, sorting = GetSortedProcKeys, disabled = function() return not selectedSpecID end, get = function() return selectedGroupName or "Global" end, set = function(_, val) selectedGroupName = val; SOE:HidePreview(); SOE.LastPreviewedGroup = nil end },
resetBtn = { order = 6, type = "execute", name = "Reset Override", width = 0.8, disabled = function() return not selectedGroupName or selectedGroupName == "Global" end, func = function() if selectedSpecID and selectedGroupName then SOE.db.profile.specs[selectedSpecID].spells[selectedGroupName] = nil; SOE:RefreshAllOverlays() end end },
previewBtn = { order = 7, type = "execute", name = "Test / Preview", width = 0.8, disabled = function() return not selectedSpecID end, func = function() SOE.ForceShow = false; SOE:PreviewSelected() end }
}
},
spacer = { order = 9, type = "description", name = " " },
positioning = {
order = 10, type = "group", name = "Positioning", inline = true, disabled = function() return not selectedSpecID end,
args = {
scale = { order = 1, type = "range", name = "Scale", min = 0, max = 2.0, step = 0.01, isPercent = true, width = "fill", get = function() return SOE:GetEditingConfig().scale end, set = function(_, val) SOE:GetEditingConfig().scale = val; SOE:RefreshAllOverlays() end },
header1 = { order = 10, type = "header", name = function() return IsDual() and "Left Texture" or "Offset" end },
posX = { order = 11, type = "range", name = "X Offset", min = -500, max = 500, step = 1, width = "fill", get = function() return SOE:GetEditingConfig().x end, set = function(_, val) SOE:GetEditingConfig().x = val; SOE:RefreshAllOverlays() end },
posY = { order = 12, type = "range", name = "Y Offset", min = -500, max = 500, step = 1, width = "fill", get = function() return SOE:GetEditingConfig().y end, set = function(_, val) SOE:GetEditingConfig().y = val; SOE:RefreshAllOverlays() end },
header2 = { order = 20, type = "header", name = "Right Texture", hidden = function() return not IsDual() end },
posX2 = { order = 21, type = "range", name = "X Offset (Right)", min = -500, max = 500, step = 1, width = "fill", hidden = function() return not IsDual() end, get = function() return SOE:GetEditingConfig().x2 end, set = function(_, val) SOE:GetEditingConfig().x2 = val; SOE:RefreshAllOverlays() end },
posY2 = { order = 22, type = "range", name = "Y Offset (Right)", min = -500, max = 500, step = 1, width = "fill", hidden = function() return not IsDual() end, get = function() return SOE:GetEditingConfig().y2 end, set = function(_, val) SOE:GetEditingConfig().y2 = val; SOE:RefreshAllOverlays() end },
}
},
symmetry = {
order = 11, type = "group", name = "Symmetry & Size", inline = true, disabled = function() return not selectedSpecID end,
args = {
header1 = { order = 1, type = "header", name = function() return IsDual() and "Left Texture" or "Rotation, Mirror & Size" end },
rotation = { order = 2, type = "range", name = "Rotation (Degrees)", min = 0, max = 360, step = 1, width = "normal", get = function() return SOE:GetEditingConfig().rotation end, set = function(_, val) SOE:GetEditingConfig().rotation = val; SOE:RefreshAllOverlays() end },
mirror = { order = 3, type = "toggle", name = "Mirror Horizontally", width = "normal", get = function() return SOE:GetEditingConfig().mirror end, set = function(_, val) SOE:GetEditingConfig().mirror = val; SOE:RefreshAllOverlays() end },
-- [SMART SLIDERS] Fetches from the snapshot database if the user hasn't set a custom override
width = { order = 4, type = "range", name = "Width", min = 10, max = 1000, step = 1, width = "normal",
get = function()
local w = SOE:GetEditingConfig().width or 0
if w > 0 then return w end
local snap = SOE.db.global.snapshots[selectedGroupName]
return (snap and snap.left and snap.left.width) and snap.left.width or 256
end,
set = function(_, val) SOE:GetEditingConfig().width = val; SOE:RefreshAllOverlays() end
},
height = { order = 5, type = "range", name = "Height", min = 10, max = 1000, step = 1, width = "normal",
get = function()
local h = SOE:GetEditingConfig().height or 0
if h > 0 then return h end
local snap = SOE.db.global.snapshots[selectedGroupName]
return (snap and snap.left and snap.left.height) and snap.left.height or 256
end,
set = function(_, val) SOE:GetEditingConfig().height = val; SOE:RefreshAllOverlays() end
},
header2 = { order = 10, type = "header", name = "Right Texture", hidden = function() return not IsDual() end },
rotation2 = { order = 11, type = "range", name = "Rotation (Right)", min = 0, max = 360, step = 1, width = "normal", hidden = function() return not IsDual() end, get = function() return SOE:GetEditingConfig().rotation2 end, set = function(_, val) SOE:GetEditingConfig().rotation2 = val; SOE:RefreshAllOverlays() end },
mirror2 = { order = 12, type = "toggle", name = "Mirror (Right)", width = "normal", hidden = function() return not IsDual() end, get = function() return SOE:GetEditingConfig().mirror2 end, set = function(_, val) SOE:GetEditingConfig().mirror2 = val; SOE:RefreshAllOverlays() end },
width2 = { order = 13, type = "range", name = "Width (Right)", min = 10, max = 1000, step = 1, width = "normal", hidden = function() return not IsDual() end,
get = function()
local w = SOE:GetEditingConfig().width2 or 0
if w > 0 then return w end
local snap = SOE.db.global.snapshots[selectedGroupName]
return (snap and snap.right and snap.right.width) and snap.right.width or 256
end,
set = function(_, val) SOE:GetEditingConfig().width2 = val; SOE:RefreshAllOverlays() end
},
height2 = { order = 14, type = "range", name = "Height (Right)", min = 10, max = 1000, step = 1, width = "normal", hidden = function() return not IsDual() end,
get = function()
local h = SOE:GetEditingConfig().height2 or 0
if h > 0 then return h end
local snap = SOE.db.global.snapshots[selectedGroupName]
return (snap and snap.right and snap.right.height) and snap.right.height or 256
end,
set = function(_, val) SOE:GetEditingConfig().height2 = val; SOE:RefreshAllOverlays() end
},
}
},
visuals = {
order = 20, type = "group", name = "Visual Customization", inline = true, disabled = function() return not selectedSpecID end,
args = {
alpha = { order = 1, type = "range", name = function() return IsDual() and "Opacity (Left)" or "Opacity" end, min = 0, max = 1.0, step = 0.01, isPercent = true, width = "fill", get = function() return SOE:GetEditingConfig().alpha end, set = function(_, val) SOE:GetEditingConfig().alpha = val; SOE:RefreshAllOverlays() end },
alpha2 = { order = 1.5, type = "range", name = "Opacity (Right)", min = 0, max = 1.0, step = 0.01, isPercent = true, width = "fill", hidden = function() return not IsDual() end, get = function() return SOE:GetEditingConfig().alpha2 end, set = function(_, val) SOE:GetEditingConfig().alpha2 = val; SOE:RefreshAllOverlays() end },
gradientMode = { order = 2, type = "select", name = "Color Mode", width = "fill", values = { ["NONE"] = "Solid", ["VERTICAL"] = "Gradient (V)", ["HORIZONTAL"] = "Gradient (H)" }, get = function() return SOE:GetEditingConfig().gradient end, set = function(_, val) SOE:GetEditingConfig().gradient = val; SOE:RefreshAllOverlays() end },
color = { order = 3, type = "color", name = "Primary Color", hasAlpha = true, width = "half", get = function() local s=SOE:GetEditingConfig().color; return s.r,s.g,s.b,s.a end, set = function(_,r,g,b,a) SOE:GetEditingConfig().color={r=r,g=g,b=b,a=a}; SOE:RefreshAllOverlays() end },
color2 = { order = 4, type = "color", name = "Secondary Color", hasAlpha = true, width = "half", hidden = function() return SOE:GetEditingConfig().gradient=="NONE" end, get = function() local s=SOE:GetEditingConfig().color2; return s.r,s.g,s.b,s.a end, set = function(_,r,g,b,a) SOE:GetEditingConfig().color2={r=r,g=g,b=b,a=a}; SOE:RefreshAllOverlays() end },
desaturate = { order = 10, type = "toggle", name = "Desaturate", width = "fill", get = function() return SOE:GetEditingConfig().desaturate end, set = function(_, val) SOE:GetEditingConfig().desaturate = val; SOE:RefreshAllOverlays() end },
blendMode = { order = 11, type = "select", name = "Texture Style", width = "fill", values = { ["BLEND"]="Opaque", ["ADD"]="Glow" }, get = function() return SOE:GetEditingConfig().blendMode end, set = function(_, val) SOE:GetEditingConfig().blendMode = val; SOE:RefreshAllOverlays() end },
-- GLOW
break_glow = { order = 12, type = "header", name = "Border Settings" },