Mercurial > wow > turok
comparison Fog.lua @ 2:62f9b057c91b
use GetTime() directly
| author | Nenue |
|---|---|
| date | Tue, 15 Dec 2015 08:24:51 -0500 |
| parents | 766d8a40a1d6 |
| children |
comparison
equal
deleted
inserted
replaced
| 1:766d8a40a1d6 | 2:62f9b057c91b |
|---|---|
| 54 local TL = 'Fog' | 54 local TL = 'Fog' |
| 55 local print = function(...) | 55 local print = function(...) |
| 56 _G.print(TL, ...) | 56 _G.print(TL, ...) |
| 57 end | 57 end |
| 58 --setprinthandler(function (...) T:debug('Fog', nil, ...) end) | 58 --setprinthandler(function (...) T:debug('Fog', nil, ...) end) |
| 59 local time = _G.ct | |
| 60 local FADE_OUT_TIME = 1 -- duration per 1-0 alpha transition | 59 local FADE_OUT_TIME = 1 -- duration per 1-0 alpha transition |
| 61 local FADE_IN_TIME = 0.4 -- duration per 0-1 alpha transition | 60 local FADE_IN_TIME = 0.4 -- duration per 0-1 alpha transition |
| 62 | 61 |
| 63 local inset_factor = { | 62 local inset_factor = { |
| 64 ['TOPLEFT'] = {-1, 1}, | 63 ['TOPLEFT'] = {-1, 1}, |
| 106 f:SetSize(config.width, config.height) | 105 f:SetSize(config.width, config.height) |
| 107 f:SetFrameStrata(config.strata) | 106 f:SetFrameStrata(config.strata) |
| 108 self:CreateStatusTextures(f, config) | 107 self:CreateStatusTextures(f, config) |
| 109 | 108 |
| 110 f.throttle_rate = 0.0166666666 -- ~60fps | 109 f.throttle_rate = 0.0166666666 -- ~60fps |
| 111 f.throttle_point = time | 110 f.throttle_point = GetTime() |
| 112 | 111 |
| 113 -- default handler | 112 -- default handler |
| 114 f.Update = T.Bar_Update | 113 f.Update = T.Bar_Update |
| 115 f.UpdateText = T.Bar_UpdateText | 114 f.UpdateText = T.Bar_UpdateText |
| 116 T:Bar_SetUpdateHandler(f, T.Bar_Update) | 115 T:Bar_SetUpdateHandler(f, T.Bar_Update) |
