WoWInterface SVN oUF_Industrial

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 27 to Rev 26
    Reverse comparison

Rev 27 → Rev 26

Addon.lua
70,6 → 70,14
return color and ('|cff%02X%02X%02X%s|r'):format(color.r*255, color.g*255, color.b*255, shortclassnames[class]) or ''
end
 
function unit_happiness (unit)
local happiness = GetPetHappiness()
if unit == 'pet' and happiness then
return pethappiness[happiness]
end
return ''
end
 
function unit_level (unit)
local color = GetDifficultyColor(UnitLevel(unit))
return color and ('|cff%02X%02X%02X%s|r'):format(color.r*255, color.g*255, color.b*255, UnitLevel(unit))
107,11 → 115,12
local unit = frame.unit
if not UnitExists(unit) then return end
 
frame.Name:SetText(('%s %s %s%s'):format(
frame.Name:SetText(('%s %s %s%s %s'):format(
unit_level(unit),
unit_class(unit),
unit_name(unit),
unit_tapped(unit),
unit_happiness(unit)
))
end
 
123,7 → 132,6
local debuffs = CreateFrame('Frame', nil, frame)
local leader = health:CreateTexture(nil, 'OVERLAY')
local threat = frame:CreateTexture()
local happiness = frame:CreateTexture()
health.info = health:CreateFontString(nil, 'OVERLAY')
health.value = health:CreateFontString(nil, 'OVERLAY')
power.info = power:CreateFontString(nil, 'OVERLAY')
216,6 → 224,13
 
frame:SetScript('OnUpdate', frame_onupdate)
 
-- out of range fading
if unit and unit:match('party') or unit:match('raid') then
frame.Range = true
frame.inRangeAlpha = 1
frame.outsideRangeAlpha = 0.5
end
 
frame.Health = health
frame.OverrideUpdateHealth = nothing
frame.Power = power
228,27 → 243,12
frame.Threat = threat
end
 
function create_pet_unitframe(frame, unit)
create_unitframe(frame, unit)
 
local happiness = frame:CreateTexture()
happiness:SetPoint(MC, frame, BR)
happiness:SetWidth(16)
happiness:SetHeight(16)
 
frame.Happiness = happiness
end
 
function create_party_unitframe (frame, unit)
create_unitframe(frame, unit)
 
-- out of range fading
frame.Range = true
frame.inRangeAlpha = 1
frame.outsideRangeAlpha = 0.5
 
local buffs = frame.Buffs
 
 
local w = bar_width
local h = buffs.size
local n = math.floor(w / h)
270,12 → 270,10
end
 
oUF:RegisterStyle('Industrial', create_unitframe)
oUF:RegisterStyle('Industrial-pet', create_pet_unitframe)
oUF:RegisterStyle('Industrial-party', create_party_unitframe)
 
oUF:SetActiveStyle('Industrial-pet')
local pet = oUF:Spawn('pet', frame_name..'pet')
oUF:SetActiveStyle('Industrial')
local pet = oUF:Spawn('pet', frame_name..'pet')
local player = oUF:Spawn('player', frame_name..'player')
local target = oUF:Spawn('target', frame_name..'target')
local targettarget = oUF:Spawn('targettarget', frame_name..'targettarget')