# HG changeset patch # User Nenue # Date 1456128714 18000 # Node ID 0b1a2f3dbfc468a959ccb2c9b28dcd9143dc4d0f # Parent e08df0af184973ca816151109050797a41f220ff aura duration override triggering activation twice when aura data still exists briefly after duration end diff -r e08df0af1849 -r 0b1a2f3dbfc4 Turok/Modules/Combat/CombatLog.lua --- a/Turok/Modules/Combat/CombatLog.lua Sun Feb 21 13:11:44 2016 -0500 +++ b/Turok/Modules/Combat/CombatLog.lua Mon Feb 22 03:11:54 2016 -0500 @@ -44,9 +44,9 @@ defaultAnimation = 'slide', defaultFont = 'font0', textFonts = { - font0 = {"Interface\\Addons\\Turok\\Media\\font\\ArchivoNarrow-Regular.ttf", 18, 'OUTLINE'}, + font0 = {"Interface\\Addons\\Turok\\Media\\font\\ArchivoNarrow-Regular.ttf", 24, 'OUTLINE'}, font1 = {"Interface\\Addons\\Turok\\Media\\font\\ArchivoNarrow-Regular.ttf" , 30, 'OUTLINE'}, - font2 = {"Interface\\Addons\\Turok\\Media\\font\\ArchivoNarrow-Regular.ttf" , 24, 'OUTLINE'}, + font2 = {"Interface\\Addons\\Turok\\Media\\font\\ArchivoNarrow-Regular.ttf" , 26, 'OUTLINE'}, font3 = {"Interface\\Addons\\Turok\\Media\\font\\ArchivoNarrow-Regular.ttf" , 20, 'OUTLINE'}, }, diff -r e08df0af1849 -r 0b1a2f3dbfc4 Turok/Modules/Timer/Aura.lua --- a/Turok/Modules/Timer/Aura.lua Sun Feb 21 13:11:44 2016 -0500 +++ b/Turok/Modules/Timer/Aura.lua Mon Feb 22 03:11:54 2016 -0500 @@ -125,9 +125,16 @@ local state if self.cvars.duration and active ~= self.active then print('passive aura with forced duration') - state = self.flags.active - duration = self.cvars.duration - expires = GetTime() + self.cvars.duration + if active then + state = self.flags.active + duration = self.cvars.duration + expires = GetTime() + self.cvars.duration + else + duration = 0 + expires = 0 + state = self.cvars.persist and self.flags.passive or self.flags.hidden + end + elseif (not self.cvars.duration and (duration ~= self.duration or expires ~= self.expires)) or active ~= self.active then if not active then if (not self.untriggerFunc) or self:untriggerFunc() then diff -r e08df0af1849 -r 0b1a2f3dbfc4 Turok/Modules/Timer/Presets.lua --- a/Turok/Modules/Timer/Presets.lua Sun Feb 21 13:11:44 2016 -0500 +++ b/Turok/Modules/Timer/Presets.lua Mon Feb 22 03:11:54 2016 -0500 @@ -302,9 +302,10 @@ hideIcon = true, leftText = "", rightText= "", - width= 330, height = 12, padding = 0, + width= 330, height = 8, padding = 0, absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TkPowerBar', level = 1, - foreground_color = {1,0,0,1}, foreground_blend = 'BLEND', + foreground_color = {1,0,0,1}, foreground_blend = 'ADD', + background_color = {0,0,0,0}, background_blend = 'BLEND', sound_active = '', sound_hidden = '', sound_passive = '', }, { @@ -314,9 +315,10 @@ hideIcon = true, leftText = "", rightText= "", - height = 12, width= 160, padding = 0, + height = 8, width= 160, padding = 0, absolute = true, x = 0, y = 0, anchor = 'BOTTOMLEFT', anchorTo = 'BOTTOMLEFT', parent = 'TkPowerBar', level = 2, - foreground_color = {1,1,0,1}, foreground_blend = 'BLEND', + foreground_color = {1,1,0,1}, foreground_blend = 'ADD', + background_color = {0,0,0,0}, background_blend = 'BLEND', sound_active = '', sound_hidden = '', sound_passive = '', }, diff -r e08df0af1849 -r 0b1a2f3dbfc4 Turok/Modules/Utilities/Toast.lua --- a/Turok/Modules/Utilities/Toast.lua Sun Feb 21 13:11:44 2016 -0500 +++ b/Turok/Modules/Utilities/Toast.lua Mon Feb 22 03:11:54 2016 -0500 @@ -30,10 +30,10 @@ alert_hold = 2, alert_fade = 1, alert_flash = .6, - anchor = 'TOP', + anchor = 'TOPLEFT', parent = 'UIParent', - anchorTo = 'TOP', - x = 0, y= -56, + anchorTo = 'LEFT', + x =200, y= 0, loot = { background_color = {}, } @@ -306,10 +306,7 @@ end end -mod.OnEnable = function() - db = TurokData.toast - - --- find the closest frame to the center bottom and anchor to that +mod.GetToastsAnchor = function(self) local cX, cY = (GetScreenWidth() / 2), (GetScreenHeight() / 2) local min_skewness = cX @@ -344,6 +341,14 @@ end end end + return center_frame +end + +mod.OnEnable = function() + db = TurokData.toast + + --- find the closest frame to the center bottom and anchor to that + mod.num_events = 0 tkAlerts.alerts = {}