From 1add7af4059ee2796c12def3ea70b6b93e0f9638 Mon Sep 17 00:00:00 2001 From: Tercio Date: Sat, 24 Jan 2015 20:17:00 -0200 Subject: [PATCH] - Attempt to fix Embed AddonSkins position using LibWindow-1.1 - Attempt to fix positioning after reopen a window previously closed on last logon. --- boot.lua | 8 +++-- classes/classe_instancia.lua | 10 ++---- core/windows.lua | 40 +++++++++++++---------- framework/panel.lua | 62 ++++++++++++++++++++++++++++++++---- functions/playerclass.lua | 34 ++++++++++++++++++++ functions/skins.lua | 15 +++------ gumps/janela_news.lua | 18 ++++++++--- gumps/janela_principal.lua | 6 ++-- startup.lua | 15 +++++---- 9 files changed, 150 insertions(+), 58 deletions(-) diff --git a/boot.lua b/boot.lua index 6055c379..9bc8ef88 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 439 --it's 439 for release - _detalhes.userversion = "v3.8.10" + _detalhes.userversion = "v3.8.12" _detalhes.realversion = 58 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -20,7 +20,9 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.8.8 (|cFFFFCC00Jan 23, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v3.8.12 (|cFFFFCC00Jan 24, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Attempt to fix Embed AddonSkins position using LibWindow-1.1.\n\n +|cFFFFFF00-|r Attempt to fix positioning after reopen a window previously closed on last logon.\n\n |cFFFFFF00-|r Added option to be able to use the report panel when reporting with RaidCheck plugin.\n\n |cFFFFFF00-|r Added Auto Close the window to You Are Not Prepared plugin.\n\n |cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n @@ -38,7 +40,7 @@ do --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.8.10 (|cFFFFCC00Jan 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to be able to use the report panel when reporting with RaidCheck plugin.\n\n|cFFFFFF00-|r Added Auto Close the window to You Are Not Prepared plugin.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Options Panel for Vanguard Plugin.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click .\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show Me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00-|r Testing LibWindow-1.1.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark.\n\n|cFFFFFF00-|r Added 'CTRL + RightClick' closes a window.\n\n|cFFFFFF00-|r Fixed wallpaper transparency after releasing the window from a stretch.|cFFFFFF00-|r Fixed few issues when using class text colors.\n\n|cFFFFFF00-|r Fixed characters name outside instances, now it replaces the realm name with a * and show the complete name on tooltip.\n\n|cFFFFFF00-|r Fixed damage mitigation on damage taken, this affects only specific classes like monk tank.\n\n|cFFFFFF00-|r Fixed auto erase poping up when the player enters on its garrison.\n\n|cFFFFFF00-|r Fixed combat on garrison training dummies which was being marked as Trash Segment.\n\n|cFFFFFF00-|r Fixed command /details disable, wasn't disabling the capture of cooldowns.\n\n|cFFFFFF00-|r Fixed a problem with fast dps/hps when the window is in a empty segment.\n\n|cFFFFFF00-|r Fixed an issue using bookmark panel where it wasn't changing the display when the window is in a plugin mode.\n\n|cFFFFFF00-|r Fixed a bug when bars isn't using class colors on Frags, Auras & Void Zones, Resources and Deaths.\n\n|cFFFFFF00-|r Fixed bar animations when 'Sort Direction' is set to bottom.\n\n|cFFFFFF00-|r Fixed the spam 'you are not in a guild' when checking for new versions.\n\n|cFFFFFF00-|r Fixed translations for Auto Hide Settings bracket under options panel.\n\n|cFFFFFF00-|r Fixed Auto Hide -> Mouse Interaction tool where wans't able to work okey during combat.\n\n|cFFFFFF00v3.6.14b (|cFFFFCC00Jan 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'My Spells' which shows your spells in the window.\n\n|cFFFFFF00-|r Added new custom display: Health Potion & Stone.\n\n|cFFFFFF00-|r Added overkill on death's tooltip.\n\n|cFFFFFF00-|r Created custom spells for Twin Ogron's Pulverize. Now it has 3 spells one for each wave.\n\n|cFFFFFF00-|r Created custom spells for Ko'ragh Overflowing Energy. Now it has 2 spells one for when the ball is catched and other when it reaches the ground and explodes.\n\n|cFFFFFF00-|r Changed healing multistrike to use the same format as damage done.\n\n|cFFFFFF00-|r Few improvements on Tiny Threat plugin: color gradient green-red is fixed, texts and bar texture now correctly uses the window settings.\n\n|cFFFFFF00-|r Damage Taken by Spell won't show pets in its tooltip any more.\n\n|cFFFFFF00-|r Enemies display won't show any more mirror images and spirit link totems.\n\n|cFFFFFF00-|r Enemies's tooltip now only show players and show all players instead of only 6.\n\n|cFFFFFF00-|r Few cooldowns shown as raid wide now shows as personal cooldowns.\n\n|cFFFFFF00-|r Fixed dispell tagets on dispell's tooltip.\n\n|cFFFFFF00-|r Fixed 'First Hit' raid tool.\n\n|cFFFFFF00-|r Fixed 'Open Options Panel' from interface panel.\n\n|cFFFFFF00v3.6.8 (|cFFFFCC00Dec 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Fast (i mean, really fast) Dps/Hps update rate, its option is under Rows: Advanced -> Fast Updates.\n\n|cFFFFFF00-|r Created a custom spell for Mirror Image's Fireball and Frostbolt, with that Player Detail window distinguishes spells from the player and images.\n\n|cFFFFFF00-|r Added new skin: 'ElvUI Style II'.\n\n|cFFFFFF00-|r Added Observer mode for Raid Tools: report cooldown/interrupt/death of entire raid only to you in your chat window.\n\n|cFFFFFF00-|r Added new plugin 'Raid Check': tracks raid members checking food, flask and pre-potions usage.\n\n|cFFFFFF00-|r Changed DPS display, now it shows onyl the player's Dps and the Dps difference between him and the top ranked.\n\n|cFFFFFF00-|r Changed Overheal display, now its percentage shows the player's overheal percent.\n\n|cFFFFFF00-|r Player Detail Window now shows the amount of multistrike on normal and critical hits.\n\n|cFFFFFF00-|r Removed skin: 'ElvUI Frame Style BW'.\n\n|cFFFFFF00-|r The tooltip for Scale option under options panel, now shows the real value for the scale.\n\n|cFFFFFF00-|r Fixed Imperator Mar'gok's adds damage taken.\n\n|cFFFFFF00-|r Fixed a problem where multistrike was counting towards critical strike amount.\n\n|cFFFFFF00-|r Fixed death display's report where it was't showing any death.\n\n|cFFFFFF00-|r Fixed a small issue with Encounter Details plugin where sometimes gets a error right after a boss encounter.\n\n|cFFFFFF00-|r Fixed bugs on sending messages to chat for Raid Tools.\n\n\n\n|cFFFFFF00v3.5.1 (|cFFFFCC00Dec 16, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed few accuracy on miss spells.\n\n|cFFFFFF00v3.5.0 (|cFFFFCC00Dec 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltip for Auras and Voidzones, now shows sorted by damage and time.\n\n|cFFFFFF00-|r More fixes for Korgath encounter on Highmaul.\n\n|cFFFFFF00-|r Added slash commands: 'reset' 'config'.\n\n|cFFFFFF00-|r Spell bars on Player Details Window now is painted with the spell spellschool color." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.8.12 (|cFFFFCC00Jan 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix Embed AddonSkins position using LibWindow-1.1.\n\n|cFFFFFF00-|r Attempt to fix positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Added option to be able to use the report panel when reporting with RaidCheck plugin.\n\n|cFFFFFF00-|r Added Auto Close the window to You Are Not Prepared plugin.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Options Panel for Vanguard Plugin.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click .\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show Me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00-|r Testing LibWindow-1.1.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark.\n\n|cFFFFFF00-|r Added 'CTRL + RightClick' closes a window.\n\n|cFFFFFF00-|r Fixed wallpaper transparency after releasing the window from a stretch.|cFFFFFF00-|r Fixed few issues when using class text colors.\n\n|cFFFFFF00-|r Fixed characters name outside instances, now it replaces the realm name with a * and show the complete name on tooltip.\n\n|cFFFFFF00-|r Fixed damage mitigation on damage taken, this affects only specific classes like monk tank.\n\n|cFFFFFF00-|r Fixed auto erase poping up when the player enters on its garrison.\n\n|cFFFFFF00-|r Fixed combat on garrison training dummies which was being marked as Trash Segment.\n\n|cFFFFFF00-|r Fixed command /details disable, wasn't disabling the capture of cooldowns.\n\n|cFFFFFF00-|r Fixed a problem with fast dps/hps when the window is in a empty segment.\n\n|cFFFFFF00-|r Fixed an issue using bookmark panel where it wasn't changing the display when the window is in a plugin mode.\n\n|cFFFFFF00-|r Fixed a bug when bars isn't using class colors on Frags, Auras & Void Zones, Resources and Deaths.\n\n|cFFFFFF00-|r Fixed bar animations when 'Sort Direction' is set to bottom.\n\n|cFFFFFF00-|r Fixed the spam 'you are not in a guild' when checking for new versions.\n\n|cFFFFFF00-|r Fixed translations for Auto Hide Settings bracket under options panel.\n\n|cFFFFFF00-|r Fixed Auto Hide -> Mouse Interaction tool where wans't able to work okey during combat.\n\n|cFFFFFF00v3.6.14b (|cFFFFCC00Jan 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'My Spells' which shows your spells in the window.\n\n|cFFFFFF00-|r Added new custom display: Health Potion & Stone.\n\n|cFFFFFF00-|r Added overkill on death's tooltip.\n\n|cFFFFFF00-|r Created custom spells for Twin Ogron's Pulverize. Now it has 3 spells one for each wave.\n\n|cFFFFFF00-|r Created custom spells for Ko'ragh Overflowing Energy. Now it has 2 spells one for when the ball is catched and other when it reaches the ground and explodes.\n\n|cFFFFFF00-|r Changed healing multistrike to use the same format as damage done.\n\n|cFFFFFF00-|r Few improvements on Tiny Threat plugin: color gradient green-red is fixed, texts and bar texture now correctly uses the window settings.\n\n|cFFFFFF00-|r Damage Taken by Spell won't show pets in its tooltip any more.\n\n|cFFFFFF00-|r Enemies display won't show any more mirror images and spirit link totems.\n\n|cFFFFFF00-|r Enemies's tooltip now only show players and show all players instead of only 6.\n\n|cFFFFFF00-|r Few cooldowns shown as raid wide now shows as personal cooldowns.\n\n|cFFFFFF00-|r Fixed dispell tagets on dispell's tooltip.\n\n|cFFFFFF00-|r Fixed 'First Hit' raid tool.\n\n|cFFFFFF00-|r Fixed 'Open Options Panel' from interface panel.\n\n|cFFFFFF00v3.6.8 (|cFFFFCC00Dec 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Fast (i mean, really fast) Dps/Hps update rate, its option is under Rows: Advanced -> Fast Updates.\n\n|cFFFFFF00-|r Created a custom spell for Mirror Image's Fireball and Frostbolt, with that Player Detail window distinguishes spells from the player and images.\n\n|cFFFFFF00-|r Added new skin: 'ElvUI Style II'.\n\n|cFFFFFF00-|r Added Observer mode for Raid Tools: report cooldown/interrupt/death of entire raid only to you in your chat window.\n\n|cFFFFFF00-|r Added new plugin 'Raid Check': tracks raid members checking food, flask and pre-potions usage.\n\n|cFFFFFF00-|r Changed DPS display, now it shows onyl the player's Dps and the Dps difference between him and the top ranked.\n\n|cFFFFFF00-|r Changed Overheal display, now its percentage shows the player's overheal percent.\n\n|cFFFFFF00-|r Player Detail Window now shows the amount of multistrike on normal and critical hits.\n\n|cFFFFFF00-|r Removed skin: 'ElvUI Frame Style BW'.\n\n|cFFFFFF00-|r The tooltip for Scale option under options panel, now shows the real value for the scale.\n\n|cFFFFFF00-|r Fixed Imperator Mar'gok's adds damage taken.\n\n|cFFFFFF00-|r Fixed a problem where multistrike was counting towards critical strike amount.\n\n|cFFFFFF00-|r Fixed death display's report where it was't showing any death.\n\n|cFFFFFF00-|r Fixed a small issue with Encounter Details plugin where sometimes gets a error right after a boss encounter.\n\n|cFFFFFF00-|r Fixed bugs on sending messages to chat for Raid Tools.\n\n\n\n|cFFFFFF00v3.5.1 (|cFFFFCC00Dec 16, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed few accuracy on miss spells.\n\n|cFFFFFF00v3.5.0 (|cFFFFCC00Dec 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltip for Auras and Voidzones, now shows sorted by damage and time.\n\n|cFFFFFF00-|r More fixes for Korgath encounter on Highmaul." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index a6af137d..070c9207 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -459,10 +459,6 @@ end end _detalhes:TrocaTabela (self, nil, nil, nil, true) - - --gump:Fade (self.baseframe.cabecalho.atributo_icon, _unpack (_detalhes.windows_fade_out)) - --gump:Fade (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_out)) - --gump:Fade (self.baseframe, _unpack (_detalhes.windows_fade_out)) if (self.hide_icon) then gump:Fade (self.baseframe.cabecalho.atributo_icon, 1) @@ -492,13 +488,10 @@ end self:SetCombatAlpha (nil, nil, true) self:DesaturateMenu() - --if (self.hide_out_of_combat and not UnitAffectingCombat ("player")) then - -- self:SetWindowAlphaForCombat (true, true) - --end - if (not temp and not _detalhes.initializing) then _detalhes:SendEvent ("DETAILS_INSTANCE_OPEN", nil, self) end + end ------------------------------------------------------------------------------------------------------------------------ @@ -1404,6 +1397,7 @@ function _detalhes:RestauraJanela (index, temp, load_only) --> internal stuff self.oldwith = self.baseframe:GetWidth() + self:RestoreMainWindowPosition() self:ReajustaGump() --self:SaveMainWindowPosition() diff --git a/core/windows.lua b/core/windows.lua index 61d3276a..a8270788 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -211,7 +211,6 @@ -------------------------------------------------------------------------------------------------------- --> LibWindow-1.1 --this is the restore function from Libs\LibWindow-1.1\LibWindow-1.1.lua we can't schedule and we save it inside the instance without frame references. - function _detalhes:RestoreLibWindow() local frame = self.baseframe if (frame) then @@ -239,15 +238,17 @@ if not point and y==0 then -- errr why did i do this check again? must have been a reason, but i can't remember it =/ point="CENTER" end - + + --> Details: using UIParent always in order to not break the positioning when using AddonSkin with ElvUI. if not point then -- we have position, but no point, which probably means we're going from data stored by the addon itself before LibWindow was added to it. It was PROBABLY topleft->bottomleft anchored. Most do it that way. - frame:SetPoint("TOPLEFT", frame:GetParent(), "BOTTOMLEFT", x, y) + --frame:SetPoint("TOPLEFT", frame:GetParent(), "BOTTOMLEFT", x, y) + frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", x, y) -- make it compute a better attachpoint (on next update) --_detalhes:ScheduleTimer ("SaveLibWindow", 0.05, self) return end - frame:SetPoint(point, frame:GetParent(), point, x, y) + frame:SetPoint(point, UIParent, point, x, y) end end @@ -255,7 +256,6 @@ --> LibWindow-1.1 --this is the save function from Libs\LibWindow-1.1\LibWindow-1.1.lua, we save it inside the instance without frame references. - function _detalhes:SaveLibWindow() local frame = self.baseframe if (frame) then @@ -267,7 +267,9 @@ --tinsert (_detalhes.resize_debug, #_detalhes.resize_debug+1, "SAVING 1: " .. (self.libwindow.x or 0)) --> LibWindow-1.1 ---------------- - local parent = frame:GetParent() or nilParent + --local parent = frame:GetParent() or nilParent + --> Details: we are always using UIParent here or the addon is broken when using AddonSkins for ElvUI. + local parent = UIParent -- No, this won't work very well with frames that aren't parented to nil or UIParent local s = frame:GetScale() local left,top = frame:GetLeft()*s, frame:GetTop()*s @@ -315,6 +317,7 @@ -------------------------------------------------------------------------------------------------------- function _detalhes:SaveMainWindowSize() + local baseframe_width = self.baseframe:GetWidth() if (not baseframe_width) then return _detalhes:ScheduleTimer ("SaveMainWindowSize", 1, self) @@ -370,8 +373,6 @@ function _detalhes:SaveMainWindowPosition (instance) - --tinsert (_detalhes.resize_debug, #_detalhes.resize_debug+1, "SaveMainWindowPosition: " .. debugstack()) - if (instance) then self = instance end @@ -391,7 +392,7 @@ end self:SaveLibWindow() - + --> save the position local _w = baseframe_width local _h = baseframe_height @@ -427,18 +428,17 @@ end self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement --> espaço para o final da janela - + return {altura = self.baseframe:GetHeight(), largura = self.baseframe:GetWidth(), x = _x, y = _y} end function _detalhes:RestoreMainWindowPosition (pre_defined) - - --tinsert (_detalhes.resize_debug, #_detalhes.resize_debug+1, "Restoring " .. ( self.libwindow.x or "NONE") .. " " .. (self.libwindow.point or "NONE")) - --tinsert (_detalhes.resize_debug, #_detalhes.resize_debug+1, "") - --tinsert (_detalhes.resize_debug, #_detalhes.resize_debug+1, debugstack()) - --tinsert (_detalhes.resize_debug, #_detalhes.resize_debug+1, "") if (not pre_defined and self.libwindow.x and self.mostrando == "normal") then + local s = self.window_scale + self.baseframe:SetScale (s) + self.rowframe:SetScale (s) + self.baseframe:SetWidth (self.posicao[self.mostrando].w) self.baseframe:SetHeight (self.posicao[self.mostrando].h) @@ -447,6 +447,10 @@ return end + local s = self.window_scale + self.baseframe:SetScale (s) + self.rowframe:SetScale (s) + local _scale = self.baseframe:GetEffectiveScale() local _UIscale = _UIParent:GetScale() @@ -469,7 +473,7 @@ end function _detalhes:RestoreMainWindowPositionNoResize (pre_defined, x, y) - + x = x or 0 y = y or 0 @@ -572,7 +576,7 @@ end -- -4 difere a precisão de quando a barra será adicionada ou apagada da barra - self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement + self.baseframe.BoxBarrasAltura = (self.baseframe:GetHeight()) - end_window_spacement local T = self.rows_fit_in_window if (not T) then --> primeira vez que o gump esta sendo reajustado @@ -603,6 +607,8 @@ self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.row_info.space.right) end end + + --> verifica se precisa esconder ou mostrar alguma barra local A = self.barraS[1] diff --git a/framework/panel.lua b/framework/panel.lua index a70ef8b3..21b27a58 100644 --- a/framework/panel.lua +++ b/framework/panel.lua @@ -1343,6 +1343,7 @@ local chart_panel_enable_line = function (f, thisbox) f.Graphic.max_value = 0 local max = 0 + local max_time = 0 for index, box in ipairs (f.BoxLabels) do if (box.type == type and box.showing and box.enabled) then @@ -1351,10 +1352,14 @@ local chart_panel_enable_line = function (f, thisbox) if (data[4] > max) then max = data[4] end + if (data [5] > max_time) then + max_time = data [5] + end end end f:SetScale (max) + f:SetTime (max_time) elseif (type == "overlay") then @@ -1497,8 +1502,7 @@ local chart_panel_add_overlay = function (self, overlayData, color, name, icon) self.OverlaysAmount = self.OverlaysAmount + 1 end -local chart_panel_add_data = function (self, graphicData, color, name, lineTexture, smoothLevel) - +local chart_panel_add_data = function (self, graphicData, color, name, elapsed_time, lineTexture, smoothLevel, firstIndex) local f = self self = self.Graphic @@ -1524,7 +1528,21 @@ local chart_panel_add_data = function (self, graphicData, color, name, lineTextu _data [#_data+1] = {scaleW*(_i-2), v/graphMaxDps} --> x and y coords _i = _i + 1 end - + + elseif (smoothLevel == -1) then + while (_i <= #content-2) do + local current = content[_i] + + local minus_2 = content[_i-2] * 0.6 + local minus_1 = content[_i-1] * 0.8 + local plus_1 = content[_i+1] * 0.8 + local plus_2 = content[_i+2] * 0.6 + + local v = (current + minus_2 + minus_1 + plus_1 + plus_2)/5 --> normalize + _data [#_data+1] = {scaleW*(_i-2), v/graphMaxDps} --> x and y coords + _i = _i + 1 + end + elseif (smoothLevel == 1) then _i = 2 while (_i <= #content-1) do @@ -1561,15 +1579,42 @@ local chart_panel_add_data = function (self, graphicData, color, name, lineTextu end self.max_value = max_value + f:SetScale (max_value) end - tinsert (f.GData, {_data, color or line_default_color, lineTexture, graphicData.max_value}) + tinsert (f.GData, {_data, color or line_default_color, lineTexture, graphicData.max_value, elapsed_time}) if (name) then f:AddLabel (color or line_default_color, name, "graphic", #f.GData) end - self:AddDataSeries (_data, color or line_default_color, nil, lineTexture) - + if (firstIndex) then + if (lineTexture) then + if (not lineTexture:find ("\\") and not lineTexture:find ("//")) then + local path = string.match (debugstack (1, 1, 0), "AddOns\\(.+)LibGraph%-2%.0%.lua") + if path then + lineTexture = "Interface\\AddOns\\" .. path .. lineTexture + else + lineTexture = nil + end + end + end + + table.insert (self.Data, 1, {Points = _data, Color = color or line_default_color, lineTexture = lineTexture, ElapsedTime = elapsed_time}) + self.NeedsUpdate = true + else + self:AddDataSeries (_data, color or line_default_color, nil, lineTexture) + self.Data [#self.Data].ElapsedTime = elapsed_time + end + + local max_time = 0 + for _, data in ipairs (self.Data) do + if (data.ElapsedTime > max_time) then + max_time = data.ElapsedTime + end + end + + f:SetTime (max_time) + end local chart_panel_onresize = function (self) @@ -1630,6 +1675,10 @@ local chart_panel_mouseup = function (self, button) end end +local chart_panel_hide_close_button = function (self) + self.CloseButton:Hide() +end + function gump:CreateChartPanel (parent, w, h, name) if (not name) then @@ -1735,6 +1784,7 @@ function gump:CreateChartPanel (parent, w, h, name) f.CanMove = chart_panel_can_move f.AddLabel = chart_panel_add_label f.AddOverlay = chart_panel_add_overlay + f.HideCloseButton = chart_panel_hide_close_button f:SetScript ("OnSizeChanged", chart_panel_onresize) chart_panel_onresize (f) diff --git a/functions/playerclass.lua b/functions/playerclass.lua index a83b11ff..8fe11347 100644 --- a/functions/playerclass.lua +++ b/functions/playerclass.lua @@ -181,6 +181,40 @@ do end end end + + if (Actor.classe == "HUNTER") then + local container_misc = _detalhes.tabela_vigente[4] + local index = container_misc._NameIndexTable [Actor.nome] + if (index) then + local misc_actor = container_misc._ActorTable [index] + local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable + if (buffs) then + for spellid, spell in _pairs (buffs) do + local spec = SpecSpellList [spellid] + if (spec) then + if (spec ~= Actor.spec) then + _detalhes.cached_specs [Actor.serial] = spec + + Actor.spec = spec + + if (container) then + container.need_refresh = true + end + + if (Actor.minha_barra and type (Actor.minha_barra) == "table") then + Actor.minha_barra.minha_tabela = nil + end + + return spec + else + break + end + end + end + end + end + end + end end diff --git a/functions/skins.lua b/functions/skins.lua index 161ae7bb..7a453e52 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -1,8 +1,3 @@ ---File Revision: 1 ---Last Modification: 05/12/07/2013 --- Change Log: - -- 05/12/07/2013: This file has been introduced. - local _detalhes = _G._detalhes local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) @@ -1031,11 +1026,6 @@ local _ local statusbar_enabled1 = instance1.show_statusbar local statusbar_enabled2 = instance2.show_statusbar - _detalhes.move_janela_func (instance1.baseframe, true, instance1) - _detalhes.move_janela_func (instance1.baseframe, false, instance1) - _detalhes.move_janela_func (instance2.baseframe, true, instance2) - _detalhes.move_janela_func (instance2.baseframe, false, instance2) - instance1.baseframe:SetSize (wight/2 - 4, height-20-21-8 - (statusbar_enabled1 and 14 or 0)) instance2.baseframe:SetSize (wight/2 - 4, height-20-21-8 - (statusbar_enabled2 and 14 or 0)) @@ -1052,6 +1042,11 @@ local _ instance1:SaveMainWindowPosition() instance2:SaveMainWindowPosition() + _detalhes.move_janela_func (instance1.baseframe, true, instance1) + _detalhes.move_janela_func (instance1.baseframe, false, instance1) + _detalhes.move_janela_func (instance2.baseframe, true, instance2) + _detalhes.move_janela_func (instance2.baseframe, false, instance2) + end diff --git a/gumps/janela_news.lua b/gumps/janela_news.lua index 4bf3c2ff..53f87cbc 100644 --- a/gumps/janela_news.lua +++ b/gumps/janela_news.lua @@ -4,7 +4,7 @@ local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) local g = _detalhes.gump local _ -function _detalhes:OpenNewsWindow (text_to_show, dumpvalues) +function _detalhes:OpenNewsWindow (text_to_show, dumpvalues, keeptext) local news_window = _detalhes:CreateOrOpenNewsWindow() news_window:Title (Loc ["STRING_NEWS_TITLE"]) @@ -12,7 +12,7 @@ function _detalhes:OpenNewsWindow (text_to_show, dumpvalues) if (text_to_show and type (text_to_show) == "table") then local s = "" for _, text in ipairs (text_to_show) do - if (type (text) == "string") then + if (type (text) == "string" or type (text) == "number") then s = s .. text .. "\n" end end @@ -27,9 +27,19 @@ function _detalhes:OpenNewsWindow (text_to_show, dumpvalues) end end - news_window:Text (s) + if (keeptext) then + news_window:Text ((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. s) + else + news_window:Text (s) + end else - news_window:Text (text_to_show or Loc ["STRING_VERSION_LOG"]) + + if (keeptext) then + news_window:Text ((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. (text_to_show or Loc ["STRING_VERSION_LOG"])) + else + news_window:Text (text_to_show or Loc ["STRING_VERSION_LOG"]) + end + end news_window:Icon ([[Interface\AddOns\Details\images\icons2]], {108/512, 189/512, 319/512, 400/512}) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 9e5abf05..0d17b77b 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -721,7 +721,7 @@ local movement_onupdate = function (self, elapsed) end end -local function move_janela (baseframe, iniciando, instancia) +local function move_janela (baseframe, iniciando, instancia, just_updating) instancia_alvo = _detalhes.tabela_instancias [instancia.meu_id-1] if (_detalhes.disable_window_groups) then @@ -750,7 +750,7 @@ local function move_janela (baseframe, iniciando, instancia) baseframe:SetClampRectInsets (-ClampLeft, ClampRight, ClampTop, -ClampBottom) - if (instancia_alvo) then + if (instancia_alvo and (instancia_alvo.ativa or not just_updating)) then tempo_fades = 1.0 nao_anexados = {true, true, true, true} @@ -960,7 +960,7 @@ local function move_janela (baseframe, iniciando, instancia) _detalhes.snap_alert.animOut:Play() _detalhes.MicroButtonAlert:Hide() - if (instancia_alvo) then + if (instancia_alvo and instancia_alvo.ativa and instancia_alvo.baseframe) then instancia_alvo.h_esquerda:Stop() instancia_alvo.h_baixo:Stop() instancia_alvo.h_direita:Stop() diff --git a/startup.lua b/startup.lua index da2cfeda..d35fa120 100644 --- a/startup.lua +++ b/startup.lua @@ -179,8 +179,8 @@ function _G._detalhes:Start() --print ("===============") instance.do_not_snap = true - self.move_janela_func (instance.baseframe, true, instance) - self.move_janela_func (instance.baseframe, false, instance) + self.move_janela_func (instance.baseframe, true, instance, true) + self.move_janela_func (instance.baseframe, false, instance, true) instance.do_not_snap = false end @@ -498,10 +498,11 @@ function _G._detalhes:Start() DBM:RegisterCallback ("pull", dbm_callback_pull) end ---function _detalhes:TestResize() --- _detalhes:OpenNewsWindow (_detalhes.resize_debug) ---end ---_detalhes:ScheduleTimer ("TestResize", 3) - +--[[ +function _detalhes:TestResize() + _detalhes:OpenNewsWindow (_detalhes.resize_debug) +end +_detalhes:ScheduleTimer ("TestResize", 3) +--]] end