comparison Modules/BuffFrame.lua @ 64:ba9c13261bb2

- parametrize buff button customizations
author Nenue
date Wed, 17 Aug 2016 15:26:54 -0400
parents ef4116179e2f
children f80ee484ac8a
comparison
equal deleted inserted replaced
63:619dc10924af 64:ba9c13261bb2
8 Known Limitations: 8 Known Limitations:
9 - Individual BuffButton frames are created upon use, making it difficult to do any sort of securestate priming 9 - Individual BuffButton frames are created upon use, making it difficult to do any sort of securestate priming
10 - TempEnchant info returns relative values only, and they don't synchronize with aura events 10 - TempEnchant info returns relative values only, and they don't synchronize with aura events
11 - BuffButtons can only be hidden/shown by blizzcode, so functions doing that have to be accounted for 11 - BuffButtons can only be hidden/shown by blizzcode, so functions doing that have to be accounted for
12 --]] 12 --]]
13
14 local BUFF_BUTTON_SIZE = 48
15 local BUFF_PROGRESS_SIZE = 4
16 local BUFF_PROGRESS_INSET = 1
17 local BUFF_BUTTON_ZOOM = 0
13 18
14 19
15 local plugin = CreateFrame('Frame', 'VeneerBuffFrame', UIParent) 20 local plugin = CreateFrame('Frame', 'VeneerBuffFrame', UIParent)
16 local vn, print = LibStub("LibKraken").register(VeneerController, plugin) 21 local vn, print = LibStub("LibKraken").register(VeneerController, plugin)
17 22
184 tickCounter[frame] = (tickCounter[frame] or 0) + 1 189 tickCounter[frame] = (tickCounter[frame] or 0) + 1
185 190
186 191
187 print(tickCounter[frame], frame:GetName(), '|cFFFFFF00'..slot..'|r') 192 print(tickCounter[frame], frame:GetName(), '|cFFFFFF00'..slot..'|r')
188 skinnedFrames[frame] = frame 193 skinnedFrames[frame] = frame
189 frame:SetSize(48,48) 194 frame:SetSize(BUFF_BUTTON_SIZE,BUFF_BUTTON_SIZE)
190 icon:SetTexCoord(0,1,0,1) 195
196 local offset = BUFF_BUTTON_ZOOM/2
197 icon:SetTexCoord(offset, 1 - offset, offset, 1 - offset)
191 if border then 198 if border then
192 border:SetSize(50,50) 199 border:SetSize(50,50)
193 end 200 end
194 if duration then 201 if duration then
195 duration:ClearAllPoints() 202 duration:ClearAllPoints()