WoWInterface SVN Bison1

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 23 to Rev 22
    Reverse comparison

Rev 23 → Rev 22

Facade.lua File deleted
BuffBar.lua
15,19 → 15,19
------------------------------------------------------------------------------------]]
local BisonButton = Bison:CreateClass( 'Button')
 
function BisonButton:New( bar, id, name)
local b = self:Bind( CreateFrame( 'Button', name, bar))
function BisonButton:New( bar, id)
local b = self:Bind( CreateFrame( 'Button', nil, bar))
b.bar = bar
b.timeLeft = nil
b:SetID( id)
b:SetWidth( 30)
b:SetHeight( 30)
b.icon = b:CreateTexture( name..'Icon', 'BACKGROUND')
b.icon = b:CreateTexture( nil, 'BACKGROUND')
b.icon:SetPoint( 'TOPRIGHT')
b.icon:SetPoint( 'BOTTOMLEFT')
b.count = b:CreateFontString( name..'Count', 'BACKGROUND', 'NumberFontNormal')
b.count = b:CreateFontString( nil, 'BACKGROUND', 'NumberFontNormal')
b.count:SetPoint( 'BOTTOMRIGHT', b, 'BOTTOMRIGHT', -2, 2)
b.left = b:CreateFontString( name..'Cooldown', 'ARTWORK', 'GameFontNormalSmall')
b.left = b:CreateFontString( nil, 'ARTWORK', 'GameFontNormalSmall')
b.left:SetPoint( 'TOP', b, 'BOTTOM')
b.ghostlabel = b:CreateFontString( nil, 'OVERLAY', 'GameFontHighlight')
b.ghostlabel:SetHeight( 10)
44,8 → 44,8
return b
end
 
function BisonButton:NewBuff( bar, id, name)
local b = self:New( bar, id, name)
function BisonButton:NewBuff( bar, id)
local b = self:New( bar, id)
b:RegisterForClicks( 'RightButtonUp')
b:SetScript( 'OnEnter', BisonButton.OnEnter)
b:SetScript( 'OnShow', BisonButton.Update)
54,16 → 54,16
return b
end
 
function BisonButton:NewDebuff( bar, id, name)
local b = self:New( bar, id, name)
function BisonButton:NewDebuff( bar, id)
local b = self:New( bar, id)
b:SetScript( 'OnEnter', BisonButton.OnEnter)
b:SetScript( 'OnShow', BisonButton.Update)
b:SetScript( 'OnUpdate', BisonButton.OnUpdate)
return b
end
 
function BisonButton:NewWeapon( bar, id, name)
local b = self:New( bar, id, name)
function BisonButton:NewWeapon( bar, id)
local b = self:New( bar, id)
b:RegisterForClicks( 'RightButtonUp')
b:SetScript( 'OnEnter', BisonButton.OnEnterWeapon)
b:SetScript( 'OnClick', BisonButton.OnClickWeapon)
366,14 → 366,14
for i = 1, size do
local b
if self.name == 'buff' then
b = BisonButton:NewBuff( self, i + offset, 'BisonBuff'..i)
b = BisonButton:NewBuff( self, i + offset)
b:SetGhost( tostring( b:GetID()), 0.2, 0.8, 0.2)
elseif self.name == 'debuff' then
b = BisonButton:NewDebuff( self, i + offset, 'BisonDebuff'..i)
b = BisonButton:NewDebuff( self, i + offset)
b:AddBorder()
b:SetGhost( tostring( b:GetID()), 0.8, 0.2, 0.2)
elseif self.name == 'weapon' then
b = BisonButton:NewWeapon( self, i + offset, 'BisonWeapon'..i)
b = BisonButton:NewWeapon( self, i + offset)
b:SetGhost( (b:GetID() == 17) and 'MH' or 'OH', 0.2, 0.2, 0.2)
end
b:Update()
391,6 → 391,10
self:SetAnchors()
end
 
function BisonBar:Sort()
table.sort( self.buttons, SORT[self.values.sort])
end
 
function BisonBar:OnUpdate( elapsed)
if updateTimeBuff < 0 then
updateTimeBuff = updateTimeBuff + UPDATE_TIME_BUFF
427,16 → 431,6
btnOff:Alpha( alphaValue)
end
 
function BisonBar:AddButtons( biGrp)
for i,b in pairs( self.buttons) do
biGrp:AddButton( b)
end
end
 
function BisonBar:Sort()
table.sort( self.buttons, SORT[self.values.sort])
end
 
function BisonBar:RestoreSettings( locked, values)
self.values = values
self:ClearAllPoints()
449,7 → 443,7
local last, lastFirst
local row = 1
local col = 1
for i,b in pairs( self.buttons) do
for i, b in pairs( self.buttons) do
b:ClearAllPoints()
if last and lastFirst then
if self.values.horizontal then
Bison.lua
123,17 → 123,6
self:Print( self.version)
end
 
local function GetBar( info)
return (type(info) == 'table') and info.arg or tostring(info)
end
 
function Bison:AddButtons( biGrp, info)
local bar = GetBar( info)
if self.db.profile[bar] then
self[bar]:AddButtons( biGrp)
end
end
 
--[[---------------------------------------------------------------------------------
Set/Get Methods
------------------------------------------------------------------------------------]]
169,6 → 158,10
self:SetEnabled( not self:IsEnabled())
end
 
local function GetBar( info)
return (type(info) == 'table') and info.arg or tostring(info)
end
 
function Bison:IsVisible( info)
local bar = GetBar( info)
return self.db.profile[bar] and self.db.profile[bar].show
Bison.toc
19,4 → 19,3
Bison.lua
BuffBar.lua
Options.lua
Facade.lua