Mercurial > wow > turok
comparison Turok/Layout/Layout.lua @ 9:9400a0ff8540
Ugh
Timer:
- container update directionality
- talent update iterates over a non-volatile table to carry out updates
- index management steps organized
- talentRow status implemented, returns the spell associated with the talent chosen from that row
CombatLog:
- sort out font controls and unbork arguments
author | Nenue |
---|---|
date | Sun, 21 Feb 2016 13:08:30 -0500 |
parents | a9b8b0866ece |
children |
comparison
equal
deleted
inserted
replaced
8:7790dff0fe13 | 9:9400a0ff8540 |
---|---|
64 local cType, cText, cNum, cWord, cKey, cPink, cBool = cType, cText, cNum, cWord, cKey, cPink, cBool | 64 local cType, cText, cNum, cWord, cKey, cPink, cBool = cType, cText, cNum, cWord, cKey, cPink, cBool |
65 local ADDON, scriptargs = ... | 65 local ADDON, scriptargs = ... |
66 scriptargs.LibFog = F | 66 scriptargs.LibFog = F |
67 local print = function(...) | 67 local print = function(...) |
68 if _G.Devian and _G.DevianDB.workspace ~= 1 then | 68 if _G.Devian and _G.DevianDB.workspace ~= 1 then |
69 _G.print('Layout', ...) | 69 --_G.print('Layout', ...) |
70 end | 70 end |
71 end | 71 end |
72 --- debug highlighters | 72 --- debug highlighters |
73 local namef = function(s) return '|cFFFFFF00' ..tostring(s).. '|r' end -- uiobject targeted function | 73 local namef = function(s) return '|cFFFFFF00' ..tostring(s).. '|r' end -- uiobject targeted function |
74 local namet = function(s) return '|cFFFF4400 '..tostring(s).. '|r' end -- region targeted function | 74 local namet = function(s) return '|cFFFF4400 '..tostring(s).. '|r' end -- region targeted function |
180 self.alpha_fade_in = c.alpha_fade_in or c.alpha_fade | 180 self.alpha_fade_in = c.alpha_fade_in or c.alpha_fade |
181 self.alpha_fade_out = c.alpha_fade_out or c.alpha_fade | 181 self.alpha_fade_out = c.alpha_fade_out or c.alpha_fade |
182 print(' fade on combat =', self.combatFade) | 182 print(' fade on combat =', self.combatFade) |
183 for _, type in ipairs({'alpha', 'alpha_ooc'}) do | 183 for _, type in ipairs({'alpha', 'alpha_ooc'}) do |
184 self[type] = c[type] | 184 self[type] = c[type] |
185 _G.print('DB', self:GetName(), type, self[type]) | 185 --_G.print('DB', self:GetName(), type, self[type]) |
186 for _, subtype in ipairs({'_passive', '_active'}) do | 186 for _, subtype in ipairs({'_passive', '_active'}) do |
187 self[type..subtype] = c[type..subtype] or self[type] | 187 self[type..subtype] = c[type..subtype] or self[type] |
188 _G.print('DB', self:GetName(), type..subtype, self[type..subtype]) | 188 --_G.print('DB', self:GetName(), type..subtype, self[type..subtype]) |
189 for _, subsubtype in ipairs({'_empty', '_half', '_full'}) do | 189 for _, subsubtype in ipairs({'_empty', '_half', '_full'}) do |
190 self[type..subtype..subsubtype] = c[type..subtype..subsubtype] or self[type..subtype] | 190 self[type..subtype..subsubtype] = c[type..subtype..subsubtype] or self[type..subtype] |
191 _G.print('DB', self:GetName(), type..subtype..subsubtype, self[type..subtype..subsubtype]) | 191 --_G.print('DB', self:GetName(), type..subtype..subsubtype, self[type..subtype..subsubtype]) |
192 self[type..subsubtype] = c[type..subsubtype] or self[type..subtype] | 192 self[type..subsubtype] = c[type..subsubtype] or self[type..subtype] |
193 _G.print('DB', self:GetName(), type..subsubtype, self[type..subsubtype]) | 193 --_G.print('DB', self:GetName(), type..subsubtype, self[type..subsubtype]) |
194 end | 194 end |
195 end | 195 end |
196 end | 196 end |
197 self.UpdateAlpha = F.UpdateAlpha | 197 self.UpdateAlpha = F.UpdateAlpha |
198 --if c.combatFade then | 198 --if c.combatFade then |
370 scale = self.fill_width | 370 scale = self.fill_width |
371 end | 371 end |
372 if self.fill_inverse then | 372 if self.fill_inverse then |
373 ratio = 1 - ratio | 373 ratio = 1 - ratio |
374 end | 374 end |
375 _G.print('Update', 'dx', self.fill_x) | 375 ----_G.print('Update', 'dx', self.fill_x) |
376 local x = | 376 local x = |
377 scale * ratio * directionCoord[self.fill_direction][1] | 377 scale * ratio * directionCoord[self.fill_direction][1] |
378 return min(x, scale) + self.fill_x | 378 return min(x, scale) + self.fill_x |
379 end | 379 end |
380 | 380 |
389 end | 389 end |
390 if self.fill_inverse then | 390 if self.fill_inverse then |
391 ratio = 1 - ratio | 391 ratio = 1 - ratio |
392 end | 392 end |
393 | 393 |
394 _G.print('Update', 'dy', self.fill_y) | 394 --_G.print('Update', 'dy', self.fill_y) |
395 -- (height of bar offset by the size of any overlapping element) * progress ratio, offset by the size of any overlapping embed + inset | 395 -- (height of bar offset by the size of any overlapping element) * progress ratio, offset by the size of any overlapping embed + inset |
396 local y = | 396 local y = |
397 scale * ratio * directionCoord[self.fill_direction][2] - self.foreground_inset | 397 scale * ratio * directionCoord[self.fill_direction][2] - self.foreground_inset |
398 return min(y, scale) + self.fill_y | 398 return min(y, scale) + self.fill_y |
399 end | 399 end |
400 local SetProgress = function(self, progress, scaleX, scaleY) | 400 local SetProgress = function(self, progress, scaleX, scaleY) |
401 _G.print('Update', cText(self:GetName()), | 401 --[[_G.print('Update', cText(self:GetName()), |
402 "\n d:", progress, 'dX:', directionCoord[self.fill_direction][1], 'dY:', directionCoord[self.fill_direction][2], 'dI:', self.fill_inverse, | 402 "\n d:", progress, 'dX:', directionCoord[self.fill_direction][1], 'dY:', directionCoord[self.fill_direction][2], 'dI:', self.fill_inverse, |
403 "\n peak:", self.fill_anchor, self.fill_anchorTo, TranslateX(self, progress), TranslateY(self,progress)) | 403 "\n peak:", self.fill_anchor, self.fill_anchorTo, TranslateX(self, progress), TranslateY(self,progress)) |
404 --]] | |
404 | 405 |
405 self.foreground:SetPoint(self.fill_anchor, self.background, self.fill_anchorTo, TranslateX(self, progress, scaleX), TranslateY(self, progress, scaleY)) | 406 self.foreground:SetPoint(self.fill_anchor, self.background, self.fill_anchorTo, TranslateX(self, progress, scaleX), TranslateY(self, progress, scaleY)) |
406 end | 407 end |
407 | 408 |
408 --- Assigns textures to the generic foreground background bar regions | 409 --- Assigns textures to the generic foreground background bar regions |