Skip to content
This repository has been archived by the owner on May 9, 2018. It is now read-only.

Commit

Permalink
- Remove ColorGradient function and just use the one oUF includes!
Browse files Browse the repository at this point in the history
- Remove auras from focus frame for now
- Comment out remaining Vehicle stuff
  • Loading branch information
rspeicher committed Dec 21, 2008
1 parent 982bf84 commit 9193213
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions layout.lua
Expand Up @@ -39,23 +39,6 @@ local menu = function(self)
end
end
local function ColorGradient(perc, ...)
if perc >= 1 then
local r, g, b = select(select('#', ...) - 2, ...)
return r, g, b
elseif perc <= 0 then
local r, g, b = ...
return r, g, b
end
local num = select('#', ...) / 3
local segment, relperc = math.modf(perc*(num-1))
local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...)
return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc
end
local select = select
--local UnitName = UnitName
local UnitLevel = UnitLevel
Expand Down Expand Up @@ -133,7 +116,7 @@ oUF.Tags["[perhpgrad]"] = function(u)
if v < 100 and v > 0 then
-- Color health percent value in a gradient
local r, g, b = ColorGradient(v / 100.00, -- Function expects a decimal
local r, g, b = oUF.ColorGradient(v / 100.00, -- Function expects a decimal
health[0].r, health[0].g, health[0].b,
health[1].r, health[1].g, health[1].b,
health[2].r, health[2].g, health[2].b
Expand Down Expand Up @@ -421,7 +404,7 @@ local func = function(settings, self, unit)

self.TaggedStrings = {name}
-- Pet ---------------------------------------
elseif unit == 'pet' or unit == 'vehicle' then
elseif unit == 'pet' then --or unit == 'vehicle' then
--local ib = createInfoBarFrame(self) -- Info Bar
local hp = createHealthBarFrame(self) -- Health Bar
local pp = createPowerBarFrame(hp) -- Power Bar
Expand Down Expand Up @@ -464,7 +447,7 @@ local func = function(settings, self, unit)
auras.initialAnchor = "TOPLEFT"
auras.numBuffs = 1
auras.numDebuffs = 3
self.Auras = auras
--self.Auras = auras

self.Health = hp
self.Power = pp
Expand Down

0 comments on commit 9193213

Please sign in to comment.