-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTextures.lua
executable file
·104 lines (82 loc) · 2.54 KB
/
Textures.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
local addonName, ATOM = ...
local Module = ATOM:NewModule('Textures')
local CropAuraTextures, DarkenFrames
function Module:OnInitialize()
-- hooksecurefunc('TargetFrame_UpdateAuras', CropAuraTextures)
end
function Module:OnEnable()
DarkenFrames()
end
function CropAuraTextures(self)
local name = self:GetName()
local frame
for i = 1, MAX_TARGET_BUFFS do
frame = _G[name .. 'Buff' .. i .. 'Icon']
if frame then
frame:SetTexCoord(0.06, 0.94, 0.06, 0.94)
end
end
end
local function ChangeVertexColor(t, value, alpha)
if not t then
return
end
value = value or 64
alpha = alpha or 1
t:SetVertexColor(value / 255, value / 255, value / 255, alpha)
end
local function ConfigureActionBar(ba)
if not ba then
return
end
ba.minButtonPadding = 0
ba.buttonPadding = 0
ba:UpdateGridLayout()
end
local function ConfigureActionButton(bu)
if not bu then
return
end
local name = bu:GetName()
local ic = _G[name .. 'Icon']
local co = _G[name .. 'Count']
local ho = _G[name .. 'HotKey']
local na = _G[name .. 'Name']
local nt = _G[name .. 'NormalTexture']
local fob = _G[name .. 'FlyoutBorder']
local fobs = _G[name .. 'FlyoutBorderShadow']
-- co:Hide()
na:Hide()
ho:SetFont(DAMAGE_TEXT_FONT, 18, 'OUTLINE')
ic:SetTexCoord(0.1, 0.9, 0.1, 0.9)
ic:SetPoint('TOPLEFT', bu, 'TOPLEFT', 2, -2)
ic:SetPoint('BOTTOMRIGHT', bu, 'BOTTOMRIGHT', -2, 2)
ChangeVertexColor(nt)
ChangeVertexColor(bu.RightDivider)
if bu.SlotBackground then
bu.SlotBackground:SetTexture([[Interface\AddOns\ATOM\Textures\ButtonBackdrop]])
end
if fob then
fob:SetTexture(nil)
end
if fobs then
fobs:SetTexture(nil)
end
end
function DarkenFrames()
ChangeVertexColor(MainMenuBar.BorderArt)
ChangeVertexColor(MainMenuBar.EndCaps.RightEndCap, 120)
ChangeVertexColor(MainMenuBar.EndCaps.LeftEndCap, 120)
-- ConfigureActionBar(MainMenuBar)
-- ConfigureActionBar(MultiBarLeft)
-- ConfigureActionBar(MultiBarRight)
-- ConfigureActionBar(MultiBarBottomLeft)
-- ConfigureActionBar(MultiBarBottomRight)
for i = 1, NUM_ACTIONBAR_BUTTONS do
ConfigureActionButton(_G['ActionButton' .. i])
ConfigureActionButton(_G['MultiBarLeftButton' .. i])
ConfigureActionButton(_G['MultiBarRightButton' .. i])
ConfigureActionButton(_G['MultiBarBottomLeftButton' .. i])
ConfigureActionButton(_G['MultiBarBottomRightButton' .. i])
end
end