WoWInterface SVN Dashboard

Compare Revisions

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

Rev 6 → Rev 7

Dashboard.lua
159,6 → 159,7
 
needle.sval = needle.current or 0
needle.eval = speed
needle.elapsed = needle.elapsed or 0
 
-- Only reset the timer if we're changing direction
if dir ~= (needle.sval < needle.eval) then
183,18 → 184,10
local perc = needle.elapsed / 1.0
if perc > 1 then perc = 1 end
 
if needle.eval > needle.sval then
local current = cosineInterpolation(needle.sval, needle.eval, perc)
local angle = (current / 30) * -270
RotateTexture(needle, angle)
needle.current = current
else
-- Decelerating
local current = needle.sval - ((needle.sval - needle.eval) * perc)
local angle = (current / 30) * -270
RotateTexture(needle, angle)
needle.current = current
end
local current = cosineInterpolation(needle.sval, needle.eval, perc)
local angle = (current / 43) * -270
RotateTexture(needle, angle)
needle.current = current
end
 
DashboardFrame.needle.timer:SetScript("OnUpdate", Needle_OnUpdate)
211,7 → 204,15
counter = 0
 
local c,z,x,y = Astrolabe:GetCurrentPlayerPosition()
if not c then return end
 
if not base then
base = {Astrolabe:GetCurrentPlayerPosition()}
end
 
local dist = Astrolabe:ComputeDistance(c, z, x, y, unpack(base))
if not dist then return end
 
distance = distance + dist
base[1] = c
base[2] = z
226,12 → 227,4
--ChatFrame1:AddMessage(distance .. " : " .. (dist / elapsed))
end
 
local function OnUpdate_Once(self, elapsed)
if not base then
base = {Astrolabe:GetCurrentPlayerPosition()}
end
 
self:SetScript("OnUpdate", OnUpdate)
end
 
frame:SetScript("OnUpdate", OnUpdate_Once)
frame:SetScript("OnUpdate", OnUpdate)