Quantcast
WoWInterface: SVN - oUF_ReadyCheck - Path Comparison - / Rev 6 and / Rev 7

WoWInterface SVN oUF_ReadyCheck

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 6 to Rev 7
    Reverse comparison

Rev 6 → Rev 7

trunk/oUF_ReadyCheck/oUF_ReadyCheck.lua
3,10 → 3,11
Elements handled:
.ReadyCheck [texture]
 
Shared:
Options:
- delayTime [value] default: 10
- fadeTime [value] default: 1.5
 
Add-on originally made by Starlon
--]]
 
local GetReadyCheckStatus = GetReadyCheckStatus
17,9 → 18,9
waiting = [=[Interface\RAIDFRAME\ReadyCheck-Waiting]=],
}
 
local OnUpdate
local onUpdate
do
function OnUpdate(self, elapsed)
function onUpdate(self, elapsed)
if(self.finish) then
self.finish = self.finish - elapsed
if(self.finish <= 0) then
47,16 → 48,15
end
end
 
local function Update(self)
local function update(self)
if(not IsRaidLeader() and not IsRaidOfficer() and not IsPartyLeader()) then return end
 
local texture = self.ReadyCheck
texture:SetTexture(statusTexture[GetReadyCheckStatus(self.unit)])
texture:SetAlpha(1)
texture:Show()
self.ReadyCheck:SetTexture(statusTexture[GetReadyCheckStatus(self.unit)])
self.ReadyCheck:SetAlpha(1)
self.ReadyCheck:Show()
end
 
local function PrepareFade(self)
local function prepare(self)
local readycheck = self.ReadyCheck
local dummy = readycheck.dummy
 
64,15 → 64,16
dummy.finish = readycheck.delayTime or 10
dummy.fade = readycheck.fadeTime or 1.5
dummy.offset = readycheck.fadeTime or 1.5
 
dummy:SetScript('OnUpdate', OnUpdate)
end
 
local function Enable(self)
local function enable(self)
local readycheck = self.ReadyCheck
if(readycheck) then
self:RegisterEvent('READY_CHECK', Update)
self:RegisterEvent('READY_CHECK_CONFIRM', Update)
self:RegisterEvent('READY_CHECK_FINISHED', PrepareFade)
self:RegisterEvent('READY_CHECK', update)
self:RegisterEvent('READY_CHECK_CONFIRM', update)
self:RegisterEvent('READY_CHECK_FINISHED', prepare)
 
readycheck.dummy = CreateFrame('Frame', nil, self)
 
80,12 → 81,12
end
end
 
local function Disable(self)
local function disable(self)
if(self.ReadyCheck) then
self:UnregisterEvent('READY_CHECK', Update)
self:UnregisterEvent('READY_CHECK_CONFIRM', Update)
self:UnregisterEvent('READY_CHECK_FINISHED', PrepareFade)
self:UnregisterEvent('READY_CHECK', update)
self:UnregisterEvent('READY_CHECK_CONFIRM', update)
self:UnregisterEvent('READY_CHECK_FINISHED', prepare)
end
end
 
oUF:AddElement('ReadyCheck', Update, Enable, Disable)
\ No newline at end of file +oUF:AddElement('ReadyCheck', update, enable, disable) \ No newline at end of file
trunk/oUF_ReadyCheck/oUF_ReadyCheck.toc
1,6 → 1,6
## Interface: 30100
## Author: p3lim, Starlon
## Version: 30100.wowi:revision
## Interface: 30200
## Author: p3lim
## Version: 30200.wowi:revision
## Title: oUF ReadyCheck
## Notes: ReadyCheck support for oUF layouts.
## RequiredDeps: oUF