diff --git a/boot.lua b/boot.lua index 44daf74f..f77b8afa 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 = 2221 --it's 2221 for release - _detalhes.userversion = "v4.2.4" + _detalhes.userversion = "v4.2.5" _detalhes.realversion = 79 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,17 +21,19 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v4.2.4 (|cFFFFCC00Jan 23, 2016|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v4.2.5 (|cFFFFCC00Jan 25, 2016|r|cFFFFFF00)|r:\n\n |cFFFFFF00-|r Added two new custom displays: Damage Done on targets marked with skull and Damage Done on targets marked with any other mark.\n\n |cFFFFFF00-|r Bookmark now supports Plugins.\n\n |cFFFFFF00-|r Fixed a gap when setting the bars to 'bottom to top' grow direction.\n\n |cFFFFFF00-|r Added a Scale options to Encounter Details plugin window.\n\n |cFFFFFF00-|r Added a report button for targets of targets at the Player Details Window.\n\n +|cFFFFFF00-|r Fixed the click to switch segment through segment button: left click changes up, right click changes down, middle mouse switch back to current segment.\n\n +|cFFFFFF00-|r Advanced Damage Taken now also makes the damage Taken by tanks always be post-mitigated by shields.\n\n --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.2.4 (|cFFFFCC00Jan 23, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added two new custom displays: Damage Done on targets marked with skull and Damage Done on targets marked with any other mark.\n\n|cFFFFFF00-|r Bookmark now also supports Plugins.\n\n|cFFFFFF00-|r Added a Scale options to Encounter Details plugin window.\n\n|cFFFFFF00-|r Added a report button for targets of targets at the Player Details Window.\n\n|cFFFFFF00-|r Fixed a gap when setting the bars to 'bottom to top' grow direction.\n\n|cFFFFFF00v4.1.6 (|cFFFFCC00Jan 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the size of the right margin on tooltips.\n\n|cFFFFFF00v4.1.5 (|cFFFFCC00Jan 10, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the weakauras creator for DBM and BidWigs Timers.\n\n|cFFFFFF00-|r Fix for an issue with dungeon bosses where sometimes Details! throw some error messages.\n\n|cFFFFFF00-|r Attempt to fix a 'class undefined' bug.\n\n|cFFFFFF00v4.1.4 (|cFFFFCC00Jan 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the segment plugin for the statusbar.\n\n|cFFFFFF00v4.1.3 (|cFFFFCC00Jan 01, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Small visual improvement on tooltips.\n\n|cFFFFFF00-|r Fixed an issue when closing solo plugins with the red X button.\n\n|cFFFFFF00v4.1.2 (|cFFFFCC00Dec 31, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for item level tracker.\n\n|cFFFFFF00v4.1.1 (|cFFFFCC00Dec 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using LibItemUpgradeInfo library to retrive the item level of upgraded items.\n\n|cFFFFFF00v4.1.0 (|cFFFFCC00Dec 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin preset: 'New Gray'.\n\n|cFFFFFF00-|r Added a Dark skin for the Options Panel.\n\n|cFFFFFF00-|r Fixed an issue with the Plugin DPS Tuning when reseting data on Details!.\n\n|cFFFFFF00-|r Removed realm names from player at the Comparison Panel.\n\n|cFFFFFF00v4.0.8 (|cFFFFCC00Dec 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Framework and functions update for the next version of the Advanced Death Logs plugin.\n\n|cFFFFFF00v4.0.7 (|cFFFFCC00Dec 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some corner border for elvui skins.\n\n|cFFFFFF00-|r /run Details.death_tooltip_width = 500 makes the deathlog tooltip be 500 width.\n\n|cFFFFFF00v4.0.6e (|cFFFFCC00Nov 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes some actors are duplicated at the end of an encounter.\n\n|cFFFFFF00-|r Fixed bookmark for segments (shift+right click).\n\n|cFFFFFF00-|r Fixed an issue with Chat Tab Embed when embeding only one window.\n\n|cFFFFFF00v4.0.6c (|cFFFFCC00Nov 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.2.5 (|cFFFFCC00Jan 25, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added two new custom displays: Damage Done on targets marked with skull and Damage Done on targets marked with any other mark.\n\n|cFFFFFF00-|r Bookmark now also supports Plugins.\n\n|cFFFFFF00-|r Added a Scale options to Encounter Details plugin window.\n\n|cFFFFFF00-|r Added a report button for targets of targets at the Player Details Window.\n\n|cFFFFFF00-|r Fixed the click to switch segment through segment button: left click changes up, right click changes down, middle mouse switch back to current segment.\n\n|cFFFFFF00-|r Advanced Damage Taken now also makes the damage Taken by tanks always be post-mitigated by shields.\n\n|cFFFFFF00-|r Fixed a gap when setting the bars to 'bottom to top' grow direction.\n\n|cFFFFFF00v4.1.6 (|cFFFFCC00Jan 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the size of the right margin on tooltips.\n\n|cFFFFFF00v4.1.5 (|cFFFFCC00Jan 10, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the weakauras creator for DBM and BidWigs Timers.\n\n|cFFFFFF00-|r Fix for an issue with dungeon bosses where sometimes Details! throw some error messages.\n\n|cFFFFFF00-|r Attempt to fix a 'class undefined' bug.\n\n|cFFFFFF00v4.1.4 (|cFFFFCC00Jan 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the segment plugin for the statusbar.\n\n|cFFFFFF00v4.1.3 (|cFFFFCC00Jan 01, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Small visual improvement on tooltips.\n\n|cFFFFFF00-|r Fixed an issue when closing solo plugins with the red X button.\n\n|cFFFFFF00v4.1.2 (|cFFFFCC00Dec 31, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for item level tracker.\n\n|cFFFFFF00v4.1.1 (|cFFFFCC00Dec 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using LibItemUpgradeInfo library to retrive the item level of upgraded items.\n\n|cFFFFFF00v4.1.0 (|cFFFFCC00Dec 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin preset: 'New Gray'.\n\n|cFFFFFF00-|r Added a Dark skin for the Options Panel.\n\n|cFFFFFF00-|r Fixed an issue with the Plugin DPS Tuning when reseting data on Details!.\n\n|cFFFFFF00-|r Removed realm names from player at the Comparison Panel.\n\n|cFFFFFF00v4.0.8 (|cFFFFCC00Dec 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Framework and functions update for the next version of the Advanced Death Logs plugin.\n\n|cFFFFFF00v4.0.7 (|cFFFFCC00Dec 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some corner border for elvui skins.\n\n|cFFFFFF00-|r /run Details.death_tooltip_width = 500 makes the deathlog tooltip be 500 width.\n\n|cFFFFFF00v4.0.6e (|cFFFFCC00Nov 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes some actors are duplicated at the end of an encounter.\n\n|cFFFFFF00-|r Fixed bookmark for segments (shift+right click).\n\n|cFFFFFF00-|r Fixed an issue with Chat Tab Embed when embeding only one window.\n\n|cFFFFFF00v4.0.6c (|cFFFFCC00Nov 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index b0544e60..7c68f345 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -4769,6 +4769,11 @@ end shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount end + --> copiar o container de raid targets + for flag, amount in _pairs (actor.raid_targets) do + shadow.raid_targets [flag] = (shadow.raid_targets [flag] or 0) + amount + end + --> copia o container de habilidades (captura de dados) for spellid, habilidade in _pairs (actor.spells._ActorTable) do --> cria e soma o valor @@ -4846,6 +4851,11 @@ atributo_damage.__add = function (tabela1, tabela2) tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount end + --> soma o container de raid targets + for flag, amount in _pairs (tabela2.raid_targets) do + tabela1.raid_targets [flag] = (tabela1.raid_targets [flag] or 0) + amount + end + --> soma o container de habilidades for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do --> pega a habilidade no primeiro ator @@ -4918,6 +4928,13 @@ atributo_damage.__sub = function (tabela1, tabela2) end end + --> reduz o container de raid targets + for flag, amount in _pairs (tabela2.raid_targets) do + if (tabela1.raid_targets [flag]) then + tabela1.raid_targets [flag] = _math_max (tabela1.raid_targets [flag] - amount, 0) + end + end + --> reduz o container de habilidades for spellid, habilidade in _pairs (tabela2.spells._ActorTable) do --> pega a habilidade no primeiro ator diff --git a/core/parser.lua b/core/parser.lua index f587d95d..eab21ef8 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -350,6 +350,13 @@ if (absorbed) then amount = (amount or 0) - absorbed end + else + --> advanced damage taken + if (_detalhes.damage_taken_everything) then + if (absorbed) then + amount = (amount or 0) - absorbed + end + end end --]] diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 803aaad6..3a3630e1 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -8144,6 +8144,58 @@ function _detalhes:CreateFakeWindow() return t end +local function click_to_change_segment (instancia, buttontype) + if (buttontype == "LeftButton") then + + local segmento_goal = instancia.segmento + 1 + if (segmento_goal > segments_used) then + segmento_goal = -1 + elseif (segmento_goal > _detalhes.segments_amount) then + segmento_goal = -1 + end + + local total_shown = segments_filled+2 + local goal = segmento_goal+1 + + local select_ = math.abs (goal - total_shown) + GameCooltip:Select (1, select_) + + instancia:TrocaTabela (segmento_goal) + + segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) + + elseif (buttontype == "RightButton") then + + local segmento_goal = instancia.segmento - 1 + if (segmento_goal < -1) then + segmento_goal = segments_used + end + + local total_shown = segments_filled+2 + local goal = segmento_goal+1 + + local select_ = math.abs (goal - total_shown) + GameCooltip:Select (1, select_) + + instancia:TrocaTabela (segmento_goal) + segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) + + elseif (buttontype == "MiddleButton") then + + local segmento_goal = 0 + + local total_shown = segments_filled+2 + local goal = segmento_goal+1 + + local select_ = math.abs (goal - total_shown) + GameCooltip:Select (1, select_) + + instancia:TrocaTabela (segmento_goal) + segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) + + end +end + function gump:CriaCabecalho (baseframe, instancia) baseframe.cabecalho = {} @@ -8327,9 +8379,11 @@ function gump:CriaCabecalho (baseframe, instancia) --> SELECIONAR O SEGMENTO ---------------------------------------------------------------------------------------------------------------------------------------------------- - local segmento_button_click = function() + local segmento_button_click = function (self, button, param1) if (_detalhes.instances_menu_click_to_open) then segmento_on_enter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) + else + click_to_change_segment (instancia, button) end end @@ -8337,6 +8391,9 @@ function gump:CriaCabecalho (baseframe, instancia) baseframe.cabecalho.segmento:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) baseframe.cabecalho.segmento.widget._instance = instancia baseframe.cabecalho.segmento:SetPoint ("left", baseframe.cabecalho.modo_selecao, "right", 0, 0) + + --> ativa botão do meio e direito + baseframe.cabecalho.segmento:SetClickFunction (segmento_button_click, nil, nil, "rightclick") baseframe.cabecalho.segmento:SetScript ("OnEnter", segmento_on_enter) baseframe.cabecalho.segmento:SetScript ("OnLeave", segmento_on_leave)