diff --git a/boot.lua b/boot.lua index 3fec9c3e..23e4d0cd 100644 --- a/boot.lua +++ b/boot.lua @@ -8,7 +8,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners") - _detalhes.userversion = "v1.15.3b" --tirar guardian of ancient kingss + _detalhes.userversion = "v1.15.4" --tirar janela welcome _detalhes.version = "Alpha 019" _detalhes.realversion = 19 diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 2d8586f1..7d1be6ea 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -135,6 +135,22 @@ end return false end + + -- enemies (sort function) + local sortEnemies = function (t1, t2) + local a = _bit_band (t1.flag_original, 0x00000060) + local b = _bit_band (t2.flag_original, 0x00000060) + + if (a ~= 0 and b ~= 0) then + return t1.total > t2.total + elseif (a ~= 0 and b == 0) then + return true + elseif (a == 0 and b ~= 0) then + return false + end + + return false + end --[[exported]] function _detalhes:ContainerSortEnemies (container, amount, keyName2) @@ -231,21 +247,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> special cases - -- enemies (sort function) - local sortEnemies = function (t1, t2) - local a = _bit_band (t1.flag_original, 0x00000060) - local b = _bit_band (t2.flag_original, 0x00000060) - - if (a ~= 0 and b ~= 0) then - return t1.total > t2.total - elseif (a ~= 0 and b == 0) then - return true - elseif (a == 0 and b ~= 0) then - return false - end - - return false - end + -- dps (calculate dps for actors) function atributo_damage:ContainerRefreshDps (container, combat_time) @@ -1860,7 +1862,7 @@ function atributo_damage:MontaDetalhes (spellid, barra) elseif (info.sub_atributo == 4) then return self:MontaDetalhesFriendlyFire (spellid, barra) elseif (info.sub_atributo == 6) then - if (_bit_band (self.serial, 0x00000400) ~= 0) then --é um jogador + if (_bit_band (self.flag_original, 0x00000400) ~= 0) then --é um jogador return self:MontaDetalhesDamageDone (spellid, barra) end return self:MontaDetalhesEnemy (spellid, barra) diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index da93bfb7..b06a3aba 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -1877,6 +1877,12 @@ function _detalhes:ChangeIcon (icon) --> normal local half = 0.00048828125 local size = 0.03125 + + --normal icons + --local icones = _detalhes.sub_atributos [self.atributo].icones + --self.baseframe.cabecalho.atributo_icon:SetTexture (icones [self.sub_atributo] [1]) + --self.baseframe.cabecalho.atributo_icon:SetTexCoord ( unpack (icones [self.sub_atributo] [2]) ) + self.baseframe.cabecalho.atributo_icon:SetTexture (skin.file) self.baseframe.cabecalho.atributo_icon:SetTexCoord ( (0.03125 * (self.atributo-1)) + half, (0.03125 * self.atributo) - half, 0.35693359375, 0.38720703125) @@ -2190,7 +2196,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom) report_lines [#report_lines+1] = i..". ".. name .." ".. _cstr ("%.2f", amount/total*100) .. "% (" .. _detalhes:comma_value (_math_floor (dps)) .. ", " .. _detalhes:ToK ( _math_floor (amount) ) .. ")" else - report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." ".. _detalhes:comma_value ( _math_floor (amount) ).." (".._cstr ("%.1f", amount/total*100).."%)" + report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." " .. _detalhes:ToKReport (amount).." (".._cstr ("%.1f", amount/total*100).."%)" end elseif (_type (amount) == "string") then report_lines [#report_lines+1] = i..". ".. _thisActor.nome.." ".. amount diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 90cf7184..703664ed 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -169,11 +169,13 @@ --> verifica se é um pet, se for confere se tem o nome do dono, se não tiver, precisa por local dono_do_pet - if (flag and _bit_band (flag, OBJECT_TYPE_PETS) ~= 0) then --> é um pet + + --if (flag and _bit_band (flag, OBJECT_TYPE_PETS) ~= 0) then --> é um pet + if (_detalhes.tabela_pets.pets [serial]) then --> é um pet --> aqui ele precisaria achar as tag < > pra saber se o nome passado já não veio com o dono imbutido, se não tiver as tags, terá que ser posto aqui if (not nome:find ("<") or not nome:find (">")) then --> find é lento, não teria outra forma de fazer isso? local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag) - if (nome_dele) then + if (nome_dele and dono_nome) then nome = nome_dele dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true, nome) end diff --git a/core/control.lua b/core/control.lua index 5f64b873..c0a0e3c4 100644 --- a/core/control.lua +++ b/core/control.lua @@ -483,7 +483,6 @@ end if (from_encounter_end) then - --_detalhes.tabela_vigente.start_time = _detalhes.encounter_table ["start"] _detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"] end @@ -499,8 +498,10 @@ if (_detalhes.debug) then _detalhes:Msg ("(debug) found encounter on last fight, freezing parser for 30 seconds.") end - _detalhes:CaptureSet (false, "damage", false, 30) - _detalhes:CaptureSet (false, "heal", false, 30) + + if (_detalhes.tabela_vigente.instance_type == "raid") then + _detalhes:CaptureSet (false, "damage", false, 30) + end --> schedule sync _detalhes:EqualizeActorsSchedule (_detalhes.host_of) diff --git a/core/parser.lua b/core/parser.lua index ca837bfc..28c2dcba 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -229,6 +229,12 @@ --> record death log local t = jogador_alvo.last_events_table + + if (not t) then + jogador_alvo.last_events_table = _detalhes:CreateActorLastEventTable() + t = jogador_alvo.last_events_table + end + local i = t.n t.n = i + 1 @@ -341,6 +347,11 @@ --> record death log local t = jogador_alvo.last_events_table + if (not t) then + jogador_alvo.last_events_table = _detalhes:CreateActorLastEventTable() + t = jogador_alvo.last_events_table + end + local i = t.n t.n = i + 1 @@ -621,6 +632,11 @@ if (jogador_alvo.grupo) then local t = jogador_alvo.last_events_table + if (not t) then + jogador_alvo.last_events_table = _detalhes:CreateActorLastEventTable() + t = jogador_alvo.last_events_table + end + local i = t.n t.n = i + 1 @@ -1476,8 +1492,14 @@ damage_cache [who_name] = damage_actor end end - + local t = damage_actor.last_events_table + + if (not t) then + damage_actor.last_events_table = _detalhes:CreateActorLastEventTable() + t = damage_actor.last_events_table + end + local i = t.n t.n = i + 1 diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index deeb6df7..57fc6b1b 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -732,7 +732,7 @@ do if (child.enabled and child.instance:IsEnabled()) then - child.options.segmentType = child.options.segmentType or 1 + child.options.segmentType = child.options.segmentType or 2 if (not child.instance.showing) then return child.text:SetText (Loc ["STRING_EMPTY_SEGMENT"]) diff --git a/core/util.lua b/core/util.lua index 05f0cd08..d89dde34 100644 --- a/core/util.lua +++ b/core/util.lua @@ -103,6 +103,15 @@ end return _string_format ("%.0f", numero) end + --> short numbers no numbers after comma + function _detalhes:ToKReport (numero) + if (numero > 1000000) then + return _string_format ("%.2f", numero/1000000) .."M" + elseif (numero > 1000) then + return _string_format ("%.1f", numero/1000) .."K" + end + return numero + end --> no changes function _detalhes:NoToK (numero) return numero @@ -187,6 +196,8 @@ return from > #s and "" or s:match(".*%S", from) end +-- /script print (_detalhes:Scale (0, 3, 1, 1000, math.abs (1.654-3))) + --> scale function _detalhes:Scale (rangeMin, rangeMax, scaleMin, scaleMax, x) return 1 + (x - rangeMin) * (scaleMax - scaleMin) / (rangeMax - rangeMin) diff --git a/functions/skins.lua b/functions/skins.lua index d971aab2..e7548529 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -27,6 +27,10 @@ local _ _detalhes.skins [skin_name] = skin_table return true end + + function _detalhes:GetSkin (skin_name) + return _detalhes.skins [skin_name] + end --> install default skins: _detalhes:InstallSkin ("Default Skin", { @@ -63,6 +67,18 @@ local _ plugins_grow_direction = 2, bg_alpha = 0.7, + --rows + row_info = { + texture = "Details D'ictum", + texture_class_colors = true, + alpha = 1, + texture_background_class_color = false, + texture_background = "Details Serenity", + fixed_texture_background_color = {0.619607, 0.619607, 0.619607, 0.116164}, + space = {left = 3, right = -5, between = 2}, + backdrop = {enabled = false, size = 6, color = {0, 0, 0, 0.305214}, texture = "Details BarBorder 2"} + }, + --instance button instancebutton_config = {size = {22, 14}, anchor = {-2, -1}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", normal_texture = [[Interface\AddOns\Details\images\skins\default_skin]], @@ -393,6 +409,37 @@ local _ t2:SetTexCoord (0, .4, 0, 1) --]] + local align_right_chat = function() + + if (not RightChatPanel or not RightChatPanel:IsShown()) then + _detalhes:Msg ("Right Chat Panel isn't shown.") + return + end + + local wight, height = RightChatPanel:GetSize() + + local instance1 = _detalhes.tabela_instancias [1] + local instance2 = _detalhes.tabela_instancias [2] + if (not instance2) then + instance2 = _detalhes:CriarInstancia() + instance2:ChangeSkin ("ElvUI Frame Style") + elseif (not instance2.ativa) then + instance2:AtivarInstancia() + instance2:ChangeSkin ("ElvUI Frame Style") + end + + instance1.baseframe:ClearAllPoints() + instance2.baseframe:ClearAllPoints() + + instance1.baseframe:SetSize (wight/2 - 4, height-20-21-8) + instance2.baseframe:SetSize (wight/2 - 4, height-20-21-8) + + instance1.baseframe:SetPoint ("bottomleft", RightChatDataPanel, "topleft", 1, 1) + instance2.baseframe:SetPoint ("bottomright", RightChatToggleButton, "topright", -1, 1) + + end + + _detalhes:InstallSkin ("ElvUI Frame Style", { file = [[Interface\AddOns\Details\images\skins\elvui]], @@ -405,7 +452,7 @@ local _ can_change_alpha_head = true, --icon anchors - icon_anchor_main = {-1, -5}, + icon_anchor_main = {-4, -5}, icon_anchor_plugins = {-7, -13}, icon_plugins_size = {19, 18}, @@ -451,7 +498,10 @@ local _ desaturated_menu = true, desaturated_menu2 = true, - bg_alpha = 0.3, + bg_alpha = 0.51, + bg_r = 0.3294, + bg_g = 0.3294, + bg_b = 0.3294, show_statusbar = false, row_info = { @@ -462,7 +512,8 @@ local _ texture_background = "Details D'ictum", fixed_texture_color = {0, 0, 0}, fixed_texture_background_color = {0, 0, 0, 0.471}, - space = {left = 1, right = -2, between = 0}, + space = {left = 1, right = -2, between = 1}, + backdrop = {enabled = true, size = 4, color = {0, 0, 0, 1}, texture = "Details BarBorder 2"} }, wallpaper = { overlay = {0, 0, 0}, @@ -474,6 +525,10 @@ local _ alpha = 0.8, texture = "Interface\\Glues\\CREDITS\\Badlands3", } + }, + + skin_options = { + {type = "button", label = "", text = "Align Within Right Chat", func = align_right_chat, desc = "Move and resize the windows #1 and #2 placing over the right chat window.\nThis process doesn't lock nor snap the two windows."} } }) diff --git a/functions/slash.lua b/functions/slash.lua index 8b1fb295..a9243b3d 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -92,6 +92,23 @@ function SlashCmdList.DETAILS (msg, editbox) -------- debug --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + elseif (msg == "align") then + local c = RightChatPanel + local w,h = c:GetSize() + print (w,h) + + local instance1 = _detalhes.tabela_instancias [1] + local instance2 = _detalhes.tabela_instancias [2] + + instance1.baseframe:ClearAllPoints() + instance2.baseframe:ClearAllPoints() + + instance1.baseframe:SetSize (w/2 - 4, h-20-21-8) + instance2.baseframe:SetSize (w/2 - 4, h-20-21-8) + + instance1.baseframe:SetPoint ("bottomleft", RightChatDataPanel, "topleft", 1, 1) + instance2.baseframe:SetPoint ("bottomright", RightChatToggleButton, "topright", -1, 1) + elseif (msg == "addcombat") then local combat = _detalhes.combate:NovaTabela (true, _detalhes.tabela_overall, 1) diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 96dc6460..e60e553e 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -987,6 +987,9 @@ function gump:CriaJanelaInfo() este_gump.report_direita:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", -8, -57) este_gump.report_direita:Hide() + local red = "FFFFAAAA" + local green = "FFAAFFAA" + --> tabs: --> tab default _detalhes:CreatePlayerDetailsTab ("Summary", --[1] tab name @@ -1262,17 +1265,17 @@ function gump:CriaJanelaInfo() local d = ps - lastvalue d = d / ps * 100 if (inverse) then - diff = "|cFF00FF00+" .. _math_floor (math.abs (d)) .. "%|r" + diff = "|c" .. green .. "+" .. _math_floor (math.abs (d)) .. "%|r" else - diff = "|cFFFF0000+" .. _math_floor (math.abs (d)) .. "%|r" + diff = "|c" .. red .. "+" .. _math_floor (math.abs (d)) .. "%|r" end else local d = lastvalue - ps d = d / lastvalue * 100 if (inverse) then - diff = "|cFFFF0000-" .. _math_floor (math.abs (d)) .. "%|r" + diff = "|c" .. red .. "-" .. _math_floor (math.abs (d)) .. "%|r" else - diff = "|cFF00FF00-" .. _math_floor (math.abs (d)) .. "%|r" + diff = "|c" .. green .. "-" .. _math_floor (math.abs (d)) .. "%|r" end end end @@ -1533,9 +1536,7 @@ function gump:CriaJanelaInfo() end end end - - --> buffs uptime if (index_used < 11) then if (misc_player.buff_uptime_spell_tables) then @@ -1599,7 +1600,238 @@ function gump:CriaJanelaInfo() ) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - + + local target_texture = [[Interface\MINIMAP\TRACKING\Target]] + local empty_text = "" + + local fill_compare_targets = function (self, player, other_players, target_pool) + + local offset = FauxScrollFrame_GetOffset (self) + + local frame2 = DetailsPlayerComparisonTarget2 + local frame3 = DetailsPlayerComparisonTarget3 + + local total = player.total_without_pet + + if (not target_pool [1]) then + for i = 1, 4 do + local bar = self.bars [i] + local bar_2 = frame2.bars [i] + local bar_3 = frame3.bars [i] + + bar [1]:SetTexture (nil) + bar [2].lefttext:SetText (empty_text) + bar [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar [2].righttext:SetText ("") + bar [2]:SetValue (0) + bar [3][4] = nil + bar_2 [1]:SetTexture (nil) + bar_2 [2].lefttext:SetText (empty_text) + bar_2 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_2 [2].righttext:SetText ("") + bar_2 [2]:SetValue (0) + bar_2 [3][4] = nil + bar_3 [1]:SetTexture (nil) + bar_3 [2].lefttext:SetText (empty_text) + bar_3 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_3 [2].righttext:SetText ("") + bar_3 [2]:SetValue (0) + bar_3 [3][4] = nil + end + + return + end + + local top = target_pool [1] [2] + + --player 2 + local player_2 = other_players [1] + local player_2_target_pool + local player_2_top + if (player_2) then + local player_2_target = player_2.targets._ActorTable + player_2_target_pool = {} + for index, target in _ipairs (player_2_target) do + player_2_target_pool [#player_2_target_pool+1] = {target.nome, target.total} + end + table.sort (player_2_target_pool, function (t1, t2) return t1[2] > t2[2] end) + player_2_top = player_2_target_pool [1] [2] + --1 skill, + end + + --player 3 + local player_3 = other_players [2] + local player_3_target_pool + local player_3_top + if (player_3) then + local player_3_target = player_3.targets._ActorTable + player_3_target_pool = {} + for index, target in _ipairs (player_3_target) do + player_3_target_pool [#player_3_target_pool+1] = {target.nome, target.total} + end + table.sort (player_3_target_pool, function (t1, t2) return t1[2] > t2[2] end) + player_3_top = player_3_target_pool [1] [2] + end + + for i = 1, 4 do + local bar = self.bars [i] + local bar_2 = frame2.bars [i] + local bar_3 = frame3.bars [i] + + local index = i + offset + local data = target_pool [index] + + if (data) then --[name] [total] + + local target_name = data [1] + + bar [1]:SetTexture (target_texture) + bar [1]:SetDesaturated (true) + bar [1]:SetAlpha (.7) + + bar [2].lefttext:SetText (index .. ". " .. target_name) + bar [2].lefttext:SetTextColor (1, 1, 1, 1) + bar [2].righttext:SetText (_detalhes:ToK2Min (data [2])) -- .. " (" .. _math_floor (data [2] / total * 100) .. "%)" + bar [2]:SetValue (data [2] / top * 100) + bar [3][1] = player.nome --name + bar [3][2] = target_name + bar [3][3] = data [2] --total + bar [3][4] = player + + -- 2 + if (player_2) then + + local player_2_target_total + local player_2_target_index + + for index, t in _ipairs (player_2_target_pool) do + if (t[1] == target_name) then + player_2_target_total = t[2] + player_2_target_index = index + break + end + end + + if (player_2_target_total) then + bar_2 [1]:SetTexture (target_texture) + bar_2 [1]:SetDesaturated (true) + bar_2 [1]:SetAlpha (.7) + + bar_2 [2].lefttext:SetText (player_2_target_index .. ". " .. target_name) + bar_2 [2].lefttext:SetTextColor (1, 1, 1, 1) + + if (data [2] > player_2_target_total) then + local diff = data [2] - player_2_target_total + local up = diff / data [2] * 100 + bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") + else + local diff = player_2_target_total - data [2] + local down = diff / player_2_target_total * 100 + bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") + end + + bar_2 [2]:SetValue (player_2_target_total / player_2_top * 100) + bar_2 [3][1] = player_2.nome + bar_2 [3][2] = target_name + bar_2 [3][3] = player_2_target_total + bar_2 [3][4] = player_2 + + else + bar_2 [1]:SetTexture (nil) + bar_2 [2].lefttext:SetText (empty_text) + bar_2 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_2 [2].righttext:SetText ("") + bar_2 [2]:SetValue (0) + bar_2 [3][4] = nil + end + else + bar_2 [1]:SetTexture (nil) + bar_2 [2].lefttext:SetText (empty_text) + bar_2 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_2 [2].righttext:SetText ("") + bar_2 [2]:SetValue (0) + bar_2 [3][4] = nil + end + + -- 3 + if (player_3) then + + local player_3_target_total + local player_3_target_index + + for index, t in _ipairs (player_3_target_pool) do + if (t[1] == target_name) then + player_3_target_total = t[2] + player_3_target_index = index + break + end + end + + if (player_3_target_total) then + bar_3 [1]:SetTexture (target_texture) + bar_3 [1]:SetDesaturated (true) + bar_3 [1]:SetAlpha (.7) + + bar_3 [2].lefttext:SetText (player_3_target_index .. ". " .. target_name) + bar_3 [2].lefttext:SetTextColor (1, 1, 1, 1) + + if (data [2] > player_3_target_total) then + local diff = data [2] - player_3_target_total + local up = diff / data [2] * 100 + bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") + else + local diff = player_3_target_total - data [2] + local down = diff / player_3_target_total * 100 + bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") + end + + bar_3 [2]:SetValue (player_3_target_total / player_3_top * 100) + bar_3 [3][1] = player_3.nome + bar_3 [3][2] = target_name + bar_3 [3][3] = player_3_target_total + bar_3 [3][4] = player_3 + + else + bar_3 [1]:SetTexture (nil) + bar_3 [2].lefttext:SetText (empty_text) + bar_3 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_3 [2].righttext:SetText ("") + bar_3 [2]:SetValue (0) + bar_3 [3][4] = nil + end + else + bar_3 [1]:SetTexture (nil) + bar_3 [2].lefttext:SetText (empty_text) + bar_3 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_3 [2].righttext:SetText ("") + bar_3 [2]:SetValue (0) + bar_3 [3][4] = nil + end + + else + bar [1]:SetTexture (nil) + bar [2].lefttext:SetText (empty_text) + bar [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar [2].righttext:SetText ("") + bar [2]:SetValue (0) + bar [3][4] = nil + bar_2 [1]:SetTexture (nil) + bar_2 [2].lefttext:SetText (empty_text) + bar_2 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_2 [2].righttext:SetText ("") + bar_2 [2]:SetValue (0) + bar_2 [3][4] = nil + bar_3 [1]:SetTexture (nil) + bar_3 [2].lefttext:SetText (empty_text) + bar_3 [2].lefttext:SetTextColor (.5, .5, .5, 1) + bar_3 [2].righttext:SetText ("") + bar_3 [2]:SetValue (0) + bar_3 [3][4] = nil + end + end + + end + local fill_compare_actors = function (self, player, other_players) --primeiro preenche a nossa barra @@ -1677,22 +1909,27 @@ function gump:CriaJanelaInfo() bar_2 [1]:SetTexture (icon) bar_2 [2].lefttext:SetText (player_2_spell_info [spellid] .. ". " .. name) bar_2 [2].lefttext:SetTextColor (1, 1, 1, 1) - if (data [2] > spell.total) then + + if (spell.total == 0 and data [2] == 0) then + bar_2 [2].righttext:SetText ("0 +(0%)") + + elseif (data [2] > spell.total) then local diff = data [2] - spell.total local up = diff / data [2] * 100 - bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = spell.total - data [2] local down = diff / spell.total * 100 - bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end + bar_2 [2]:SetValue (spell.total / player_2_top * 100) bar_2 [3][1] = spell.counter --tooltip hits bar_2 [3][2] = spell.total / spell.counter --tooltip average bar_2 [3][3] = _math_floor (spell.c_amt / spell.counter * 100) --tooltip critical else - bar_2 [1]:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]]) - bar_2 [2].lefttext:SetText ("-- x -- x --") + bar_2 [1]:SetTexture (nil) + bar_2 [2].lefttext:SetText (empty_text) bar_2 [2].lefttext:SetTextColor (.5, .5, .5, 1) bar_2 [2].righttext:SetText ("") bar_2 [2]:SetValue (0) @@ -1709,48 +1946,53 @@ function gump:CriaJanelaInfo() bar_3 [1]:SetTexture (icon) bar_3 [2].lefttext:SetText (player_3_spell_info [spellid] .. ". " .. name) bar_3 [2].lefttext:SetTextColor (1, 1, 1, 1) - if (data [2] > spell.total) then + + if (spell.total == 0 and data [2] == 0) then + bar_3 [2].righttext:SetText ("0 +(0%)") + + elseif (data [2] > spell.total) then local diff = data [2] - spell.total local up = diff / data [2] * 100 - bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = spell.total - data [2] local down = diff / spell.total * 100 - bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end - bar_3 [2]:SetValue (spell.total / player_2_top * 100) + + bar_3 [2]:SetValue (spell.total / player_3_top * 100) bar_3 [3][1] = spell.counter --tooltip hits bar_3 [3][2] = spell.total / spell.counter --tooltip average bar_3 [3][3] = _math_floor (spell.c_amt / spell.counter * 100) --tooltip critical else - bar_3 [1]:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]]) - bar_3 [2].lefttext:SetText ("-- x -- x --") + bar_3 [1]:SetTexture (nil) + bar_3 [2].lefttext:SetText (empty_text) bar_3 [2].lefttext:SetTextColor (.5, .5, .5, 1) bar_3 [2].righttext:SetText ("") bar_3 [2]:SetValue (0) end else - bar_3 [1]:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]]) - bar_3 [2].lefttext:SetText ("-- x -- x --") + bar_3 [1]:SetTexture (nil) + bar_3 [2].lefttext:SetText (empty_text) bar_3 [2].lefttext:SetTextColor (.5, .5, .5, 1) bar_3 [2].righttext:SetText ("") bar_3 [2]:SetValue (0) end else - bar [1]:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]]) - bar [2].lefttext:SetText ("-- x -- x --") + bar [1]:SetTexture (nil) + bar [2].lefttext:SetText (empty_text) bar [2].lefttext:SetTextColor (.5, .5, .5, 1) bar [2].righttext:SetText ("") bar [2]:SetValue (0) local bar_2 = frame2.bars [i] - bar_2 [1]:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]]) - bar_2 [2].lefttext:SetText ("-- x -- x --") + bar_2 [1]:SetTexture (nil) + bar_2 [2].lefttext:SetText (empty_text) bar_2 [2].lefttext:SetTextColor (.5, .5, .5, 1) bar_2 [2].righttext:SetText ("") bar_2 [2]:SetValue (0) local bar_3 = frame3.bars [i] - bar_3 [1]:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]]) - bar_3 [2].lefttext:SetText ("-- x -- x --") + bar_3 [1]:SetTexture (nil) + bar_3 [2].lefttext:SetText (empty_text) bar_3 [2].lefttext:SetTextColor (.5, .5, .5, 1) bar_3 [2].righttext:SetText ("") bar_3 [2]:SetValue (0) @@ -1765,19 +2007,26 @@ function gump:CriaJanelaInfo() end local refresh_comparison_box = function (self) - --atualiza a scroll FauxScrollFrame_Update (self, math.max (self.tab.spells_amt, 10), 9, 15) fill_compare_actors (self, self.tab.player, self.tab.players) - end - + local refresh_target_box = function (self) - end - + --player 1 targets + local my_targets = self.tab.player.targets._ActorTable + local target_pool = {} + for index, target in _ipairs (my_targets) do + target_pool [#target_pool+1] = {target.nome, target.total} + end + table.sort (target_pool, function (t1, t2) return t1[2] > t2[2] end) + + FauxScrollFrame_Update (self, math.max (#target_pool, 5), 4, 14) - + fill_compare_targets (self, self.tab.player, self.tab.players, target_pool) + end + local compare_fill = function (tab, player, combat) local players_to_compare = tab.players @@ -1796,6 +2045,217 @@ function gump:CriaJanelaInfo() end refresh_comparison_box (DetailsPlayerComparisonBox1) + refresh_target_box (DetailsPlayerComparisonTarget1) + + end + + local on_enter_target = function (self) + + local frame1 = DetailsPlayerComparisonTarget1 + local frame2 = DetailsPlayerComparisonTarget2 + local frame3 = DetailsPlayerComparisonTarget3 + + local bar1 = frame1.bars [self.index] + local bar2 = frame2.bars [self.index] + local bar3 = frame3.bars [self.index] + + local player_1 = bar1 [3] [4] + if (not player_1) then + return + end + local player_2 = bar2 [3] [4] + local player_3 = bar3 [3] [4] + + local target_name = bar1 [3] [2] + + frame1.tooltip:SetPoint ("bottomleft", bar1[2], "topleft", -18, 5) + frame2.tooltip:SetPoint ("bottomleft", bar2[2], "topleft", -18, 5) + frame3.tooltip:SetPoint ("bottomleft", bar3[2], "topleft", -18, 5) + + local actor1_total = bar1 [3] [3] + local actor2_total = bar1 [3] [3] + local actor3_total = bar1 [3] [3] + + -- player 1 + local player_1_skills = {} + for spellid, spell in _pairs (player_1.spell_tables._ActorTable) do + for index, target in _ipairs (spell.targets._ActorTable) do + if (target.nome == target_name) then + player_1_skills [#player_1_skills+1] = {spellid, target.total} + end + end + end + table.sort (player_1_skills, _detalhes.Sort2) + local player_1_top = player_1_skills [1] [2] + + -- player 2 + local player_2_skills = {} + local player_2_top + if (player_2) then + for spellid, spell in _pairs (player_2.spell_tables._ActorTable) do + for index, target in _ipairs (spell.targets._ActorTable) do + if (target.nome == target_name) then + player_2_skills [#player_2_skills+1] = {spellid, target.total} + end + end + end + table.sort (player_2_skills, _detalhes.Sort2) + player_2_top = player_2_skills [1] [2] + end + + -- player 3 + local player_3_skills = {} + local player_3_top + if (player_3) then + for spellid, spell in _pairs (player_3.spell_tables._ActorTable) do + for index, target in _ipairs (spell.targets._ActorTable) do + if (target.nome == target_name) then + player_3_skills [#player_3_skills+1] = {spellid, target.total} + end + end + end + table.sort (player_3_skills, _detalhes.Sort2) + player_3_top = player_3_skills [1] [2] + end + + -- build tooltip + frame1.tooltip:Reset() + frame2.tooltip:Reset() + frame3.tooltip:Reset() + + frame1.tooltip:Show() + frame2.tooltip:Show() + frame3.tooltip:Show() + + local frame2_gotresults = false + local frame3_gotresults = false + + for index, spell in _ipairs (player_1_skills) do + local bar = frame1.tooltip.bars [index] + if (not bar) then + bar = frame1.tooltip:CreateBar() + end + + local name, _, icon = _GetSpellInfo (spell[1]) + bar [1]:SetTexture (icon) + bar [2].lefttext:SetText (index .. ". " .. name) + bar [2].righttext:SetText (_detalhes:ToK2Min (spell [2])) + bar [2]:SetValue (spell [2]/player_1_top*100) + + if (player_2) then + local player_2_skill + local found_skill = false + for this_index, this_spell in _ipairs (player_2_skills) do + if (spell [1] == this_spell[1]) then + local bar = frame2.tooltip.bars [index] + if (not bar) then + bar = frame2.tooltip:CreateBar (index) + end + + bar [1]:SetTexture (icon) + bar [2].lefttext:SetText (this_index .. ". " .. name) + + if (spell [2] > this_spell [2]) then + local diff = spell [2] - this_spell [2] + local up = diff / spell [2] * 100 + bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") + else + local diff = this_spell [2] - spell [2] + local down = diff / this_spell [2] * 100 + bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") + end + + bar [2]:SetValue (this_spell [2]/player_2_top*100) + found_skill = true + frame2_gotresults = true + break + end + end + if (not found_skill) then + local bar = frame2.tooltip.bars [index] + if (not bar) then + bar = frame2.tooltip:CreateBar (index) + end + bar [1]:SetTexture (nil) + bar [2].lefttext:SetText ("") + bar [2].righttext:SetText ("") + end + end + + if (player_3) then + local player_3_skill + local found_skill = false + for this_index, this_spell in _ipairs (player_3_skills) do + if (spell [1] == this_spell[1]) then + local bar = frame3.tooltip.bars [index] + if (not bar) then + bar = frame3.tooltip:CreateBar (index) + end + + bar [1]:SetTexture (icon) + bar [2].lefttext:SetText (this_index .. ". " .. name) + + if (spell [2] > this_spell [2]) then + local diff = spell [2] - this_spell [2] + local up = diff / spell [2] * 100 + bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") + else + local diff = this_spell [2] - spell [2] + local down = diff / this_spell [2] * 100 + bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") + end + + bar [2]:SetValue (this_spell [2]/player_3_top*100) + found_skill = true + frame3_gotresults = true + break + end + end + if (not found_skill) then + local bar = frame3.tooltip.bars [index] + if (not bar) then + bar = frame3.tooltip:CreateBar (index) + end + bar [1]:SetTexture (nil) + bar [2].lefttext:SetText ("") + bar [2].righttext:SetText ("") + end + end + + end + + frame1.tooltip:SetHeight ( (#player_1_skills*15) + 10) + frame2.tooltip:SetHeight ( (#player_1_skills*15) + 10) + frame3.tooltip:SetHeight ( (#player_1_skills*15) + 10) + + if (not frame2_gotresults) then + frame2.tooltip:Hide() + end + if (not frame3_gotresults) then + frame3.tooltip:Hide() + end + + end + + local on_leave_target = function (self) + local frame1 = DetailsPlayerComparisonTarget1 + local frame2 = DetailsPlayerComparisonTarget2 + local frame3 = DetailsPlayerComparisonTarget3 + + local bar1 = frame1.bars [self.index] + local bar2 = frame2.bars [self.index] + local bar3 = frame3.bars [self.index] + + bar1[2]:SetStatusBarColor (.5, .5, .5, 1) + bar1[2].icon:SetTexCoord (0, 1, 0, 1) + bar2[2]:SetStatusBarColor (.5, .5, .5, 1) + bar2[2].icon:SetTexCoord (0, 1, 0, 1) + bar3[2]:SetStatusBarColor (.5, .5, .5, 1) + bar3[2].icon:SetTexCoord (0, 1, 0, 1) + + frame1.tooltip:Hide() + frame2.tooltip:Hide() + frame3.tooltip:Hide() end local on_enter = function (self) @@ -1857,31 +2317,31 @@ function gump:CriaJanelaInfo() if (hits > bar2[3][1]) then local diff = hits - bar2[3][1] local up = diff / hits * 100 - frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = bar2[3][1] - hits local down = diff / bar2[3][1] * 100 - frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end if (average > bar2[3][2]) then local diff = average - bar2[3][2] local up = diff / average * 100 - frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = bar2[3][2] - average local down = diff / bar2[3][2] * 100 - frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end if (critical > bar2[3][3]) then local diff = critical - bar2[3][3] local up = diff / critical * 100 - frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = bar2[3][3] - critical local down = diff / bar2[3][3] * 100 - frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end if (player2_misc) then @@ -1891,7 +2351,7 @@ function gump:CriaJanelaInfo() if (player1_uptime > spell.uptime) then local diff = player1_uptime - spell.uptime local up = diff / player1_uptime * 100 - frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = spell.uptime - player1_uptime local down = diff / spell.uptime * 100 @@ -1914,31 +2374,31 @@ function gump:CriaJanelaInfo() if (hits > bar3[3][1]) then local diff = hits - bar3[3][1] local up = diff / hits * 100 - frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = bar3[3][1] - hits local down = diff / bar3[3][1] * 100 - frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end if (average > bar3[3][2]) then local diff = average - bar3[3][2] local up = diff / average * 100 - frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = bar3[3][2] - average local down = diff / bar3[3][2] * 100 - frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end if (critical > bar3[3][3]) then local diff = critical - bar3[3][3] local up = diff / critical * 100 - frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = bar3[3][3] - critical local down = diff / bar3[3][3] * 100 - frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end if (player3_misc) then @@ -1948,11 +2408,11 @@ function gump:CriaJanelaInfo() if (player1_uptime > spell.uptime) then local diff = player1_uptime - spell.uptime local up = diff / player1_uptime * 100 - frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |cFFFF0000-(" .. _math_floor (up) .. "%)|r") + frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. red .. "-(" .. _math_floor (up) .. "%)|r") else local diff = spell.uptime - player1_uptime local down = diff / spell.uptime * 100 - frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |cFF00FF00+(" .. _math_floor (down) .. "%)|r") + frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. green .. "+(" .. _math_floor (down) .. "%)|r") end else frame3.tooltip.uptime_label2:SetText ("--x--x--") @@ -1988,7 +2448,7 @@ function gump:CriaJanelaInfo() local compare_create = function (tab, frame) - local create_bar = function (name, parent, index, main) + local create_bar = function (name, parent, index, main, is_target) local y = ((index-1) * -15) - 7 local spellicon = parent:CreateTexture (nil, "overlay") @@ -2000,21 +2460,26 @@ function gump:CriaJanelaInfo() bar.index = index bar:SetPoint ("topleft", spellicon, "topright", 0, 0) bar:SetPoint ("topright", parent, "topright", -4, y) - bar:SetStatusBarTexture (_detalhes.default_texture) + bar:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]]) bar:SetStatusBarColor (.5, .5, .5, 1) bar:SetMinMaxValues (0, 100) bar:SetValue (100) bar:SetHeight (14) bar.icon = spellicon - bar:SetScript ("OnEnter", on_enter) - bar:SetScript ("OnLeave", on_leave) + if (is_target) then + bar:SetScript ("OnEnter", on_enter_target) + bar:SetScript ("OnLeave", on_leave_target) + else + bar:SetScript ("OnEnter", on_enter) + bar:SetScript ("OnLeave", on_leave) + end bar.lefttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") local _, size, flags = bar.lefttext:GetFont() local font = SharedMedia:Fetch ("font", "Arial Narrow") - bar.lefttext:SetFont (font, 11, "outline") + bar.lefttext:SetFont (font, 11) bar.lefttext:SetPoint ("left", bar, "left", 2, 0) bar.lefttext:SetJustifyH ("left") @@ -2028,6 +2493,11 @@ function gump:CriaJanelaInfo() end bar.righttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") + + local _, size, flags = bar.righttext:GetFont() + local font = SharedMedia:Fetch ("font", "Arial Narrow") + bar.righttext:SetFont (font, 11) + bar.righttext:SetPoint ("right", bar, "right", -2, 0) bar.righttext:SetJustifyH ("right") bar.righttext:SetTextColor (1, 1, 1, 1) @@ -2087,6 +2557,92 @@ function gump:CriaJanelaInfo() return tooltip end + + local create_tooltip_target = function (name) + local tooltip = CreateFrame ("frame", name, UIParent) + tooltip:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], tile = true, tileSize = 16, edgeSize = 12, insets = {left = 1, right = 1, top = 1, bottom = 1},}) + tooltip:SetBackdropColor (0, 0, 0, 1) + tooltip:SetSize (175, 67) + tooltip:SetFrameStrata ("tooltip") + tooltip.bars = {} + + function tooltip:Reset() + for index, bar in _ipairs (tooltip.bars) do + bar [1]:SetTexture (nil) + bar [2].lefttext:SetText ("") + bar [2].righttext:SetText ("") + bar [2]:SetValue (0) + end + end + + function tooltip:CreateBar (index) + + if (index) then + if (index > #tooltip.bars+1) then + for i = #tooltip.bars+1, index-1 do + tooltip:CreateBar() + end + end + end + + local index = #tooltip.bars+1 + local y = ((index-1) * -15) - 7 + local parent = tooltip + + local spellicon = parent:CreateTexture (nil, "overlay") + spellicon:SetSize (14, 14) + spellicon:SetPoint ("topleft", parent, "topleft", 4, y) + spellicon:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]]) + + local bar = CreateFrame ("StatusBar", name .. "Bar" .. index, parent) + bar.index = index + bar:SetPoint ("topleft", spellicon, "topright", 0, 0) + bar:SetPoint ("topright", parent, "topright", -4, y) + bar:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]]) + bar:SetStatusBarColor (.5, .5, .5, 1) + bar:SetMinMaxValues (0, 100) + bar:SetValue (0) + bar:SetHeight (14) + bar.icon = spellicon + + bar.lefttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") + local _, size, flags = bar.lefttext:GetFont() + local font = SharedMedia:Fetch ("font", "Arial Narrow") + bar.lefttext:SetFont (font, 11) + bar.lefttext:SetPoint ("left", bar, "left", 2, 0) + bar.lefttext:SetJustifyH ("left") + bar.lefttext:SetTextColor (1, 1, 1, 1) + bar.lefttext:SetNonSpaceWrap (true) + bar.lefttext:SetWordWrap (false) + + if (name:find ("1")) then + bar.lefttext:SetWidth (110) + else + bar.lefttext:SetWidth (80) + end + + bar.righttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") + local _, size, flags = bar.righttext:GetFont() + local font = SharedMedia:Fetch ("font", "Arial Narrow") + bar.righttext:SetFont (font, 11) + bar.righttext:SetPoint ("right", bar, "right", -2, 0) + bar.righttext:SetJustifyH ("right") + bar.righttext:SetTextColor (1, 1, 1, 1) + + local object = {spellicon, bar} + tinsert (tooltip.bars, object) + return object + end + + local background = tooltip:CreateTexture (nil, "artwork") + background:SetTexture ([[Interface\SPELLBOOK\Spellbook-Page-1]]) + background:SetTexCoord (.6, 0.1, 0, 0.64453125) + background:SetVertexColor (0, 0, 0, 0.6) + background:SetPoint ("topleft", tooltip, "topleft", 2, -4) + background:SetPoint ("bottomright", tooltip, "bottomright", -4, 2) + + return tooltip + end local frame1 = CreateFrame ("scrollframe", "DetailsPlayerComparisonBox1", frame, "FauxScrollFrameTemplate") frame1:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_comparison_box) end) @@ -2107,9 +2663,7 @@ function gump:CriaJanelaInfo() for i = 1, 9 do create_bar ("DetailsPlayerComparisonBox1Bar"..i, frame1, i, true) end - - --cria o box dos targets local target1 = CreateFrame ("scrollframe", "DetailsPlayerComparisonTarget1", frame, "FauxScrollFrameTemplate") target1:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_target_box) end) @@ -2119,10 +2673,11 @@ function gump:CriaJanelaInfo() target1:SetBackdropColor (0, 0, 0, .7) target1.bars = {} target1.tab = tab + target1.tooltip = create_tooltip_target ("DetailsPlayerComparisonTarget1Tooltip") --criar as barras do target1 for i = 1, 4 do - create_bar ("DetailsPlayerComparisonTarget1Bar"..i, target1, i, true) + create_bar ("DetailsPlayerComparisonTarget1Bar"..i, target1, i, true, true) end -------------------------------------------- @@ -2153,10 +2708,11 @@ function gump:CriaJanelaInfo() target2:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 16, edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 1},}) target2:SetBackdropColor (0, 0, 0, .7) target2.bars = {} + target2.tooltip = create_tooltip_target ("DetailsPlayerComparisonTarget2Tooltip") --criar as barras do target2 for i = 1, 4 do - create_bar ("DetailsPlayerComparisonTarget2Bar"..i, target2, i) + create_bar ("DetailsPlayerComparisonTarget2Bar"..i, target2, i, nil, true) end frame3:SetPoint ("topleft", frame2, "topright", 5, 0) @@ -2183,10 +2739,11 @@ function gump:CriaJanelaInfo() target3:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 16, edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 1},}) target3:SetBackdropColor (0, 0, 0, .7) target3.bars = {} + target3.tooltip = create_tooltip_target ("DetailsPlayerComparisonTarget3Tooltip") --criar as barras do target1 for i = 1, 4 do - create_bar ("DetailsPlayerComparisonTarget3Bar"..i, target3, i) + create_bar ("DetailsPlayerComparisonTarget3Bar"..i, target3, i, nil, true) end end diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 8e7bca2d..2f0ccf14 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -3561,6 +3561,12 @@ function window:CreateFrame3() window:CreateLineBackground2 (frame3, "customSkinSelectToRemoveDropdown", "removeCustomSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_ERASE_DESC"]) + --> extra Options + g:NewLabel (frame3, _, "$parentSkinExtraOptionsAnchor", "SkinExtraOptionsAnchor", Loc ["STRING_OPTIONS_SKIN_EXTRA_OPTIONS_ANCHOR"], "GameFontNormal") + frame3.SkinExtraOptionsAnchor:Hide() + frame3.SkinExtraOptionsAnchor:SetPoint (window.right_start_at, -90) + frame3.ExtraOptions = {} + --> Anchors --general anchor @@ -6059,8 +6065,60 @@ function window:update_all (editing_instance) _G.DetailsOptionsWindow2OverallNewChallengeSlider.MyObject:SetValue (_detalhes.overall_clear_newchallenge) --> window 3 + + local skin = editing_instance.skin + local frame3 = _G.DetailsOptionsWindow3 + _G.DetailsOptionsWindow3SkinDropdown.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (editing_instance.skin) + _G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (skin) + + local skin_object = _detalhes:GetSkin (skin) + local skin_name_formated = skin:gsub (" ", "") + + --> hide all + for name, _ in pairs (_detalhes.skins) do + local name = name:gsub (" ", "") + for index, t in ipairs (frame3.ExtraOptions [name] or {}) do + t[1]:Hide() + t[2]:Hide() + end + end + frame3.SkinExtraOptionsAnchor:Hide() + + --> create or show options if necessary + if (skin_object.skin_options and not skin_object.options_created) then + skin_object.options_created = true + + frame3.ExtraOptions [skin_name_formated] = {} + + for index, widget in ipairs (skin_object.skin_options) do + local type = widget.type + + if (type == "button") then + local button = g:NewButton (frame3, _, "$parent" .. skin_name_formated .. "Button" .. index, skin_name_formated .. "Button" .. index, 160, 18, widget.func, nil, nil, nil, widget.text) + button:InstallCustomTexture() + + local label = g:NewLabel (frame3, _, "$parent" .. skin_name_formated .. "ButtonLabel" .. index, skin_name_formated .. "ButtonLabel" .. index, "", "GameFontHighlightLeft") + label:SetPoint ("left", button, "left") + + local desc = window:CreateLineBackground2 (frame3, skin_name_formated .. "Button" .. index, skin_name_formated .. "ButtonLabel" .. index, widget.desc) + desc:SetWidth (1) + + tinsert (frame3.ExtraOptions [skin_name_formated], {button, label}) + + button:SetPoint (window.right_start_at, window.top_start_at + (index * 1 * 25 * -1)) + end + end + + frame3.SkinExtraOptionsAnchor:Show() + + elseif (skin_object.skin_options) then + for index, t in ipairs (frame3.ExtraOptions [skin_name_formated]) do + t[1]:Show() + t[2]:Show() + end + frame3.SkinExtraOptionsAnchor:Show() + end --> window 4 _G.DetailsOptionsWindow4BarSpacementSizeSlider.MyObject:SetFixedParameter (editing_instance) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 93a0d4ce..9c52693d 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -2703,28 +2703,10 @@ function gump:CriaNovaBarra (instancia, index) esta_barra.border:SetFrameLevel (esta_barra.statusbar:GetFrameLevel()+1) esta_barra.border:SetAllPoints (esta_barra) - local backdrop = instancia.row_info.backdrop.enabled - local backdrop_color - if (backdrop) then - backdrop = {edgeFile = SharedMedia:Fetch ("border", instancia.row_info.backdrop.texture), edgeSize = instancia.row_info.backdrop.size} - backdrop_color = instancia.row_info.backdrop.color - end - - --backdrop - if (backdrop) then - esta_barra.border:SetBackdrop (backdrop) - esta_barra.border:SetBackdropBorderColor (_unpack (backdrop_color)) - else - esta_barra.border:SetBackdrop (nil) - end - esta_barra.textura = esta_barra.statusbar:CreateTexture (nil, "artwork") esta_barra.textura:SetHorizTile (false) esta_barra.textura:SetVertTile (false) - local current_texture = SharedMedia:Fetch ("statusbar", instancia.row_info.texture) - esta_barra.textura:SetTexture (current_texture) - esta_barra.background = esta_barra:CreateTexture (nil, "background") esta_barra.background:SetTexture() esta_barra.background:SetAllPoints (esta_barra) @@ -2758,36 +2740,14 @@ function gump:CriaNovaBarra (instancia, index) esta_barra.texto_direita:SetPoint ("right", esta_barra.statusbar, "right") esta_barra.texto_direita:SetJustifyH ("right") - instancia:SetFontSize (esta_barra.texto_esquerdo, instancia.row_info.font_size) - instancia:SetFontFace (esta_barra.texto_esquerdo, instancia.row_info.font_face_file) - - instancia:SetFontSize (esta_barra.texto_direita, instancia.row_info.font_size) - instancia:SetFontFace (esta_barra.texto_direita, instancia.row_info.font_face_file) - - if (instancia.row_info.textL_outline) then - instancia:SetFontOutline (esta_barra.texto_esquerdo, instancia.row_info.textL_outline) - end - if (instancia.row_info.textR_outline) then - instancia:SetFontOutline (esta_barra.texto_direita, instancia.row_info.textR_outline) - end - - if (not instancia.row_info.texture_class_colors) then - esta_barra.textura:SetVertexColor (_unpack (instancia.row_info.fixed_texture_color)) - end - - if (not instancia.row_info.textL_class_colors) then - esta_barra.texto_esquerdo:SetTextColor (_unpack (instancia.row_info.fixed_text_color)) - end - if (not instancia.row_info.textR_class_colors) then - esta_barra.texto_direita:SetTextColor (_unpack (instancia.row_info.fixed_text_color)) - end - --> inicia os scripts da barra barra_scripts (esta_barra, instancia, index) --> hida a barra gump:Fade (esta_barra, 1) + instancia:InstanceRefreshRows() + return esta_barra end diff --git a/gumps/janela_report.lua b/gumps/janela_report.lua index f4689f33..1cddf56c 100644 --- a/gumps/janela_report.lua +++ b/gumps/janela_report.lua @@ -143,7 +143,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals _detalhes.janela_report = gump:CriaJanelaReport() end - if (options.meu_id) then + if (options and options.meu_id) then self = options end diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index 2948bfac..d595423e 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -92,9 +92,6 @@ function _detalhes:OpenWelcomeWindow () end backward:Enable() end - - - end) backward:SetScript ("OnClick", function() @@ -122,8 +119,75 @@ function _detalhes:OpenWelcomeWindow () instance.baseframe:SetPoint ("left", DetailsWelcomeWindow, "right", 10, 0) end _detalhes:ScheduleTimer ("WelcomeSetLoc", 5) + +--/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,5000000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end) + + function _detalhes:CalcCpuPower() + local f = CreateFrame ("frame") + local got = false + + f:SetScript ("OnUpdate", function (self, elapsed) + if (not got and not InCombatLockdown()) then + local r = math.random + for i = 1, 2500000 do + local a = r (1, 1000000) + a = a + 1 + end + got = true + + elseif (not InCombatLockdown()) then + --print ("process time:", elapsed) + + if (elapsed < 0.375) then + _detalhes.use_row_animations = true + _detalhes.update_speed = 0.3 + + elseif (elapsed < 0.475) then + _detalhes.use_row_animations = true + _detalhes.update_speed = 0.5 + + elseif (elapsed < 0.525) then + _detalhes.update_speed = 0.5 + + end + + DetailsWelcomeWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed) + DetailsWelcomeWindowAnimateSlider.MyObject:SetValue (_detalhes.use_row_animations) + + f:SetScript ("OnUpdate", nil) + end + end) + end + + _detalhes:ScheduleTimer ("CalcCpuPower", 10) + + --detect ElvUI + local ElvUI = _G.ElvUI + if (ElvUI) then + --active elvui skin + local instance = _detalhes.tabela_instancias [1] + if (instance and instance.ativa) then + if (instance.skin ~= "ElvUI Frame Style") then + instance:ChangeSkin ("ElvUI Frame Style") + end + end + + --save standard + local savedObject = {} + for key, value in pairs (instance) do + if (_detalhes.instance_defaults [key]) then + if (type (value) == "table") then + savedObject [key] = table_deepcopy (value) + else + savedObject [key] = value + end + end + end + _detalhes.standard_skin = savedObject + end do + local Loc = LibStub ("AceLocale-3.0"):NewLocale ("Details", "enUS", true) if (Loc) then @@ -132,18 +196,18 @@ function _detalhes:OpenWelcomeWindow () Loc ["STRING_WELCOME_3"] = "Choose your DPS and HPS prefered method:" Loc ["STRING_WELCOME_4"] = "Activity Time"..": " Loc ["STRING_WELCOME_5"] = "Effective Time"..": " - Loc ["STRING_WELCOME_6"] = "the timer of each raid member is put on hold if his activity is ceased and back again to count when is resumed, common way of measure Dps and Hps." + Loc ["STRING_WELCOME_6"] = "the timer of each raid member is put on hold if his activity is ceased and back again to count when is resumed." Loc ["STRING_WELCOME_7"] = "used for rankings, this method uses the elapsed combat time for measure the Dps and Hps of all raid members." Loc ["STRING_WELCOME_8"] = "if you change your mind, you can always modify again through options panel" Loc ["STRING_WELCOME_9"] = "Details! reads and calculate combat numbers in a very fast way, but if some kind of data is irrelevant for you, you can disable/enable it 'on-the-fly'." Loc ["STRING_WELCOME_10"] = "Mouse over each slider to see what they represent." Loc ["STRING_WELCOME_11"] = "if you change your mind, you can always modify again through options panel" - Loc ["STRING_WELCOME_12"] = "Here you can choose the update speed of all opened windows. Low values with dance bars enabled may create cool effects, but may consume more cpu." - Loc ["STRING_WELCOME_13"] = "Enable 'Dance Bars' for bars animations." + Loc ["STRING_WELCOME_12"] = "In this page you can choose the update speed desired and also enable animations." + Loc ["STRING_WELCOME_13"] = "" Loc ["STRING_WELCOME_14"] = "Update Speed" - Loc ["STRING_WELCOME_15"] = "delay between each update,\ncpu usage may |cFFFF9900increase|r with low values\nand |cFF00FF00slight reduce|r with high values." - Loc ["STRING_WELCOME_16"] = "Dance Bars" - Loc ["STRING_WELCOME_17"] = "dancing bars is a feature which create animations\nto the left and right directions for all bars.\ncpu usage may |cFFFF9900slight increase|r with this turned on." + Loc ["STRING_WELCOME_15"] = "This is the delay length between each update in the window,\nthe standard value is 1 second,\nbut you may decrease to 0.3 for more dinamyc updates." + Loc ["STRING_WELCOME_16"] = "Enable Animations" + Loc ["STRING_WELCOME_17"] = "Enable or Disable bar animations." Loc ["STRING_WELCOME_18"] = "if you change your mind, you can always modify again through options panel" Loc ["STRING_WELCOME_19"] = "Memory Adjustments:" Loc ["STRING_WELCOME_20"] = "The amount of memory used by addons doesn't affect framerate, but, saving memory in computers which doesn't have much of it, may help the whole system. Details! try to be as flexible as possible to keep the game smooth even in not high-end hardware." @@ -194,7 +258,7 @@ function _detalhes:OpenWelcomeWindow () Loc ["STRING_WELCOME_10"] = "Passe o mouse para saber o que cada um representa" Loc ["STRING_WELCOME_11"] = "se voce mudar de ideia, voce pode mudar novamente no painel de opcoes" Loc ["STRING_WELCOME_12"] = "Aqui voce pode escolher o tempo de intervalo entre cada atualizacao da janela." - Loc ["STRING_WELCOME_13"] = "Ative 'Animar Barras' para animar as barras." + Loc ["STRING_WELCOME_13"] = "" Loc ["STRING_WELCOME_14"] = "Update Speed" Loc ["STRING_WELCOME_14"] = "Intervalo de Atualizacao" @@ -256,397 +320,12 @@ function _detalhes:OpenWelcomeWindow () pages [#pages+1] = {texto1, angel} + + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---> page 2 - - --ampulheta:SetTexture ([[Interface\Timer\Challenges-Logo]]) - --[[ - local ampulheta = window:CreateTexture (nil, "overlay") - - ampulheta:SetPoint ("topright", window, "topright", 60, 57) - ampulheta:SetHeight (125*3)--125 - ampulheta:SetWidth (89*3)--82 - ampulheta:SetAlpha (.1) - ampulheta:SetDesaturated (true) - --]] - - local ampulheta = window:CreateTexture (nil, "overlay") - ampulheta:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) - ampulheta:SetPoint ("bottomright", window, "bottomright", -10, 10) - ampulheta:SetHeight (125*3)--125 - ampulheta:SetWidth (89*3)--82 - ampulheta:SetAlpha (.1) - ampulheta:SetTexCoord (1, 0, 0, 1) - - g:NewLabel (window, _, "$parentChangeMind2Label", "changemind2Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange") - window.changemind2Label:SetPoint ("center", window, "center") - window.changemind2Label:SetPoint ("bottom", window, "bottom", 0, 19) - window.changemind2Label.align = "|" +--> Skins Page - local texto2 = window:CreateFontString (nil, "overlay", "GameFontNormal") - texto2:SetPoint ("topleft", window, "topleft", 20, -80) - texto2:SetText (Loc ["STRING_WELCOME_3"]) - - local chronometer = CreateFrame ("CheckButton", "WelcomeWindowChronometer", window, "ChatConfigCheckButtonTemplate") - chronometer:SetPoint ("topleft", window, "topleft", 40, -110) - local continuous = CreateFrame ("CheckButton", "WelcomeWindowContinuous", window, "ChatConfigCheckButtonTemplate") - continuous:SetPoint ("topleft", window, "topleft", 40, -160) - - _G ["WelcomeWindowChronometerText"]:SetText (Loc ["STRING_WELCOME_4"]) - _G ["WelcomeWindowContinuousText"]:SetText (Loc ["STRING_WELCOME_5"]) - - local chronometer_text = window:CreateFontString (nil, "overlay", "GameFontNormal") - chronometer_text:SetText (Loc ["STRING_WELCOME_6"]) - chronometer_text:SetWidth (360) - chronometer_text:SetHeight (40) - chronometer_text:SetJustifyH ("left") - chronometer_text:SetJustifyV ("top") - chronometer_text:SetTextColor (.8, .8, .8, 1) - chronometer_text:SetPoint ("topleft", _G ["WelcomeWindowChronometerText"], "topright", 0, 0) - - local continuous_text = window:CreateFontString (nil, "overlay", "GameFontNormal") - continuous_text:SetText (Loc ["STRING_WELCOME_7"]) - continuous_text:SetWidth (340) - continuous_text:SetHeight (40) - continuous_text:SetJustifyH ("left") - continuous_text:SetJustifyV ("top") - continuous_text:SetTextColor (.8, .8, .8, 1) - continuous_text:SetPoint ("topleft", _G ["WelcomeWindowContinuousText"], "topright", 0, 0) - - chronometer:SetHitRectInsets (0, -70, 0, 0) - continuous:SetHitRectInsets (0, -70, 0, 0) - - if (_detalhes.time_type == 1) then --> chronometer - chronometer:SetChecked (true) - continuous:SetChecked (false) - elseif (_detalhes.time_type == 2) then --> continuous - chronometer:SetChecked (false) - continuous:SetChecked (true) - end - - chronometer:SetScript ("OnClick", function() continuous:SetChecked (false); _detalhes.time_type = 1 end) - continuous:SetScript ("OnClick", function() chronometer:SetChecked (false); _detalhes.time_type = 2 end) - - pages [#pages+1] = {ampulheta, texto2, chronometer, continuous, chronometer_text, continuous_text, window.changemind2Label} - for _, widget in ipairs (pages[#pages]) do - widget:Hide() - end - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---> page 3 - - local mecanica = window:CreateTexture (nil, "overlay") - mecanica:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) - mecanica:SetPoint ("bottomright", window, "bottomright", -10, 10) - mecanica:SetHeight (125*3)--125 - mecanica:SetWidth (89*3)--82 - mecanica:SetAlpha (.1) - mecanica:SetTexCoord (1, 0, 0, 1) - - g:NewLabel (window, _, "$parentChangeMind3Label", "changemind3Label", Loc ["STRING_WELCOME_8"], "GameFontNormal", 9, "orange") - window.changemind3Label:SetPoint ("center", window, "center") - window.changemind3Label:SetPoint ("bottom", window, "bottom", 0, 19) - window.changemind3Label.align = "|" - - local texto3 = window:CreateFontString (nil, "overlay", "GameFontNormal") - texto3:SetPoint ("topleft", window, "topleft", 20, -80) - texto3:SetText (Loc ["STRING_WELCOME_40"]) - - local data_text = window:CreateFontString (nil, "overlay", "GameFontNormal") - data_text:SetText (Loc ["STRING_WELCOME_9"]) - data_text:SetWidth (460) - data_text:SetHeight (40) - data_text:SetJustifyH ("left") - data_text:SetJustifyV ("top") - data_text:SetTextColor (1, 1, 1, 1) - data_text:SetPoint ("topleft", window, "topleft", 30, -105) - - local data_text2 = window:CreateFontString (nil, "overlay", "GameFontNormal") - --data_text2:SetText ("Tip: for a best experience, it's recommend leave all turned on.") - data_text2:SetText (Loc ["STRING_WELCOME_10"]) - data_text2:SetWidth (460) - data_text2:SetHeight (40) - data_text2:SetJustifyH ("left") - data_text2:SetJustifyV ("top") - data_text2:SetTextColor (1, 1, 1, 1) - data_text2:SetPoint ("topleft", window, "topleft", 30, -201) - - --------------- Captures - g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "damageCaptureImage", "$parentCaptureDamage2") - window.damageCaptureImage:SetPoint (35, -155) - window.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1) - - g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "healCaptureImage", "$parentCaptureHeal2") - window.healCaptureImage:SetPoint (170, -155) - window.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1) - - g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "energyCaptureImage", "$parentCaptureEnergy2") - window.energyCaptureImage:SetPoint (305, -155) - window.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1) - - g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "miscCaptureImage", "$parentCaptureMisc2") - window.miscCaptureImage:SetPoint (35, -175) - window.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1) - - g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "auraCaptureImage", "$parentCaptureAura2") - window.auraCaptureImage:SetPoint (170, -175) - window.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1) - - g:NewLabel (window, _, "$parentCaptureDamageLabel", "damageCaptureLabel", "Damage") - window.damageCaptureLabel:SetPoint ("left", window.damageCaptureImage, "right", 2) - g:NewLabel (window, _, "$parentCaptureDamageLabel", "healCaptureLabel", "Healing") - window.healCaptureLabel:SetPoint ("left", window.healCaptureImage, "right", 2) - g:NewLabel (window, _, "$parentCaptureDamageLabel", "energyCaptureLabel", "Energy") - window.energyCaptureLabel:SetPoint ("left", window.energyCaptureImage, "right", 2) - g:NewLabel (window, _, "$parentCaptureDamageLabel", "miscCaptureLabel", "Misc") - window.miscCaptureLabel:SetPoint ("left", window.miscCaptureImage, "right", 2) - g:NewLabel (window, _, "$parentCaptureDamageLabel", "auraCaptureLabel", "Auras") - window.auraCaptureLabel:SetPoint ("left", window.auraCaptureImage, "right", 2) - - local switch_icon_color = function (icon, on_off) - icon:SetDesaturated (not on_off) - end - - g:NewSwitch (window, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"]) - window.damageCaptureSlider:SetPoint ("left", window.damageCaptureLabel, "right", 2) - window.damageCaptureSlider.tooltip = "Pause or enable capture of:\n- damage done\n- damage per second\n- friendly fire\n- damage taken" - window.damageCaptureSlider.OnSwitch = function (self, _, value) - _detalhes:CaptureSet (value, "damage", true) - switch_icon_color (window.damageCaptureImage, value) - end - switch_icon_color (window.damageCaptureImage, _detalhes.capture_real ["damage"]) - - g:NewSwitch (window, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"]) - window.healCaptureSlider:SetPoint ("left", window.healCaptureLabel, "right", 2) - window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done\n- absorbs\n- healing per second\n- overheal\n- healing taken\n- enemy healed" - window.healCaptureSlider.OnSwitch = function (self, _, value) - _detalhes:CaptureSet (value, "heal", true) - switch_icon_color (window.healCaptureImage, value) - end - switch_icon_color (window.healCaptureImage, _detalhes.capture_real ["heal"]) - - g:NewSwitch (window, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"]) - window.energyCaptureSlider:SetPoint ("left", window.energyCaptureLabel, "right", 2) - window.energyCaptureSlider.tooltip = "Pause or enable capture of:\n- mana restored\n- rage generated\n- energy generated\n- runic power generated" - window.energyCaptureSlider.OnSwitch = function (self, _, value) - _detalhes:CaptureSet (value, "energy", true) - switch_icon_color (window.energyCaptureImage, value) - end - switch_icon_color (window.energyCaptureImage, _detalhes.capture_real ["energy"]) - - g:NewSwitch (window, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"]) - window.miscCaptureSlider:SetPoint ("left", window.miscCaptureLabel, "right", 2) - window.miscCaptureSlider.tooltip = "Pause or enable capture of:\n- cc breaks\n- dispell\n- interrupts\n- ress\n- deaths\n- frags" - window.miscCaptureSlider.OnSwitch = function (self, _, value) - _detalhes:CaptureSet (value, "miscdata", true) - switch_icon_color (window.miscCaptureImage, value) - end - switch_icon_color (window.miscCaptureImage, _detalhes.capture_real ["miscdata"]) - - g:NewSwitch (window, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"]) - window.auraCaptureSlider:SetPoint ("left", window.auraCaptureLabel, "right", 2) - window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs uptime\n- debuffs uptime\n- void zones\n- cooldowns" - window.auraCaptureSlider.OnSwitch = function (self, _, value) - _detalhes:CaptureSet (value, "aura", true) - switch_icon_color (window.auraCaptureImage, value) - end - switch_icon_color (window.auraCaptureImage, _detalhes.capture_real ["aura"]) - - pages [#pages+1] = {mecanica, texto3, data_text, window.damageCaptureImage, window.healCaptureImage, window.energyCaptureImage, window.miscCaptureImage, - window.auraCaptureImage, window.damageCaptureSlider, window.healCaptureSlider, window.energyCaptureSlider, window.miscCaptureSlider, window.auraCaptureSlider, - window.damageCaptureLabel, window.healCaptureLabel, window.energyCaptureLabel, window.miscCaptureLabel, window.auraCaptureLabel, data_text2, window.changemind3Label} - - for _, widget in ipairs (pages[#pages]) do - widget:Hide() - end - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---> page 4 - - local bg = window:CreateTexture (nil, "overlay") - bg:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) - bg:SetPoint ("bottomright", window, "bottomright", -10, 10) - bg:SetHeight (125*3)--125 - bg:SetWidth (89*3)--82 - bg:SetAlpha (.1) - bg:SetTexCoord (1, 0, 0, 1) - - g:NewLabel (window, _, "$parentChangeMind4Label", "changemind4Label", Loc ["STRING_WELCOME_11"], "GameFontNormal", 9, "orange") - window.changemind4Label:SetPoint ("center", window, "center") - window.changemind4Label:SetPoint ("bottom", window, "bottom", 0, 19) - window.changemind4Label.align = "|" - - local texto4 = window:CreateFontString (nil, "overlay", "GameFontNormal") - texto4:SetPoint ("topleft", window, "topleft", 20, -80) - texto4:SetText (Loc ["STRING_WELCOME_41"]) - - local interval_text = window:CreateFontString (nil, "overlay", "GameFontNormal") - interval_text:SetText (Loc ["STRING_WELCOME_12"]) - interval_text:SetWidth (460) - interval_text:SetHeight (40) - interval_text:SetJustifyH ("left") - interval_text:SetJustifyV ("top") - interval_text:SetTextColor (1, 1, 1, 1) - interval_text:SetPoint ("topleft", window, "topleft", 30, -110) - - local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal") - dance_text:SetText (Loc ["STRING_WELCOME_13"]) - dance_text:SetWidth (460) - dance_text:SetHeight (40) - dance_text:SetJustifyH ("left") - dance_text:SetJustifyV ("top") - dance_text:SetTextColor (1, 1, 1, 1) - dance_text:SetPoint ("topleft", window, "topleft", 30, -175) - - --------------- Update Speed - g:NewLabel (window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_WELCOME_14"]) - window.updatespeedLabel:SetPoint (31, -150) - -- - g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv - window.updatespeedSlider:SetPoint ("left", window.updatespeedLabel, "right", 2, 0) - window.updatespeedSlider:SetThumbSize (50) - window.updatespeedSlider.useDecimals = true - local updateColor = function (slider, value) - if (value < 1) then - slider.amt:SetTextColor (1, value, 0) - elseif (value > 1) then - slider.amt:SetTextColor (-(value-3), 1, 0) - else - slider.amt:SetTextColor (1, 1, 0) - end - end - window.updatespeedSlider:SetHook ("OnValueChange", function (self, _, amount) - _detalhes:CancelTimer (_detalhes.atualizador) - _detalhes.update_speed = amount - _detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1) - updateColor (self, amount) - end) - updateColor (window.updatespeedSlider, _detalhes.update_speed) - - window.updatespeedSlider.tooltip = Loc ["STRING_WELCOME_15"] - - --------------- Animate Rows - g:NewLabel (window, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_WELCOME_16"]) - window.animateLabel:SetPoint (31, -195) - -- - g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv - window.animateSlider:SetPoint ("left",window.animateLabel, "right", 2, 0) - window.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true) - _detalhes.use_row_animations = value - end - window.animateSlider.tooltip = Loc ["STRING_WELCOME_17"] - - pages [#pages+1] = {bg, texto4, interval_text, dance_text, window.updatespeedLabel, window.updatespeedSlider, window.animateLabel, window.animateSlider, window.changemind4Label} - - for _, widget in ipairs (pages[#pages]) do - widget:Hide() - end - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---> page 5 - - local bg44 = window:CreateTexture (nil, "overlay") - bg44:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) - bg44:SetPoint ("bottomright", window, "bottomright", -10, 10) - bg44:SetHeight (125*3)--125 - bg44:SetWidth (89*3)--82 - bg44:SetAlpha (.1) - bg44:SetTexCoord (1, 0, 0, 1) - - g:NewLabel (window, _, "$parentChangeMind44Label", "changemind44Label", Loc ["STRING_WELCOME_18"], "GameFontNormal", 9, "orange") - window.changemind44Label:SetPoint ("center", window, "center") - window.changemind44Label:SetPoint ("bottom", window, "bottom", 0, 19) - window.changemind44Label.align = "|" - - local texto44 = window:CreateFontString (nil, "overlay", "GameFontNormal") - texto44:SetPoint ("topleft", window, "topleft", 20, -80) - texto44:SetText (Loc ["STRING_WELCOME_19"]) - - local interval_text4 = window:CreateFontString (nil, "overlay", "GameFontNormal") - interval_text4:SetText (Loc ["STRING_WELCOME_20"]) - interval_text4:SetWidth (460) - interval_text4:SetHeight (60) - interval_text4:SetJustifyH ("left") - interval_text4:SetJustifyV ("top") - interval_text4:SetTextColor (1, 1, 1, 1) - interval_text4:SetPoint ("topleft", window, "topleft", 30, -110) - - --[[ - local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal") - dance_text:SetText ("Low amount of segments can keep memory .") - dance_text:SetWidth (460) - dance_text:SetHeight (40) - dance_text:SetJustifyH ("left") - dance_text:SetJustifyV ("top") - dance_text:SetTextColor (1, 1, 1, 1) - dance_text:SetPoint ("topleft", window, "topleft", 30, -170) - --]] - --------------- Max Segments - g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"]) - window.segmentsLabel:SetPoint (31, -170) - -- - g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv - window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right", 2, 0) - window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue - _detalhes.segments_amount = math.floor (amount) - end) - window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"] - - --------------- memory - g:NewLabel (window, _, "$parentLabelMemory", "memoryLabel", Loc ["STRING_WELCOME_23"]) - window.memoryLabel:SetPoint (31, -185) - -- - g:NewSlider (window, _, "$parentSliderMemory", "memorySlider", 130, 20, 1, 4, 1, _detalhes.memory_threshold) -- min, max, step, defaultv - window.memorySlider:SetPoint ("left", window.memoryLabel, "right", 2, 0) - window.memorySlider:SetHook ("OnValueChange", function (slider, _, amount) --> slider, fixedValue, sliderValue - - amount = math.floor (amount) - - if (amount == 1) then - slider.amt:SetText ("<= 1gb") - _detalhes.memory_ram = 16 - elseif (amount == 2) then - slider.amt:SetText ("2gb") - _detalhes.memory_ram = 32 - elseif (amount == 3) then - slider.amt:SetText ("4gb") - _detalhes.memory_ram = 64 - elseif (amount == 4) then - slider.amt:SetText (">= 6gb") - _detalhes.memory_ram = 128 - end - - _detalhes.memory_threshold = amount - return true - end) - window.memorySlider.tooltip = Loc ["STRING_WELCOME_24"] - window.memorySlider.thumb:SetSize (40, 10) - window.memorySlider.thumb:SetTexture ([[Interface\Buttons\UI-Listbox-Highlight2]]) - window.memorySlider.thumb:SetVertexColor (.2, .2, .2, .9) - local t = _detalhes.memory_threshold - window.memorySlider:SetValue (1) - window.memorySlider:SetValue (2) - window.memorySlider:SetValue (t) - - --------------- Max Segments Saved - g:NewLabel (window, _, "$parentLabelSegmentsSave", "segmentsSaveLabel", Loc ["STRING_WELCOME_25"]) - window.segmentsSaveLabel:SetPoint (31, -200) - -- - g:NewSlider (window, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", 120, 20, 1, 5, 1, _detalhes.segments_amount_to_save) -- min, max, step, defaultv - window.segmentsSliderToSave:SetPoint ("left", window.segmentsSaveLabel, "right") - window.segmentsSliderToSave:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue - _detalhes.segments_amount_to_save = math.floor (amount) - end) - window.segmentsSliderToSave.tooltip = "High values may increase the time between a\nlogout button click and your character selection screen.\n\nIf you rarely check 'last day data', it`s high recommeded save only 1." - - pages [#pages+1] = {bg44, window.changemind44Label, texto44, interval_text4, window.memorySlider, window.memoryLabel, window.segmentsLabel, window.segmentsSlider, window.segmentsSaveLabel, window.segmentsSliderToSave} - - for _, widget in ipairs (pages[#pages]) do - widget:Hide() - end - --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---> page 5.5 + --SKINS local bg55 = window:CreateTexture (nil, "overlay") bg55:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) @@ -943,6 +622,8 @@ function _detalhes:OpenWelcomeWindow () end instance.wallpaper.texcoord = {0, 1, 0, 0.703125} end + + instance.wallpaper.alpha = 0.35 instance:InstanceWallpaper (true) else @@ -955,6 +636,405 @@ function _detalhes:OpenWelcomeWindow () for _, widget in ipairs (pages[#pages]) do widget:Hide() end + +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> page 2 + + -- DPS effective or active + + local ampulheta = window:CreateTexture (nil, "overlay") + ampulheta:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) + ampulheta:SetPoint ("bottomright", window, "bottomright", -10, 10) + ampulheta:SetHeight (125*3)--125 + ampulheta:SetWidth (89*3)--82 + ampulheta:SetAlpha (.1) + ampulheta:SetTexCoord (1, 0, 0, 1) + + g:NewLabel (window, _, "$parentChangeMind2Label", "changemind2Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange") + window.changemind2Label:SetPoint ("center", window, "center") + window.changemind2Label:SetPoint ("bottom", window, "bottom", 0, 19) + window.changemind2Label.align = "|" + + local texto2 = window:CreateFontString (nil, "overlay", "GameFontNormal") + texto2:SetPoint ("topleft", window, "topleft", 20, -80) + texto2:SetText (Loc ["STRING_WELCOME_3"]) + + local chronometer = CreateFrame ("CheckButton", "WelcomeWindowChronometer", window, "ChatConfigCheckButtonTemplate") + chronometer:SetPoint ("topleft", window, "topleft", 40, -110) + local continuous = CreateFrame ("CheckButton", "WelcomeWindowContinuous", window, "ChatConfigCheckButtonTemplate") + continuous:SetPoint ("topleft", window, "topleft", 40, -160) + + _G ["WelcomeWindowChronometerText"]:SetText (Loc ["STRING_WELCOME_4"]) + _G ["WelcomeWindowContinuousText"]:SetText (Loc ["STRING_WELCOME_5"]) + + local chronometer_text = window:CreateFontString (nil, "overlay", "GameFontNormal") + chronometer_text:SetText (Loc ["STRING_WELCOME_6"]) + chronometer_text:SetWidth (360) + chronometer_text:SetHeight (40) + chronometer_text:SetJustifyH ("left") + chronometer_text:SetJustifyV ("top") + chronometer_text:SetTextColor (.8, .8, .8, 1) + chronometer_text:SetPoint ("topleft", _G ["WelcomeWindowChronometerText"], "topright", 0, 0) + + local continuous_text = window:CreateFontString (nil, "overlay", "GameFontNormal") + continuous_text:SetText (Loc ["STRING_WELCOME_7"]) + continuous_text:SetWidth (340) + continuous_text:SetHeight (40) + continuous_text:SetJustifyH ("left") + continuous_text:SetJustifyV ("top") + continuous_text:SetTextColor (.8, .8, .8, 1) + continuous_text:SetPoint ("topleft", _G ["WelcomeWindowContinuousText"], "topright", 0, 0) + + chronometer:SetHitRectInsets (0, -70, 0, 0) + continuous:SetHitRectInsets (0, -70, 0, 0) + + if (_detalhes.time_type == 1) then --> chronometer + chronometer:SetChecked (true) + continuous:SetChecked (false) + elseif (_detalhes.time_type == 2) then --> continuous + chronometer:SetChecked (false) + continuous:SetChecked (true) + end + + chronometer:SetScript ("OnClick", function() continuous:SetChecked (false); _detalhes.time_type = 1 end) + continuous:SetScript ("OnClick", function() chronometer:SetChecked (false); _detalhes.time_type = 2 end) + + pages [#pages+1] = {ampulheta, texto2, chronometer, continuous, chronometer_text, continuous_text, window.changemind2Label} + for _, widget in ipairs (pages[#pages]) do + widget:Hide() + end + +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> page 3 + + --CAPTURES + + local mecanica = window:CreateTexture (nil, "overlay") + mecanica:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) + mecanica:SetPoint ("bottomright", window, "bottomright", -10, 10) + mecanica:SetHeight (125*3)--125 + mecanica:SetWidth (89*3)--82 + mecanica:SetAlpha (.1) + mecanica:SetTexCoord (1, 0, 0, 1) + + g:NewLabel (window, _, "$parentChangeMind3Label", "changemind3Label", Loc ["STRING_WELCOME_8"], "GameFontNormal", 9, "orange") + window.changemind3Label:SetPoint ("center", window, "center") + window.changemind3Label:SetPoint ("bottom", window, "bottom", 0, 19) + window.changemind3Label.align = "|" + + local texto3 = window:CreateFontString (nil, "overlay", "GameFontNormal") + texto3:SetPoint ("topleft", window, "topleft", 20, -80) + texto3:SetText (Loc ["STRING_WELCOME_40"]) + + local data_text = window:CreateFontString (nil, "overlay", "GameFontNormal") + data_text:SetText (Loc ["STRING_WELCOME_9"]) + data_text:SetWidth (460) + data_text:SetHeight (40) + data_text:SetJustifyH ("left") + data_text:SetJustifyV ("top") + data_text:SetTextColor (1, 1, 1, 1) + data_text:SetPoint ("topleft", window, "topleft", 30, -105) + + local data_text2 = window:CreateFontString (nil, "overlay", "GameFontNormal") + --data_text2:SetText ("Tip: for a best experience, it's recommend leave all turned on.") + data_text2:SetText (Loc ["STRING_WELCOME_10"]) + data_text2:SetWidth (460) + data_text2:SetHeight (40) + data_text2:SetJustifyH ("left") + data_text2:SetJustifyV ("top") + data_text2:SetTextColor (1, 1, 1, 1) + data_text2:SetPoint ("topleft", window, "topleft", 30, -201) + + --------------- Captures + g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "damageCaptureImage", "$parentCaptureDamage2") + window.damageCaptureImage:SetPoint (35, -155) + window.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1) + + g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "healCaptureImage", "$parentCaptureHeal2") + window.healCaptureImage:SetPoint (170, -155) + window.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1) + + g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "energyCaptureImage", "$parentCaptureEnergy2") + window.energyCaptureImage:SetPoint (305, -155) + window.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1) + + g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "miscCaptureImage", "$parentCaptureMisc2") + window.miscCaptureImage:SetPoint (35, -175) + window.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1) + + g:NewImage (window, [[Interface\AddOns\Details\images\atributos_captures]], 20, 20, nil, nil, "auraCaptureImage", "$parentCaptureAura2") + window.auraCaptureImage:SetPoint (170, -175) + window.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1) + + g:NewLabel (window, _, "$parentCaptureDamageLabel", "damageCaptureLabel", "Damage") + window.damageCaptureLabel:SetPoint ("left", window.damageCaptureImage, "right", 2) + g:NewLabel (window, _, "$parentCaptureDamageLabel", "healCaptureLabel", "Healing") + window.healCaptureLabel:SetPoint ("left", window.healCaptureImage, "right", 2) + g:NewLabel (window, _, "$parentCaptureDamageLabel", "energyCaptureLabel", "Energy") + window.energyCaptureLabel:SetPoint ("left", window.energyCaptureImage, "right", 2) + g:NewLabel (window, _, "$parentCaptureDamageLabel", "miscCaptureLabel", "Misc") + window.miscCaptureLabel:SetPoint ("left", window.miscCaptureImage, "right", 2) + g:NewLabel (window, _, "$parentCaptureDamageLabel", "auraCaptureLabel", "Auras") + window.auraCaptureLabel:SetPoint ("left", window.auraCaptureImage, "right", 2) + + local switch_icon_color = function (icon, on_off) + icon:SetDesaturated (not on_off) + end + + g:NewSwitch (window, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"]) + window.damageCaptureSlider:SetPoint ("left", window.damageCaptureLabel, "right", 2) + window.damageCaptureSlider.tooltip = "Pause or enable capture of:\n- damage done\n- damage per second\n- friendly fire\n- damage taken" + window.damageCaptureSlider.OnSwitch = function (self, _, value) + _detalhes:CaptureSet (value, "damage", true) + switch_icon_color (window.damageCaptureImage, value) + end + switch_icon_color (window.damageCaptureImage, _detalhes.capture_real ["damage"]) + + g:NewSwitch (window, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"]) + window.healCaptureSlider:SetPoint ("left", window.healCaptureLabel, "right", 2) + window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done\n- absorbs\n- healing per second\n- overheal\n- healing taken\n- enemy healed" + window.healCaptureSlider.OnSwitch = function (self, _, value) + _detalhes:CaptureSet (value, "heal", true) + switch_icon_color (window.healCaptureImage, value) + end + switch_icon_color (window.healCaptureImage, _detalhes.capture_real ["heal"]) + + g:NewSwitch (window, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"]) + window.energyCaptureSlider:SetPoint ("left", window.energyCaptureLabel, "right", 2) + window.energyCaptureSlider.tooltip = "Pause or enable capture of:\n- mana restored\n- rage generated\n- energy generated\n- runic power generated" + window.energyCaptureSlider.OnSwitch = function (self, _, value) + _detalhes:CaptureSet (value, "energy", true) + switch_icon_color (window.energyCaptureImage, value) + end + switch_icon_color (window.energyCaptureImage, _detalhes.capture_real ["energy"]) + + g:NewSwitch (window, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"]) + window.miscCaptureSlider:SetPoint ("left", window.miscCaptureLabel, "right", 2) + window.miscCaptureSlider.tooltip = "Pause or enable capture of:\n- cc breaks\n- dispell\n- interrupts\n- ress\n- deaths\n- frags" + window.miscCaptureSlider.OnSwitch = function (self, _, value) + _detalhes:CaptureSet (value, "miscdata", true) + switch_icon_color (window.miscCaptureImage, value) + end + switch_icon_color (window.miscCaptureImage, _detalhes.capture_real ["miscdata"]) + + g:NewSwitch (window, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"]) + window.auraCaptureSlider:SetPoint ("left", window.auraCaptureLabel, "right", 2) + window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs uptime\n- debuffs uptime\n- void zones\n- cooldowns" + window.auraCaptureSlider.OnSwitch = function (self, _, value) + _detalhes:CaptureSet (value, "aura", true) + switch_icon_color (window.auraCaptureImage, value) + end + switch_icon_color (window.auraCaptureImage, _detalhes.capture_real ["aura"]) + + pages [#pages+1] = {mecanica, texto3, data_text, window.damageCaptureImage, window.healCaptureImage, window.energyCaptureImage, window.miscCaptureImage, + window.auraCaptureImage, window.damageCaptureSlider, window.healCaptureSlider, window.energyCaptureSlider, window.miscCaptureSlider, window.auraCaptureSlider, + window.damageCaptureLabel, window.healCaptureLabel, window.energyCaptureLabel, window.miscCaptureLabel, window.auraCaptureLabel, data_text2, window.changemind3Label} + + for _, widget in ipairs (pages[#pages]) do + widget:Hide() + end + +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> page 4 + + -- UPDATE SPEED + + local bg = window:CreateTexture (nil, "overlay") + bg:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) + bg:SetPoint ("bottomright", window, "bottomright", -10, 10) + bg:SetHeight (125*3)--125 + bg:SetWidth (89*3)--82 + bg:SetAlpha (.1) + bg:SetTexCoord (1, 0, 0, 1) + + g:NewLabel (window, _, "$parentChangeMind4Label", "changemind4Label", Loc ["STRING_WELCOME_11"], "GameFontNormal", 9, "orange") + window.changemind4Label:SetPoint ("center", window, "center") + window.changemind4Label:SetPoint ("bottom", window, "bottom", 0, 19) + window.changemind4Label.align = "|" + + local texto4 = window:CreateFontString (nil, "overlay", "GameFontNormal") + texto4:SetPoint ("topleft", window, "topleft", 20, -80) + texto4:SetText (Loc ["STRING_WELCOME_41"]) + + local interval_text = window:CreateFontString (nil, "overlay", "GameFontNormal") + interval_text:SetText (Loc ["STRING_WELCOME_12"]) + interval_text:SetWidth (460) + interval_text:SetHeight (40) + interval_text:SetJustifyH ("left") + interval_text:SetJustifyV ("top") + interval_text:SetTextColor (1, 1, 1, 1) + interval_text:SetPoint ("topleft", window, "topleft", 30, -110) + + local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal") + dance_text:SetText (Loc ["STRING_WELCOME_13"]) + dance_text:SetWidth (460) + dance_text:SetHeight (40) + dance_text:SetJustifyH ("left") + dance_text:SetJustifyV ("top") + dance_text:SetTextColor (1, 1, 1, 1) + dance_text:SetPoint ("topleft", window, "topleft", 30, -175) + + --------------- Update Speed + g:NewLabel (window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_WELCOME_14"]) + window.updatespeedLabel:SetPoint (31, -150) + -- + + g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv + window.updatespeedSlider:SetPoint ("left", window.updatespeedLabel, "right", 2, 0) + window.updatespeedSlider:SetThumbSize (50) + window.updatespeedSlider.useDecimals = true + local updateColor = function (slider, value) + if (value < 1) then + slider.amt:SetTextColor (1, value, 0) + elseif (value > 1) then + slider.amt:SetTextColor (-(value-3), 1, 0) + else + slider.amt:SetTextColor (1, 1, 0) + end + end + window.updatespeedSlider:SetHook ("OnValueChange", function (self, _, amount) + _detalhes:CancelTimer (_detalhes.atualizador) + _detalhes.update_speed = amount + _detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1) + updateColor (self, amount) + end) + updateColor (window.updatespeedSlider, _detalhes.update_speed) + + window.updatespeedSlider:SetHook ("OnEnter", function() + _detalhes:CooltipPreset (1) + GameCooltip:AddLine (Loc ["STRING_WELCOME_15"]) + GameCooltip:ShowCooltip (window.updatespeedSlider, "tooltip") + return true + end) + + window.updatespeedSlider.tooltip = Loc ["STRING_WELCOME_15"] + + --------------- Animate Rows + g:NewLabel (window, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_WELCOME_16"]) + window.animateLabel:SetPoint (31, -175) + -- + g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv + window.animateSlider:SetPoint ("left",window.animateLabel, "right", 2, 0) + window.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true) + _detalhes.use_row_animations = value + end + window.animateSlider.tooltip = Loc ["STRING_WELCOME_17"] + + pages [#pages+1] = {bg, texto4, interval_text, dance_text, window.updatespeedLabel, window.updatespeedSlider, window.animateLabel, window.animateSlider, window.changemind4Label} + + for _, widget in ipairs (pages[#pages]) do + widget:Hide() + end + +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> page 5 + + --max segments, memory + + local bg44 = window:CreateTexture (nil, "overlay") + bg44:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) + bg44:SetPoint ("bottomright", window, "bottomright", -10, 10) + bg44:SetHeight (125*3)--125 + bg44:SetWidth (89*3)--82 + bg44:SetAlpha (.1) + bg44:SetTexCoord (1, 0, 0, 1) + + g:NewLabel (window, _, "$parentChangeMind44Label", "changemind44Label", Loc ["STRING_WELCOME_18"], "GameFontNormal", 9, "orange") + window.changemind44Label:SetPoint ("center", window, "center") + window.changemind44Label:SetPoint ("bottom", window, "bottom", 0, 19) + window.changemind44Label.align = "|" + + local texto44 = window:CreateFontString (nil, "overlay", "GameFontNormal") + texto44:SetPoint ("topleft", window, "topleft", 20, -80) + texto44:SetText (Loc ["STRING_WELCOME_19"]) + + local interval_text4 = window:CreateFontString (nil, "overlay", "GameFontNormal") + interval_text4:SetText (Loc ["STRING_WELCOME_20"]) + interval_text4:SetWidth (460) + interval_text4:SetHeight (60) + interval_text4:SetJustifyH ("left") + interval_text4:SetJustifyV ("top") + interval_text4:SetTextColor (1, 1, 1, 1) + interval_text4:SetPoint ("topleft", window, "topleft", 30, -110) + + --[[ + local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal") + dance_text:SetText ("Low amount of segments can keep memory .") + dance_text:SetWidth (460) + dance_text:SetHeight (40) + dance_text:SetJustifyH ("left") + dance_text:SetJustifyV ("top") + dance_text:SetTextColor (1, 1, 1, 1) + dance_text:SetPoint ("topleft", window, "topleft", 30, -170) + --]] + --------------- Max Segments + g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"]) + window.segmentsLabel:SetPoint (31, -170) + -- + g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv + window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right", 2, 0) + window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue + _detalhes.segments_amount = math.floor (amount) + end) + window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"] + + --------------- memory + g:NewLabel (window, _, "$parentLabelMemory", "memoryLabel", Loc ["STRING_WELCOME_23"]) + window.memoryLabel:SetPoint (31, -185) + -- + g:NewSlider (window, _, "$parentSliderMemory", "memorySlider", 130, 20, 1, 4, 1, _detalhes.memory_threshold) -- min, max, step, defaultv + window.memorySlider:SetPoint ("left", window.memoryLabel, "right", 2, 0) + window.memorySlider:SetHook ("OnValueChange", function (slider, _, amount) --> slider, fixedValue, sliderValue + + amount = math.floor (amount) + + if (amount == 1) then + slider.amt:SetText ("<= 1gb") + _detalhes.memory_ram = 16 + elseif (amount == 2) then + slider.amt:SetText ("2gb") + _detalhes.memory_ram = 32 + elseif (amount == 3) then + slider.amt:SetText ("4gb") + _detalhes.memory_ram = 64 + elseif (amount == 4) then + slider.amt:SetText (">= 6gb") + _detalhes.memory_ram = 128 + end + + _detalhes.memory_threshold = amount + return true + end) + window.memorySlider.tooltip = Loc ["STRING_WELCOME_24"] + window.memorySlider.thumb:SetSize (40, 10) + window.memorySlider.thumb:SetTexture ([[Interface\Buttons\UI-Listbox-Highlight2]]) + window.memorySlider.thumb:SetVertexColor (.2, .2, .2, .9) + local t = _detalhes.memory_threshold + window.memorySlider:SetValue (1) + window.memorySlider:SetValue (2) + window.memorySlider:SetValue (t) + + --------------- Max Segments Saved + g:NewLabel (window, _, "$parentLabelSegmentsSave", "segmentsSaveLabel", Loc ["STRING_WELCOME_25"]) + window.segmentsSaveLabel:SetPoint (31, -200) + -- + g:NewSlider (window, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", 120, 20, 1, 5, 1, _detalhes.segments_amount_to_save) -- min, max, step, defaultv + window.segmentsSliderToSave:SetPoint ("left", window.segmentsSaveLabel, "right") + window.segmentsSliderToSave:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue + _detalhes.segments_amount_to_save = math.floor (amount) + end) + window.segmentsSliderToSave.tooltip = "High values may increase the time between a\nlogout button click and your character selection screen.\n\nIf you rarely check 'last day data', it`s high recommeded save only 1." + + pages [#pages+1] = {bg44, window.changemind44Label, texto44, interval_text4, window.memorySlider, window.memoryLabel, window.segmentsLabel, window.segmentsSlider, window.segmentsSaveLabel, window.segmentsSliderToSave} + + for _, widget in ipairs (pages[#pages]) do + widget:Hide() + end + +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--> page 5.5 + + -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> page 6 @@ -1243,7 +1323,7 @@ function _detalhes:OpenWelcomeWindow () --forward:Click() --forward:Click() --]] - + end end \ No newline at end of file diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index e5af59fd..6d51dfa9 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -2,7 +2,7 @@ local Loc = LibStub("AceLocale-3.0"):NewLocale("Details", "enUS", true) if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.15.0 - v1.15.3 - v1.15.3b (|cFFFFCC00Jun 03, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Emergencial fix for death logs which sometimes was breaking the addon data capture.\n\n|cFFFFFF00-|r Fixed window alerts which was showing behind the bars.\n\n|cFFFFFF00-|r Fixed death log issue with friendly fire hits.\n\n|cFFFFFF00-|r Fixed a issue where Details! windows wasn't hidden when a pet battle starts.\n\n|cFFFFFF00-|r Fixed a issue with segments menu when a window is placed on the right side of the screen.\n\n|cFFFFFF00-|r Damage -> Enemies now also show neutral creatures.\n\n|cFFFFFF00-|r Added support to dungeons, bosses and trash mobs are now recognized.\n\n|cFFFFFF00-|r Added target information for each spell in Player Detail Window.\n\n|cFFFFFF00-|r Added options for change the location of tooltips.\n\n|cFFFFFF00-|r Added options for change the Overall Data functionality.\n\n|cFFFFFF00-|r Added tooltips for lock and detach buttons.\n\n|cFFFFFF00-|r Added new row texture: Details Vidro.\n\n|cFFFFFF00-|r Revamp on death log tooltips.\n\n|cFFFFFF00-|r Improved the visual effect for the instance which current moving window can snap to.\n\n|cFFFFFF00v1.14.5 - 1.14.6 (|cFFFFCC00May 24, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r Added option for lock segments display, so, when a segment is chosen, the other windows also change it.\n\n|cFFFFFF00-|r Added option for show the total amount of spells, targets and pets in tooltips.\n\n|cFFFFFF00-|r Finished another revamp on options panel.\n\n|cFFFFFF00-|r Now its possible open more then 1 Raid Plugins at once on diferent windows.\n\n|cFFFFFF00-|r Added a large text editor for make changes on custom texts.\n\n|cFFFFFF00-|r Added new option for enable borders on the bars.\n\n|cFFFFFF00-|r Added Death Barrier as a absorb spell.\n\n|cFFFFFF00-|r Fixed a bug on overheal tooltip where was showing the Hps instead of overheal.\n\n|cFFFFFF00v1.14.0 - v1.14.0b (|cFFFFCC00May 17, 2014|r|cFFFFFF00):\n\n|cFFFFFF00-|r Added a new tab on options panel for tooltip configuration.\n\n|cFFFFFF00-|r Added a new tab on options panel for broker config.\n\n|cFFFFFF00-|r Added new abbreviation method called comma.\n\n|cFFFFFF00-|r All instances now have a delete button.\n\n|cFFFFFF00-|r Full re-write on the instance, delete and close buttons.\n\n|cFFFFFF00-|r HotCorners now sort icons according with most used.\n\n|cFFFFFF00-|r Few changes on all skins in order to fit on the new right menu buttons.\n\n|cFFFFFF00-|r Added Horde avatars.\n\n|cFFFFFF00-|r Fixed issue where shortcut panel shows below thw windows when its in Dialog strata.\n\n|cFFFFFF00v1.13.8 - v1.13.8a (|cFFFFCC00May 09, 2014|r|cFFFFFF00):\n\n|cFFFFFF00-|r Fixed issue with Vanguard where it wasn't showing debuffs stacks on the tanks if you are a healer os dps.\n\n|cFFFFFF00-|r Added option for put stretch button on the fullscreen strata which makes it always on top of others frames.\n\n|cFFFFFF00-|r Added background and dialog stratas.\n\n|cFFFFFF00-|r Added option for percentage: follow the combat totals or the first player total.\n\n|cFFFFFF00-|r Added option for show or hide the left buttons on menu bar.\n\n|cFFFFFF00-|r Added option for change the left buttons size in the menu bar.\n\n|cFFFFFF00-|r Added option for delete a instance.\n\n|cFFFFFF00-|r Instance Segment Mini display now is more accuracy about telling the enemy in the segment.\n\n|cFFFFFF00-|r Player Details Window now show all pet abilities instead of just the total pet damage.\n\n|cFFFFFF00-|r Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers.\n\n|cFFFFFF00-|r Simple Gray and again ElvUI skins got some rework.\n\n|cFFFFFF00-|r Lib HotCorner now is data broker based and shows up all broker plugins in the bar.\n\n|cFFFFFF00v1.13.5 / v1.13.5a (|cFFFFCC00May 02, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r Added keybinds to reset segments and scroll up/down.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Micro Displays, also, should now give less problems and be more dynamic.\n\n|cFFFFFF00-|r Added options to change the transparency when out of combat and out of a group.\n\n|cFFFFFF00-|r Added and Still under development the panel for create data captures for charts.\n\n|cFFFFFF00-|r Fixed a issue with flat skin where the close button was just too big.\n\n|cFFFFFF00v1.13.0 (|cFFFFCC00Apr 25, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r Added four more abbreviation types.\n\n|cFFFFFF00-|r Fixed issue where the instance menu wasnt respecting the amount limit of instances.\n\n|cFFFFFF00-|r Added options for cutomize the right text of a row.\n\n|cFFFFFF00-|r Added a option to be able to chance the framestrata of an window.\n\n|cFFFFFF00-|r Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.\n\n|cFFFFFF00-|r Fixed a issue where changing the alpha of a window makes it disappear on the next logon.\n\n|cFFFFFF00-|r Added a option for auto transparency to ignore rows.\n\n|cFFFFFF00-|r Added option to be able to set shadow on the attribute text.\n\n|cFFFFFF00-|r Fixed a issue with window snap where disabled statusbar makes a gap between the windows.\n\n|cFFFFFF00-|r Added a hidden menu on the top left corner (experimental).\n\n|cFFFFFF00v1.12.3 (|cFFFFCC00Apr 18, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: 'Minimalistic' and 'Elm UI Frame Style'. It's necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.15.4 (|cFFFFCC00Jun 06, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a compare tab under Player Details Window:\nThis new tab showns up when there is too characters with the same class and spec.\nIts useful to compare skills used, uptimes and targets.\n\n|cFFFFFF00-|r Few improvements on Default and ElvUI skins.\n\n|cFFFFFF00-|r Added a button for auto align two windows within right chat window when ElvUI skin is active.\n\n|cFFFFFF00-|r Fixed problem with Damage -> Enemies display.\n\n|cFFFFFF00-|r Fixed report Player Detail Window report buttons.\n\n|cFFFFFF00-|r Fixed some report lines where the numbers wasnt properly formatted.\n\n|cFFFFFF00-|r Fixed a rare bug where the owner of some pets wasnt detected.\n\n|cFFFFFF00-|r Fixed issue in dungeons where capture data get paused after a boss kill.\n\n|cFFFFFF00-|r Fixed issue with Encounter Details showing its icon for dungeons bosses.\n\n|cFFFFFF00-|r Fixed a rare bug where the capture of damage stops after erasing a trash segment.\n\n|cFFFFFF00v1.15.0 - v1.15.3 - v1.15.3b (|cFFFFCC00Jun 03, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Emergencial fix for death logs which sometimes was breaking the addon data capture.\n\n|cFFFFFF00-|r Fixed window alerts which was showing behind the bars.\n\n|cFFFFFF00-|r Fixed death log issue with friendly fire hits.\n\n|cFFFFFF00-|r Fixed a issue where Details! windows wasn't hidden when a pet battle starts.\n\n|cFFFFFF00-|r Fixed a issue with segments menu when a window is placed on the right side of the screen.\n\n|cFFFFFF00-|r Damage -> Enemies now also show neutral creatures.\n\n|cFFFFFF00-|r Added support to dungeons, bosses and trash mobs are now recognized.\n\n|cFFFFFF00-|r Added target information for each spell in Player Detail Window.\n\n|cFFFFFF00-|r Added options for change the location of tooltips.\n\n|cFFFFFF00-|r Added options for change the Overall Data functionality.\n\n|cFFFFFF00-|r Added tooltips for lock and detach buttons.\n\n|cFFFFFF00-|r Added new row texture: Details Vidro.\n\n|cFFFFFF00-|r Revamp on death log tooltips.\n\n|cFFFFFF00-|r Improved the visual effect for the instance which current moving window can snap to.\n\n|cFFFFFF00v1.14.5 - 1.14.6 (|cFFFFCC00May 24, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r Added option for lock segments display, so, when a segment is chosen, the other windows also change it.\n\n|cFFFFFF00-|r Added option for show the total amount of spells, targets and pets in tooltips.\n\n|cFFFFFF00-|r Finished another revamp on options panel.\n\n|cFFFFFF00-|r Now its possible open more then 1 Raid Plugins at once on diferent windows.\n\n|cFFFFFF00-|r Added a large text editor for make changes on custom texts.\n\n|cFFFFFF00-|r Added new option for enable borders on the bars.\n\n|cFFFFFF00-|r Added Death Barrier as a absorb spell.\n\n|cFFFFFF00-|r Fixed a bug on overheal tooltip where was showing the Hps instead of overheal.\n\n|cFFFFFF00v1.14.0 - v1.14.0b (|cFFFFCC00May 17, 2014|r|cFFFFFF00):\n\n|cFFFFFF00-|r Added a new tab on options panel for tooltip configuration.\n\n|cFFFFFF00-|r Added a new tab on options panel for broker config.\n\n|cFFFFFF00-|r Added new abbreviation method called comma.\n\n|cFFFFFF00-|r All instances now have a delete button.\n\n|cFFFFFF00-|r Full re-write on the instance, delete and close buttons.\n\n|cFFFFFF00-|r HotCorners now sort icons according with most used.\n\n|cFFFFFF00-|r Few changes on all skins in order to fit on the new right menu buttons.\n\n|cFFFFFF00-|r Added Horde avatars.\n\n|cFFFFFF00-|r Fixed issue where shortcut panel shows below thw windows when its in Dialog strata.\n\n|cFFFFFF00v1.13.8 - v1.13.8a (|cFFFFCC00May 09, 2014|r|cFFFFFF00):\n\n|cFFFFFF00-|r Fixed issue with Vanguard where it wasn't showing debuffs stacks on the tanks if you are a healer os dps.\n\n|cFFFFFF00-|r Added option for put stretch button on the fullscreen strata which makes it always on top of others frames.\n\n|cFFFFFF00-|r Added background and dialog stratas.\n\n|cFFFFFF00-|r Added option for percentage: follow the combat totals or the first player total.\n\n|cFFFFFF00-|r Added option for show or hide the left buttons on menu bar.\n\n|cFFFFFF00-|r Added option for change the left buttons size in the menu bar.\n\n|cFFFFFF00-|r Added option for delete a instance.\n\n|cFFFFFF00-|r Instance Segment Mini display now is more accuracy about telling the enemy in the segment.\n\n|cFFFFFF00-|r Player Details Window now show all pet abilities instead of just the total pet damage.\n\n|cFFFFFF00-|r Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers.\n\n|cFFFFFF00-|r Simple Gray and again ElvUI skins got some rework.\n\n|cFFFFFF00-|r Lib HotCorner now is data broker based and shows up all broker plugins in the bar.\n\n|cFFFFFF00v1.13.5 / v1.13.5a (|cFFFFCC00May 02, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r Added keybinds to reset segments and scroll up/down.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Micro Displays, also, should now give less problems and be more dynamic.\n\n|cFFFFFF00-|r Added options to change the transparency when out of combat and out of a group.\n\n|cFFFFFF00-|r Added and Still under development the panel for create data captures for charts.\n\n|cFFFFFF00-|r Fixed a issue with flat skin where the close button was just too big.\n\n|cFFFFFF00v1.13.0 (|cFFFFCC00Apr 25, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r Added four more abbreviation types.\n\n|cFFFFFF00-|r Fixed issue where the instance menu wasnt respecting the amount limit of instances.\n\n|cFFFFFF00-|r Added options for cutomize the right text of a row.\n\n|cFFFFFF00-|r Added a option to be able to chance the framestrata of an window.\n\n|cFFFFFF00-|r Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.\n\n|cFFFFFF00-|r Fixed a issue where changing the alpha of a window makes it disappear on the next logon.\n\n|cFFFFFF00-|r Added a option for auto transparency to ignore rows.\n\n|cFFFFFF00-|r Added option to be able to set shadow on the attribute text.\n\n|cFFFFFF00-|r Fixed a issue with window snap where disabled statusbar makes a gap between the windows.\n\n|cFFFFFF00-|r Added a hidden menu on the top left corner (experimental).\n\n|cFFFFFF00v1.12.3 (|cFFFFCC00Apr 18, 2014|r|cFFFFFF00):|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: 'Minimalistic' and 'Elm UI Frame Style'. It's necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name @@ -861,6 +861,9 @@ if not Loc then return end Loc ["STRING_OPTIONS_SAVELOAD_STD_DESC"] = "Standard skin is applied on all new instances created." Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL_DESC"] = "Apply the current skin on all instances created." + Loc ["STRING_OPTIONS_SKIN_EXTRA_OPTIONS_ANCHOR"] = "Skin Options:" + + -- options window Window Settings ~6 Loc ["STRING_OPTIONS_WINDOW_ANCHOR"] = "Appearance Adjustments:" diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index 59029cc3..c7962df9 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -3,7 +3,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.15.0 - v1.15.3 - v1.15.3b|r:\n\n|cFFFFFF00-|r Emergencial fix for death logs which sometimes was breaking the addon data capture.\n\n|cFFFFFF00-|r Fixed window alerts which was showing behind the bars.\n\n|cFFFFFF00-|r Fixed death log issue with friendly fire hits.\n\n|cFFFFFF00-|r Fixed a issue where Details! windows wasn't hidden when a pet battle starts.\n\n|cFFFFFF00-|r Fixed a issue with segments menu when a window is placed on the right side of the screen.\n\n|cFFFFFF00-|r Damage -> Enemies now also show neutral creatures.\n\n|cFFFFFF00-|r Added support to dungeons, bosses and trash mobs are now recognized.\n\n|cFFFFFF00-|r Added target information for each spell in Player Detail Window.\n\n|cFFFFFF00-|r Added options for change the location of tooltips.\n\n|cFFFFFF00-|r Added options for change the Overall Data functionality.\n\n|cFFFFFF00-|r Added tooltips for lock and detach buttons.\n\n|cFFFFFF00-|r Added new row texture: Details Vidro.\n\n|cFFFFFF00-|r Revamp on death log tooltips.\n\n|cFFFFFF00-|r Improved the visual effect for the instance which current moving window can snap to.\n\n|cFFFFFF00v1.15.0: (test version) Dungeons e Overall data.\n\n|cFFFFFF00-|r Implemented a early support for Dungeons.\n\n|cFFFFFF00-|r Implemented Overall Data. Options for it are under combat tab.\n\n|cFFFFFF00-|r Implemented spell targets on Player Details Window.\n\n|cFFFFFF00v1.14.5 - 1.14.6\n\n|cFFFFFF00-|r Added option for lock segments display, so, when a segment is chosen, the other windows also change it.\n\n|cFFFFFF00-|r Added option for show the total amount of spells, targets and pets in tooltips.\n\n|cFFFFFF00-|r Finished another revamp on options panel.\n\n|cFFFFFF00-|r Now its possible open more then 1 Raid Plugins at once on diferent windows.\n\n|cFFFFFF00-|r Added a large text editor for make changes on custom texts.\n\n|cFFFFFF00-|r Added new option for enable borders on the bars.\n\n|cFFFFFF00-|r Added Death Barrier as a absorb spell.\n\n|cFFFFFF00-|r Fixed a bug on overheal tooltip where was showing the Hps instead of overheal.\n\n|cFFFFFF00v1.14.0 - v1.14.0b - v1.14.1\n\n|cFFFFFF00-|r Emergencial fix for crash after creating test bars and logoff.\n\n|cFFFFFF00-|r Fixed the default background alpha on default skin.\n\n|cFFFFFF00-|r Added spacing option under row settings for control the gap between bars.\n\n|cFFFFFF00-|r Added a new tab on options panel for tooltip configuration.\n\n|cFFFFFF00-|r Added a new tab on options panel for broker config.\n\n|cFFFFFF00-|r Added new abbreviation method called comma.\n\n|cFFFFFF00-|r All instances now have a delete button.\n\n|cFFFFFF00-|r Full re-write on the instance, delete and close buttons.\n\n|cFFFFFF00-|r HotCorners now sort icons according with most used.\n\n|cFFFFFF00-|r Few changes on all skins in order to fit on the new right menu buttons.\n\n|cFFFFFF00-|r Added Horde avatars.\n\n|cFFFFFF00-|r Fixed issue where shortcut panel shows below thw windows when its in Dialog strata.\n\n|cFFFFFF00v1.13.8 - v1.13.8a\n\n|cFFFFFF00-|r Fixed issue with Vanguard where it wasn't showing debuffs stacks on the tanks if you are a healer os dps.\n\n|cFFFFFF00-|r Added option for put stretch button on the fullscreen strata which makes it always on top of others frames.\n\n|cFFFFFF00-|r Added background and dialog stratas.\n\n|cFFFFFF00-|r Added option for percentage: follow the combat totals or the first player total.\n\n|cFFFFFF00-|r Added option for show or hide the left buttons on menu bar.\n\n|cFFFFFF00-|r Added option for change the left buttons size in the menu bar.\n\n|cFFFFFF00-|r Added option for delete a instance.\n\n|cFFFFFF00-|r Instance Segment Mini display now is more accuracy about telling the enemy in the segment.\n\n|cFFFFFF00-|r Player Details Window now show all pet abilities instead of just the total pet damage.\n\n|cFFFFFF00-|r Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers.\n\n|cFFFFFF00-|r Simple Gray and again ElvUI skins got some rework.\n\n|cFFFFFF00-|r Lib HotCorner now is data broker based and shows up all broker plugins in the bar.\n\n|cFFFFFF00v1.13.5 / v1.13.5a|r\n\n|cFFFFFF00-|r Added keybinds to reset segments and scroll up/down.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Micro Displays, also, should now give less problems and be more dynamic.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Added options to change the transparency when out of combat and out of a group.\n\n|cFFFFFF00-|r Added and Still under development the panel for create data captures for charts.\n\n|cFFFFFF00-|r Fixed a issue with flat skin where the close button was just too big.\n\n|cFFFFFF00v1.13.0|r\n\n|cFFFFFF00-|r Added four more abbreviation types.\n\n|cFFFFFF00-|r Fixed issue where the instance menu wasnt respecting the amount limit of instances.\n\n|cFFFFFF00-|r Added options for cutomize the right text of a row.\n\n|cFFFFFF00-|r Added a option to be able to chance the framestrata of an window.\n\n|cFFFFFF00-|r Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.\n\n|cFFFFFF00-|r Fixed a issue where changing the alpha of a window makes it disappear on the next logon.\n\n|cFFFFFF00-|r Added a option for auto transparency to ignore rows.\n\n|cFFFFFF00-|r Added option to be able to set shadow on the attribute text.\n\n|cFFFFFF00-|r Fixed a issue with window snap where disabled statusbar makes a gap between the windows.\n\n|cFFFFFF00-|r Added a hidden menu on the top left corner (experimental).\n\n|cFFFFFF00v1.12.3|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: Minimalistic and Elm UI Frame Style. Its necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.15.4 (|cFFFFCC00Jun 06, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a compare tab under Player Details Window:\nThis new tab showns up when there is too characters with the same class and spec.\nIts useful to compare skills used, uptimes and targets.\n\n|cFFFFFF00-|r Few improvements on Default and ElvUI skins.\n\n|cFFFFFF00-|r Added a button for auto align two windows within right chat window when ElvUI skin is active.\n\n|cFFFFFF00-|r Fixed problem with Damage -> Enemies display.\n\n|cFFFFFF00-|r Fixed report Player Detail Window report buttons.\n\n|cFFFFFF00-|r Fixed some report lines where the numbers wasnt properly formatted.\n\n|cFFFFFF00-|r Fixed a rare bug where the owner of some pets wasnt detected.\n\n|cFFFFFF00-|r Fixed issue in dungeons where capture data get paused after a boss kill.\n\n|cFFFFFF00-|r Fixed issue with Encounter Details showing its icon for dungeons bosses.\n\n|cFFFFFF00-|r Fixed a rare bug where the capture of damage stops after erasing a trash segment.\n\n|cFFFFFF00v1.15.0 - v1.15.3 - v1.15.3b|r:\n\n|cFFFFFF00-|r Emergencial fix for death logs which sometimes was breaking the addon data capture.\n\n|cFFFFFF00-|r Fixed window alerts which was showing behind the bars.\n\n|cFFFFFF00-|r Fixed death log issue with friendly fire hits.\n\n|cFFFFFF00-|r Fixed a issue where Details! windows wasn't hidden when a pet battle starts.\n\n|cFFFFFF00-|r Fixed a issue with segments menu when a window is placed on the right side of the screen.\n\n|cFFFFFF00-|r Damage -> Enemies now also show neutral creatures.\n\n|cFFFFFF00-|r Added support to dungeons, bosses and trash mobs are now recognized.\n\n|cFFFFFF00-|r Added target information for each spell in Player Detail Window.\n\n|cFFFFFF00-|r Added options for change the location of tooltips.\n\n|cFFFFFF00-|r Added options for change the Overall Data functionality.\n\n|cFFFFFF00-|r Added tooltips for lock and detach buttons.\n\n|cFFFFFF00-|r Added new row texture: Details Vidro.\n\n|cFFFFFF00-|r Revamp on death log tooltips.\n\n|cFFFFFF00-|r Improved the visual effect for the instance which current moving window can snap to.\n\n|cFFFFFF00v1.15.0: (test version) Dungeons e Overall data.\n\n|cFFFFFF00-|r Implemented a early support for Dungeons.\n\n|cFFFFFF00-|r Implemented Overall Data. Options for it are under combat tab.\n\n|cFFFFFF00-|r Implemented spell targets on Player Details Window.\n\n|cFFFFFF00v1.14.5 - 1.14.6\n\n|cFFFFFF00-|r Added option for lock segments display, so, when a segment is chosen, the other windows also change it.\n\n|cFFFFFF00-|r Added option for show the total amount of spells, targets and pets in tooltips.\n\n|cFFFFFF00-|r Finished another revamp on options panel.\n\n|cFFFFFF00-|r Now its possible open more then 1 Raid Plugins at once on diferent windows.\n\n|cFFFFFF00-|r Added a large text editor for make changes on custom texts.\n\n|cFFFFFF00-|r Added new option for enable borders on the bars.\n\n|cFFFFFF00-|r Added Death Barrier as a absorb spell.\n\n|cFFFFFF00-|r Fixed a bug on overheal tooltip where was showing the Hps instead of overheal.\n\n|cFFFFFF00v1.14.0 - v1.14.0b - v1.14.1\n\n|cFFFFFF00-|r Emergencial fix for crash after creating test bars and logoff.\n\n|cFFFFFF00-|r Fixed the default background alpha on default skin.\n\n|cFFFFFF00-|r Added spacing option under row settings for control the gap between bars.\n\n|cFFFFFF00-|r Added a new tab on options panel for tooltip configuration.\n\n|cFFFFFF00-|r Added a new tab on options panel for broker config.\n\n|cFFFFFF00-|r Added new abbreviation method called comma.\n\n|cFFFFFF00-|r All instances now have a delete button.\n\n|cFFFFFF00-|r Full re-write on the instance, delete and close buttons.\n\n|cFFFFFF00-|r HotCorners now sort icons according with most used.\n\n|cFFFFFF00-|r Few changes on all skins in order to fit on the new right menu buttons.\n\n|cFFFFFF00-|r Added Horde avatars.\n\n|cFFFFFF00-|r Fixed issue where shortcut panel shows below thw windows when its in Dialog strata.\n\n|cFFFFFF00v1.13.8 - v1.13.8a\n\n|cFFFFFF00-|r Fixed issue with Vanguard where it wasn't showing debuffs stacks on the tanks if you are a healer os dps.\n\n|cFFFFFF00-|r Added option for put stretch button on the fullscreen strata which makes it always on top of others frames.\n\n|cFFFFFF00-|r Added background and dialog stratas.\n\n|cFFFFFF00-|r Added option for percentage: follow the combat totals or the first player total.\n\n|cFFFFFF00-|r Added option for show or hide the left buttons on menu bar.\n\n|cFFFFFF00-|r Added option for change the left buttons size in the menu bar.\n\n|cFFFFFF00-|r Added option for delete a instance.\n\n|cFFFFFF00-|r Instance Segment Mini display now is more accuracy about telling the enemy in the segment.\n\n|cFFFFFF00-|r Player Details Window now show all pet abilities instead of just the total pet damage.\n\n|cFFFFFF00-|r Rework done on report texts, now the title is more shorter and also format Dps and Hps numbers.\n\n|cFFFFFF00-|r Simple Gray and again ElvUI skins got some rework.\n\n|cFFFFFF00-|r Lib HotCorner now is data broker based and shows up all broker plugins in the bar.\n\n|cFFFFFF00v1.13.5 / v1.13.5a|r\n\n|cFFFFFF00-|r Added keybinds to reset segments and scroll up/down.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Micro Displays, also, should now give less problems and be more dynamic.\n\n|cFFFFFF00-|r Added Spell Customization options where icon and the name of a spell can be changed.\n\n|cFFFFFF00-|r Added option to change the micro displays side, now it can be shown on the window top side.\n\n|cFFFFFF00-|r Added options to change the transparency when out of combat and out of a group.\n\n|cFFFFFF00-|r Added and Still under development the panel for create data captures for charts.\n\n|cFFFFFF00-|r Fixed a issue with flat skin where the close button was just too big.\n\n|cFFFFFF00v1.13.0|r\n\n|cFFFFFF00-|r Added four more abbreviation types.\n\n|cFFFFFF00-|r Fixed issue where the instance menu wasnt respecting the amount limit of instances.\n\n|cFFFFFF00-|r Added options for cutomize the right text of a row.\n\n|cFFFFFF00-|r Added a option to be able to chance the framestrata of an window.\n\n|cFFFFFF00-|r Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.\n\n|cFFFFFF00-|r Fixed a issue where changing the alpha of a window makes it disappear on the next logon.\n\n|cFFFFFF00-|r Added a option for auto transparency to ignore rows.\n\n|cFFFFFF00-|r Added option to be able to set shadow on the attribute text.\n\n|cFFFFFF00-|r Fixed a issue with window snap where disabled statusbar makes a gap between the windows.\n\n|cFFFFFF00-|r Added a hidden menu on the top left corner (experimental).\n\n|cFFFFFF00v1.12.3|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: Minimalistic and Elm UI Frame Style. Its necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name diff --git a/plugins/Details_DungeonInfo-Pandaria/Details_DungeonInfo-Pandaria.lua b/plugins/Details_DungeonInfo-Pandaria/Details_DungeonInfo-Pandaria.lua index decab934..f097370a 100644 --- a/plugins/Details_DungeonInfo-Pandaria/Details_DungeonInfo-Pandaria.lua +++ b/plugins/Details_DungeonInfo-Pandaria/Details_DungeonInfo-Pandaria.lua @@ -66,6 +66,8 @@ local TempleOfJadeSerpent = { [56843] = 2, --lorewalker stonestep [59051] = 2, --strife [59726] = 2, --peril + [56915] = 2, --sun + [58826] = 2, --zao sunseeker [56872] = 2, --osong [56732] = 3, --liu framehearth [56762] = 3, --yulon diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua index f9679f09..52131ad0 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua @@ -176,14 +176,17 @@ local function CreatePluginFrames (data) --> check if last combat was a boss encounter fight if (not debugmode) then + if (not _combat_object.is_boss) then - _combat_object.is_boss = EncounterDetails:FindBoss() - if (not _combat_object.is_boss) then - return - end + return elseif (_combat_object.is_boss.encounter == "pvp") then return end + + if (_combat_object.instance_type ~= "raid") then + return + end + end --> boss found, we need to show the icon diff --git a/startup.lua b/startup.lua index 064fc653..60654522 100644 --- a/startup.lua +++ b/startup.lua @@ -318,7 +318,7 @@ function _G._detalhes:Start() end --]] - --_detalhes:OpenWelcomeWindow() --for debug + if (self.is_first_run) then @@ -634,7 +634,7 @@ function _G._detalhes:Start() self.gump:Fade (instance._version, "in", 2) end - _detalhes:ScheduleTimer ("FadeStartVersion", 7) + _detalhes:ScheduleTimer ("FadeStartVersion", 12) end end @@ -1043,6 +1043,7 @@ function _G._detalhes:Start() --_detalhes:OpenOptionsWindow (_detalhes.tabela_instancias[1]) --print (_G ["DetailsClearSegmentsButton1"]:GetSize()) --_detalhes:OpenCustomWindow() + --_detalhes:OpenWelcomeWindow() --for debug end _detalhes:ScheduleTimer ("OpenOptionsWindowAtStart", 2)