- Added a compare tab under Player Details Window:
This new tab showns up when there is too characters with the same class and spec. Its useful to compare skills used, uptimes and targets. - Few improvements on Default and ElvUI skins. - Added a button for auto align two windows within right chat window when ElvUI skin is active. - Fixed problem with Damage -> Enemies display. - Fixed report Player Detail Window report buttons. - Fixed some report lines where the numbers wasn't properly formatted. - Fixed a rare bug where the owner of some pets wasn't detected. - Fixed issue in dungeons where capture data get paused after a boss kill. - Fixed issue with Encounter Details showing its icon for dungeons bosses. - Fixed a rare bug where the capture of damage stops after erasing a trash segment.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+18
-16
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+4
-3
@@ -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)
|
||||
|
||||
+23
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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)
|
||||
|
||||
+58
-3
@@ -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."}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
+614
-57
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+480
-400
@@ -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
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+3
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user