/trunk/libs
@version 1.1 |
--]] |
local MAJOR,MINOR,REVISION = "LibExtraTip", 1, "$Revision: 297 $" |
local MAJOR,MINOR,REVISION = "LibExtraTip", 1, "$Revision: 302 $" |
-- A string unique to this version to prevent frame name conflicts. |
local LIBSTRING = MAJOR.."_"..MINOR.."_"..REVISION |
OnTooltipCleared(self) |
local reg = tooltipRegistry[self] |
reg.ignoreOnCleared = true |
local _,q,l,_,r= GetContainerItemInfo(bag,slot) |
reg.quantity = q |
reg.additional.event = "SetBagItem" |
reg.additional.eventContainer = bag |
reg.additional.eventIndex = slot |
reg.additional.readable = r |
reg.additional.locked = l |
local tex,q,l,_,r,loot = GetContainerItemInfo(bag,slot) |
if tex then -- texture (only used as a test for occupied bagslot) |
reg.quantity = q |
reg.additional.event = "SetBagItem" |
reg.additional.eventContainer = bag |
reg.additional.eventIndex = slot |
reg.additional.readable = r |
reg.additional.locked = l |
reg.additional.lootable = loot |
end |
end, |
SetBuybackItem = function(self,index) |
end |
function class:InitLines() |
local n = self:NumLines() |
local changedLines = self.changedLines |
if not changedLines or changedLines < n then |
for i = (changedLines or 0) + 1, n do |
local nlines = self:NumLines() |
local changedLines = self.changedLines or 0 |
if changedLines < nlines then |
for i = changedLines + 1, nlines do |
local left,right = self.Left[i],self.Right[i] |
local font |
if i == 1 then |
right:SetFontObject(font) |
right:SetTextColor(r,g,b,a) |
end |
self.changedLines = n |
self.changedLines = nlines |
end |
end |
end |
function class:Show() |
self:InitLines() |
show(self) |
self:InitLines() |
end |
end |