Tag v4.0 - Alpha

This commit is contained in:
Tercio
2015-08-31 18:56:21 -03:00
parent 7f0df36410
commit 6761640c05
17 changed files with 647 additions and 565 deletions
+1
View File
@@ -987,6 +987,7 @@ function DF:NewButton (parent, container, name, member, w, h, func, param1, para
end
end
ButtonObject.button:SetWidth (w or 100)
ButtonObject.button:SetHeight (h or 20)
ButtonObject.button.MyObject = ButtonObject
+1 -1
View File
@@ -596,7 +596,7 @@ end
-- do nothing
elseif (widget_table.type == "label" or widget_table.type == "text") then
local label = DF:CreateLabel (parent, widget_table.get() or widget_table.text, widget_table.text_template or widget_table.size, widget_table.color, widget_table.font, nil, "$parentWidget" .. index, "overlay")
local label = DF:CreateLabel (parent, widget_table.get() or widget_table.text, widget_table.text_template or text_template or widget_table.size, widget_table.color, widget_table.font, nil, "$parentWidget" .. index, "overlay")
label._get = widget_table.get
label.widget_type = "label"
label:SetPoint (cur_x, cur_y)
+4
View File
@@ -988,6 +988,10 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
end
function panel:Refresh()
if (type (panel._totalfunc) == "boolean") then
--> not yet initialized
return
end
local filled_lines = panel._totalfunc (panel)
local scroll_total_lines = #panel.scrollframe.lines
local line_height = options.rowheight
+3 -2
View File
File diff suppressed because one or more lines are too long
+13 -69
View File
@@ -400,7 +400,7 @@
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1.statusbar:SetValue (100)
row1:SetValue (100)
local r, b, g = unpack (instance.total_bar.color)
row1.textura:SetVertexColor (r, b, g)
@@ -436,7 +436,7 @@
row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"])
row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")")
row1.statusbar:SetValue (100)
row1:SetValue (100)
local r, b, g = unpack (instance.total_bar.color)
row1.textura:SetVertexColor (r, b, g)
@@ -555,7 +555,7 @@
--> primeiro colocado
if (esta_barra.colocacao == 1) then
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then
esta_barra.statusbar:SetValue (100)
esta_barra:SetValue (100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
gump:Fade (esta_barra, "out")
@@ -569,7 +569,7 @@
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
esta_barra.statusbar:SetValue (esta_porcentagem)
esta_barra:SetValue (esta_porcentagem)
gump:Fade (esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
@@ -585,7 +585,7 @@
--> agora esta comparando se a tabela da barra é diferente da tabela na atualização anterior
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then --> aqui diz se a barra do jogador mudou de posição ou se ela apenas será atualizada
esta_barra.statusbar:SetValue (esta_porcentagem)
esta_barra:SetValue (esta_porcentagem)
esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra
@@ -603,7 +603,7 @@
local upRow = barras_container [qual_barra-1]
if (upRow) then
if (upRow.statusbar:GetValue() < esta_barra.statusbar:GetValue()) then
esta_barra.statusbar:SetValue (esta_porcentagem)
esta_barra:SetValue (esta_porcentagem)
else
instancia:AnimarBarra (esta_barra, esta_porcentagem)
end
@@ -611,7 +611,7 @@
instancia:AnimarBarra (esta_barra, esta_porcentagem)
end
else
esta_barra.statusbar:SetValue (esta_porcentagem)
esta_barra:SetValue (esta_porcentagem)
end
esta_barra.last_value = esta_porcentagem
end
@@ -623,6 +623,8 @@
function atributo_custom:RefreshBarra (esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
if (from_resize) then
if (self.id) then
local school = _detalhes.spell_school_cache [self.nome]
@@ -641,13 +643,9 @@
end
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
_detalhes:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> we need a customized icon settings for custom displays.
if (self.classe == "UNKNOW") then
esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE_BW")
esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1)
@@ -699,63 +697,9 @@
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
end
--texture and text
local bar_number = ""
if (instancia.row_info.textL_show_number) then
bar_number = esta_barra.colocacao .. ". "
end
--> left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
if (self.enemy) then
if (self.arena_enemy) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t"))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
if (_detalhes.faction_against == "Horde") then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
if (self.arena_ally) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t"))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, ""))
else
esta_barra.texto_esquerdo:SetText (bar_number .. self.displayName) --seta o texto da esqueda
end
end
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
end
+107 -101
View File
@@ -307,7 +307,8 @@
else
return _unpack (_detalhes.class_colors.ARENA_YELLOW)
end
elseif (actor.enemy and not actor.arena_enemy) then
return 0.94117, 0.1, 0.1, 1
else
if (not is_player_class [actor.classe] and actor.flag_original and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
return _unpack (_detalhes.class_colors.NEUTRAL)
@@ -1091,10 +1092,6 @@
end
esta_barra.texto_direita:SetText (total_frags .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
esta_barra.texto_esquerdo:SetTextColor (1, 1, 1, 1)
esta_barra.texto_direita:SetTextColor (1, 1, 1, 1)
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
if (colocacao == 1) then
@@ -1103,13 +1100,14 @@
esta_barra:SetValue (tabela [2] / instancia.top * 100)
end
esta_barra.texto_esquerdo:SetTextColor (1, 1, 1, 1)
esta_barra.texto_direita:SetTextColor (1, 1, 1, 1)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
gump:Fade (esta_barra, "out")
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (_unpack (_detalhes.class_colors [tabela [3]]))
end
_detalhes:SetBarColors (esta_barra, instancia, _unpack (_detalhes.class_colors [tabela [3]]))
if (tabela [3] == "UNKNOW" or tabela [3] == "UNGROUPPLAYER" or tabela [3] == "ENEMY") then
esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_plus]])
@@ -1514,11 +1512,10 @@
school_color = _detalhes.school_colors ["unknown"]
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (_unpack (school_color))
end
_detalhes:SetBarColors (esta_barra, instancia, _unpack (school_color))
esta_barra.icone_classe:SetTexture (icon)
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
esta_barra.icone_classe:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then
@@ -2546,9 +2543,7 @@ end
return
end
else
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
if (use_animations) then
esta_barra.animacao_fim = esta_porcentagem
else
@@ -2557,20 +2552,11 @@ end
end
gump:Fade (esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
return self:RefreshBarra (esta_barra, instancia)
else
--> agora esta comparando se a tabela da barra é diferente da tabela na atualização anterior
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then --> aqui diz se a barra do jogador mudou de posição ou se ela apenas será atualizada
if (use_animations) then
esta_barra.animacao_fim = esta_porcentagem
else
@@ -2599,20 +2585,101 @@ end
end
--[[ exported]] function _detalhes:SetClassIcon (texture, instance)
local set_text_size = function (bar, instance)
if (instance.bars_inverted) then
bar.texto_direita:SetSize (instance.cached_bar_width - bar.texto_esquerdo:GetStringWidth() - 20, 15)
else
bar.texto_esquerdo:SetSize (instance.cached_bar_width - bar.texto_direita:GetStringWidth() - 20, 15)
end
end
--[[ exported]] function _detalhes:SetBarLeftText (bar, instance, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
local bar_number = ""
if (instance.row_info.textL_show_number) then
bar_number = bar.colocacao .. ". "
end
if (enemy) then
if (arena_enemy) then
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instance.showing))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
else
if (_detalhes.faction_against == "Horde") then
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instance.row_info.height..":"..instance.row_info.height..":0:0:256:32:0:32:0:32|t", self, instance.showing))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instance.row_info.height..":"..instance.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
end
else --alliance
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instance.row_info.height..":"..instance.row_info.height..":0:0:256:32:32:64:0:32|t", self, instance.showing))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instance.row_info.height..":"..instance.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
end
end
else
if (arena_ally) then
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instance.showing))
else
bar.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instance.row_info.height .. ":" .. instance.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
else
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, "", self, instance.showing))
else
bar.texto_esquerdo:SetText (bar_number .. self.displayName) --seta o texto da esqueda
end
end
end
set_text_size (bar, instance)
end
--[[ exported]] function _detalhes:SetBarColors (bar, instance, r, b, g, a)
a = a or 1
if (instance.row_info.texture_class_colors) then
if (instance.bars_inverted) then
bar.right_to_left_texture:SetVertexColor (r, b, g, a)
else
bar.textura:SetVertexColor (r, b, g, a)
end
end
if (instance.row_info.texture_background_class_color) then
bar.background:SetVertexColor (r, b, g, a)
end
if (instance.row_info.textL_class_colors) then
bar.texto_esquerdo:SetTextColor (r, b, g, a)
end
if (instance.row_info.textR_class_colors) then
bar.texto_direita:SetTextColor (r, b, g, a)
end
end
--[[ exported]] function _detalhes:SetClassIcon (texture, instance, classe)
if (self.spellicon) then
texture:SetTexture (self.spellicon)
texture:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
texture:SetVertexColor (1, 1, 1)
elseif (self.classe == "UNKNOW") then
elseif (classe == "UNKNOW") then
texture:SetTexture ([[Interface\AddOns\Details\images\classes_plus]])
texture:SetTexCoord (0.50390625, 0.62890625, 0, 0.125)
texture:SetVertexColor (1, 1, 1)
elseif (self.classe == "UNGROUPPLAYER") then
elseif (classe == "UNGROUPPLAYER") then
if (self.enemy) then
if (_detalhes.faction_against == "Horde") then
texture:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male")
@@ -2632,7 +2699,7 @@ end
end
texture:SetVertexColor (1, 1, 1)
elseif (self.classe == "PET") then
elseif (classe == "PET") then
texture:SetTexture (instance and instance.row_info.icon_file or [[Interface\AddOns\Details\images\classes_small]])
texture:SetTexCoord (0.25, 0.49609375, 0.75, 1)
texture:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
@@ -2644,96 +2711,35 @@ end
texture:SetVertexColor (1, 1, 1)
else
texture:SetTexture ([[Interface\AddOns\Details\images\classes_small]])
texture:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
texture:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [classe]))
texture:SetVertexColor (1, 1, 1)
end
else
texture:SetTexture (instance and instance.row_info.icon_file or [[Interface\AddOns\Details\images\classes_small]])
texture:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
texture:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [classe]))
texture:SetVertexColor (1, 1, 1)
end
end
end
--endd elsefi
--[[ exported]] function _detalhes:RefreshBarra (esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
if (from_resize) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia)
--texture and text
local bar_number = ""
if (instancia.row_info.textL_show_number) then
bar_number = esta_barra.colocacao .. ". "
end
if (self.enemy) then
if (self.arena_enemy) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
if (_detalhes.faction_against == "Horde") then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
end
else --alliance
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
end
--if (instancia.row_info.texture_class_colors and not instancia.showing.is_pvp) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
--elseif (instancia.showing.is_pvp) then
--esta_barra.background:SetVertexColor (1, 0, 0, 0.05)
--end
end
else
if (self.arena_ally) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. self.displayName) --seta o texto da esqueda
end
end
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
--> icon
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
--> texture color
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
end
--------------------------------------------- // TOOLTIPS // ---------------------------------------------
@@ -3930,7 +3936,7 @@ function atributo_damage:MontaInfoDamageDone()
local target_actor = instancia.showing (1, tabela[1])
if (target_actor) then
target_actor:SetClassIcon (barra.icone, instancia)
target_actor:SetClassIcon (barra.icone, instancia, target_actor.classe)
else
barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
local texCoords = _detalhes.class_coords ["ENEMY"]
+12 -122
View File
@@ -238,64 +238,12 @@ function atributo_energy:AtualizarResources (qual_barra, colocacao, instancia)
gump:Fade (esta_barra, "out")
end
--> texture color
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (self.classe == "UNKNOW") then
esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_plus]])
esta_barra.icone_classe:SetTexCoord (0.50390625, 0.62890625, 0, 0.125)
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
elseif (self.classe == "UNGROUPPLAYER") then
if (self.enemy) then
if (_detalhes.faction_against == "Horde") then
esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male")
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
else
esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male")
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
end
else
if (_detalhes.faction_against == "Horde") then
esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Human_Male")
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
else
esta_barra.icone_classe:SetTexture ("Interface\\ICONS\\Achievement_Character_Orc_Male")
esta_barra.icone_classe:SetTexCoord (0, 1, 0, 1)
end
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
elseif (self.classe == "PET") then
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1)
esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> icon
self:SetClassIcon (esta_barra.icone_classe, instancia, self.classe)
else
if (instancia.row_info.use_spec_icons) then
if (self.spec) then
esta_barra.icone_classe:SetTexture (instancia.row_info.spec_file)
esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_specs_coords [self.spec]))
else
esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_small]])
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
end
else
esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file)
esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe]))
end
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
end
--> refresh function
@@ -759,76 +707,18 @@ end
function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
if (from_resize) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia)
--texture and text
local bar_number = ""
if (instancia.row_info.textL_show_number) then
bar_number = esta_barra.colocacao .. ". "
end
if (self.enemy) then
if (self.arena_enemy) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
if (_detalhes.faction_against == "Horde") then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
if (self.arena_ally) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. self.displayName) --seta o texto da esqueda
end
end
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
--> icon
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
--> texture color
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
+9 -67
View File
@@ -851,76 +851,18 @@ end
function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
if (from_resize) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia)
--texture and text
local bar_number = ""
if (instancia.row_info.textL_show_number) then
bar_number = esta_barra.colocacao .. ". "
end
if (self.enemy) then
if (self.arena_enemy) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
if (_detalhes.faction_against == "Horde") then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
if (self.arena_ally) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. self.displayName) --seta o texto da esqueda
end
end
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
--> icon
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
--> texture color
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
@@ -1644,7 +1586,7 @@ function atributo_heal:MontaInfoHealingDone()
local target_actor = instancia.showing (2, tabela[1])
if (target_actor) then
target_actor:SetClassIcon (barra.icone, instancia)
target_actor:SetClassIcon (barra.icone, instancia, target_actor.classe)
else
barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE
local texCoords = _detalhes.class_coords ["ENEMY"]
+4 -1
View File
@@ -538,6 +538,8 @@ end
function _detalhes:AtivarInstancia (temp)
self.ativa = true
self.cached_bar_width = self.cached_bar_width or 0
local lower = _detalhes:GetLowerInstanceNumber()
if (lower == self.meu_id) then
@@ -1280,6 +1282,7 @@ end
new_instance.largura_scroll = 26
new_instance.bar_mod = 0
new_instance.bgdisplay_loc = 0
new_instance.cached_bar_width = 0
--> displaying row info
new_instance.rows_created = 0
@@ -1417,7 +1420,7 @@ function _detalhes:RestauraJanela (index, temp, load_only)
self.bar_mod = 0
self.bgdisplay_loc = 0
self.last_modo = self.last_modo or modo_grupo
self.cached_bar_width = self.cached_bar_width or 0
self.row_height = self.row_info.height + self.row_info.space.between
--> create frames
+2
View File
@@ -128,6 +128,8 @@ _detalhes.instance_defaults = {
bars_grow_direction = 1,
--sort direction is the direction of results on bars (1 = top to bottom 2 = bottom to top)
bars_sort_direction = 1,
--left to right or right to left bars
bars_inverted = false,
--menus:
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position
+10 -81
View File
@@ -518,19 +518,8 @@ function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instanc
gump:Fade (esta_barra, "out")
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (_unpack (_detalhes.class_colors [morte[4]]))
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (_unpack (_detalhes.class_colors [morte[4]]))
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (_unpack (_detalhes.class_colors [morte[4]]))
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (_unpack (_detalhes.class_colors [morte[4]]))
end
local r, g, b, a = _unpack (_detalhes.class_colors [morte[4]])
_detalhes:SetBarColors (esta_barra, instancia, r, b, g, a)
if (instancia.row_info.use_spec_icons) then
local nome = morte[3]
@@ -924,80 +913,20 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
end
function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize)
local class, enemy, arena_enemy, arena_ally = self.classe, self.enemy, self.arena_enemy, self.arena_ally
if (from_resize) then
actor_class_color_r, actor_class_color_g, actor_class_color_b = self:GetBarColor()
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.texture_background_class_color) then
esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
--icon
self:SetClassIcon (esta_barra.icone_classe, instancia)
--texture and text
local bar_number = ""
if (instancia.row_info.textL_show_number) then
bar_number = esta_barra.colocacao .. ". "
end
if (self.enemy) then
if (self.arena_enemy) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
else
if (_detalhes.faction_against == "Horde") then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY
end
end
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1)
end
end
else
if (self.arena_ally) then
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:256:" .. _detalhes.role_texcoord [self.role or "NONE"] .. "|t" .. self.displayName)
end
else
if (UsingCustomLeftText) then
esta_barra.texto_esquerdo:SetText (_string_replace (instancia.row_info.textL_custom_text, esta_barra.colocacao, self.displayName, "", self, instancia.showing))
else
esta_barra.texto_esquerdo:SetText (bar_number .. self.displayName) --seta o texto da esqueda
end
end
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
--> icon
self:SetClassIcon (esta_barra.icone_classe, instancia, class)
--> texture color
self:SetBarColors (esta_barra, instancia, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> left text
self:SetBarLeftText (esta_barra, instancia, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
end
--------------------------------------------- // TOOLTIPS // ---------------------------------------------
+8 -7
View File
@@ -72,8 +72,8 @@
local row_proxima = self.barras [i-1]
if (row_proxima and not row.animacao_ignorar) then
local v = row.statusbar:GetValue()
local v_proxima = row_proxima.statusbar:GetValue()
local v = row.statusbar.value
local v_proxima = row_proxima.statusbar.value
if (v_proxima > v) then
if (row.animacao_fim >= v_proxima) then
@@ -107,8 +107,8 @@
local row_proxima = self.barras [i+1]
if (row_proxima and not row.animacao_ignorar) then
local v = row.statusbar:GetValue()
local v_proxima = row_proxima.statusbar:GetValue()
local v = row.statusbar.value
local v_proxima = row_proxima.statusbar.value
if (v_proxima > v) then
if (row.animacao_fim >= v_proxima) then
@@ -141,7 +141,7 @@
end
function _detalhes:AnimarBarra (esta_barra, fim)
esta_barra.inicio = esta_barra.statusbar:GetValue()
esta_barra.inicio = esta_barra.statusbar.value
esta_barra.fim = fim
esta_barra.tem_animacao = true
@@ -646,6 +646,9 @@
self.rows_created = #self.barras
end
--> faz um cache do tamanho das barras
self.cached_bar_width = self.barras[1] and self.barras[1]:GetWidth() or 0
--> seta a largura das barras
if (self.bar_mod and self.bar_mod ~= 0) then
for index = 1, self.rows_fit_in_window do
@@ -656,8 +659,6 @@
self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.row_info.space.right)
end
end
--> verifica se precisa esconder ou mostrar alguma barra
local A = self.barraS[1]
+202 -28
View File
@@ -22,7 +22,118 @@
--[[global]] DETAILS_WA_TRIGGER_DBM_TIMER = 9
--[[global]] DETAILS_WA_TRIGGER_BW_TIMER = 10
--[[global]] DETAILS_WA_TRIGGER_INTERRUPT = 11
--weak auras
local text_interrupt_prototype = {
["outline"] = true,
["fontSize"] = 12,
["color"] = {1, 1, 1, 1},
["displayText"] = "%c\n",
["customText"] = "function()\n return aura_env.text\nend \n\n",
["yOffset"] = 174.820495605469,
["anchorPoint"] = "CENTER",
["customTextUpdate"] = "event",
["actions"] = {
["start"] = {
["do_custom"] = false,
["custom"] = "",
},
["finish"] = {
},
["init"] = {
["do_custom"] = true,
["custom"] = "aura_env.text = \"\"\naura_env.success = 0\naura_env.interrupted = 0",
},
},
["untrigger"] = {
["custom"] = "function()\n return not InCombatLockdown()\nend\n",
},
["trigger"] = {
["spellId"] = "",
["message_operator"] = "==",
["subeventPrefix"] = "SPELL",
["unit"] = "player",
["debuffType"] = "HELPFUL",
["names"] = {
},
["use_addon"] = false,
["use_unit"] = true,
["subeventSuffix"] = "_CAST_SUCCESS",
["spellName"] = "",
["type"] = "custom",
["event"] = "Health",
["spellIds"] = {
},
["use_spellName"] = false,
["use_spellId"] = false,
["custom"] = "function (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)\n \n if (evento == \"COMBAT_LOG_EVENT_UNFILTERED\") then\n \n if (token == \"SPELL_CAST_SUCCESS\" and spellid == 165416) then\n aura_env.success = aura_env.success + 1\n aura_env.text = aura_env.text .. \"SUCCESS! (\" .. aura_env.success .. \")\\n\"\n \n return true\n \n elseif (token == \"SPELL_INTERRUPT\" and extraSpellID == 165416) then\n aura_env.interrupted = aura_env.interrupted + 1\n aura_env.text = aura_env.text .. who_name .. \" (\" .. aura_env.interrupted .. \") \".. \"\\n\"\n return true\n end\n else\n aura_env.text = \"\"\n aura_env.success = 0\n aura_env.interrupted = 0\n return true \n end\n \nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
["events"] = "COMBAT_LOG_EVENT_UNFILTERED, ENCOUNTER_START",
["use_message"] = true,
["unevent"] = "timed",
["custom_type"] = "event",
["custom_hide"] = "custom",
},
["justify"] = "LEFT",
["selfPoint"] = "BOTTOM",
["additional_triggers"] = {
},
["xOffset"] = -403.999786376953,
["frameStrata"] = 1,
["width"] = 1.46286010742188,
["animation"] = {
["start"] = {
["duration_type"] = "seconds",
["type"] = "none",
},
["main"] = {
["duration_type"] = "seconds",
["type"] = "none",
},
["finish"] = {
["duration_type"] = "seconds",
["type"] = "none",
},
},
["font"] = "Friz Quadrata TT",
["numTriggers"] = 1,
["height"] = 23.6792984008789,
["regionType"] = "text",
["load"] = {
["talent"] = {
["multi"] = {
},
},
["class"] = {
["multi"] = {
},
},
["use_encounterid"] = true,
["difficulty"] = {
["multi"] = {
},
},
["role"] = {
["multi"] = {
},
},
["spec"] = {
["multi"] = {
},
},
["race"] = {
["multi"] = {
},
},
["size"] = {
["multi"] = {
},
},
},
["disjunctive"] = true,
}
local group_prototype_boss_mods = {
["grow"] = "DOWN",
["controlledChildren"] = {},
@@ -436,7 +547,7 @@
["fontSize"] = 72,
["color"] = {1, 1, 1, 1},
["displayText"] = "%c",
["customText"] = "function()\n local at = aura_env.untrigger_at\n if (at) then\n return \"\" .. aura_env.ability_text .. \"\\n\" .. format (\"%.1f\", at - GetTime())\n else\n return \"\"\n end \n \nend",
["customText"] = "function()\n local at = aura_env.untrigger_at\n if (at) then\n return \"\" .. aura_env.ability_text .. \"\\n==> \" .. format (\"%.1f\", at - GetTime()) .. \" <==\"\n else\n return \"\"\n end \n \nend",
["untrigger"] = {
["custom"] = "function()\n return true\nend",
},
@@ -966,7 +1077,45 @@
local new_aura
icon_size = icon_size or 40
if (other_values.dbm_timer_id or other_values.bw_timer_id) then
if (target == 41) then -- interrupt
chat = nil
sound = nil
icon_glow = nil
group = nil
new_aura = _detalhes.table.copy ({}, text_interrupt_prototype)
new_aura.trigger.custom = [[
function (event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, extraSpellID, extraSpellName, extraSchool)
if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
if (token == "SPELL_CAST_SUCCESS" and spellid == @spellid) then
aura_env.success = aura_env.success + 1
aura_env.text = aura_env.text .. "|cffffc5c5@spell_casted (" .. aura_env.success .. ")|r\n"
elseif (token == "SPELL_INTERRUPT" and extraSpellID == @spellid) then
aura_env.interrupted = aura_env.interrupted + 1
aura_env.text = aura_env.text .. "|cffc5ffc5" .. who_name .. " (" .. aura_env.interrupted .. ") ".. "|r\n"
end
if (select (2, aura_env.text:gsub ("\n", "")) == 9) then
aura_env.text = aura_env.text:gsub (".-\n", "", 1)
end
return true
else
aura_env.text = ""
aura_env.success = 0
aura_env.interrupted = 0
return true
end
end
]]
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spellid", spellid)
new_aura.trigger.custom = new_aura.trigger.custom:gsub ("@spell_casted", icon_text)
--> size
new_aura.fontSize = max (icon_size, 24)
elseif (other_values.dbm_timer_id or other_values.bw_timer_id) then
if (aura_type == "icon") then
new_aura = _detalhes.table.copy ({}, icon_dbm_timerbar_prototype)
elseif (aura_type == "aurabar") then
@@ -976,7 +1125,8 @@
end
new_aura.actions.init.custom = [[
aura_env.dbm_timer_id = "@dbm_timer_id"
aura_env.dbm_timer_id = @dbm_timer_id
aura_env.dbm_timer_id_str = "@dbm_timer_id"
aura_env.bw_timer_id = "@bw_timer_id"
aura_env.countdown_at = @countdown
@@ -999,10 +1149,11 @@
if (BigWigs) then
local old_aura_env = details_aura_env [aura_env.aura_global_name]
if (old_aura_env) then
if (old_aura_env and old_aura_env.UnregisterMessage) then
old_aura_env:UnregisterMessage ("BigWigs_StartBar")
end
elseif (_G.DBM) then
end
if (_G.DBM) then
local previous_func = details_aura_func_cache [aura_env.aura_global_name]
if (previous_func and DBM:IsCallbackRegistered ("DBM_TimerStart", previous_func)) then
DBM:UnregisterCallback ("DBM_TimerStart", previous_func)
@@ -1012,11 +1163,10 @@
details_aura_env [aura_env.aura_global_name] = aura_env
if (_G.DBM) then
aura_env.Calllback_func = function (event, timer_id, message, duration)
aura_env.Calllback_func = function (bar_type, id, msg, timer, icon, _, spellId, colorId, modid)
local aura_env = DetailsAuraEnv ["@gname"]
if (timer_id:find (aura_env.dbm_timer_id)) then
duration = duration:gsub (DBM_CORE_SEC, "")
duration = tonumber (duration)
if ((type (id) == "string" and id:find (aura_env.dbm_timer_id)) or spellId == aura_env.dbm_timer_id or spellId == aura_env.dbm_timer_id_str) then
local duration = timer
aura_env.trigger_at = GetTime() + duration - aura_env.countdown_at
aura_env.untrigger_at = GetTime() + duration
end
@@ -1028,7 +1178,7 @@
function aura_env:BigWigs_StartBar (event, module, spellid, bar_text, time, icon, ...)
local aura_env = DetailsAuraEnv ["@gname"]
if (tostring (spellid) == aura_env.bw_timer_id) then
duration = time
local duration = time
aura_env.trigger_at = GetTime() + duration - aura_env.countdown_at
aura_env.untrigger_at = GetTime() + duration
end
@@ -1040,10 +1190,12 @@
local c = new_aura.actions.init.custom
if (other_values.dbm_timer_id) then
local dbm_tid = tostring (other_values.dbm_timer_id):match ("%d+", 1)
c = c:gsub ("@dbm_timer_id", dbm_tid)
c = c:gsub ("@bw_timer_id", "Timer ID Not Set")
local dbm_tid = other_values.dbm_timer_id
c = c:gsub ("@dbm_timer_id_str", dbm_tid)
c = c:gsub ("@gname", "DetailsAura_" .. dbm_tid)
dbm_tid = dbm_tid:gsub ("ej", "")
c = c:gsub ("@dbm_timer_id", tonumber (dbm_tid))
c = c:gsub ("@bw_timer_id", "Timer ID Not Set")
elseif (other_values.bw_timer_id) then
local bw_tid = other_values.bw_timer_id
@@ -1405,6 +1557,8 @@
{label = "DBM Time Bar", value = 31, icon = aura_on_icon, onclick = on_select_aura_trigger},
{label = "BigWigs Time Bar", value = 32, icon = aura_on_icon, onclick = on_select_aura_trigger},
{label = "Spell Interrupt", value = 41, icon = aura_on_icon, onclick = on_select_aura_trigger},
}
local aura_on_options = function()
return aura_on_table
@@ -1463,7 +1617,7 @@
["Water Drop"] = [[Sound\DOODAD\Hellfire_DW_Pipe_Type4_01.ogg]],
["Frog"] = [[Sound\EMITTERS\Emitter_Dalaran_Petstore_Frog_01.ogg]],
}
local sound_options = function()
local t = {{label = "No Sound", value = "", icon = [[Interface\Buttons\UI-GuildButton-MOTD-Disabled]], iconsize = iconsize}}
@@ -1552,7 +1706,7 @@
encounterid.tooltip = "Only load this aura for this raid encounter."
--size
local icon_size_slider = fw:NewSlider (f, f, "$parentIconSizeSlider", "IconSizeSlider", 150, 20, 16, 256, 1, 64)
local icon_size_slider = fw:NewSlider (f, f, "$parentIconSizeSlider", "IconSizeSlider", 150, 20, 8, 256, 1, 64)
local icon_size_label = fw:CreateLabel (f, "Size: ", nil, nil, "GameFontNormal")
icon_size_slider:SetPoint ("left", icon_size_label, "right", 2, 0)
icon_size_slider.tooltip = "Icon size, width and height."
@@ -1680,6 +1834,18 @@
f.StackSlider:SetValue (0)
f.SpellName:Enable()
f.UseSpellId:Enable()
f.AuraSpellId:Enable()
f.AuraName:Enable()
f.IconSizeSlider:Enable()
f.AuraTypeDropdown:Enable()
f.SoundEffectDropdown:Enable()
f.SaySomething:Enable()
f.IconButton:Enable()
f.AuraOnDropdown:Enable()
f.AuraText:Enable()
f.AuraText:SetText ("")
aura_text_label.text = "Aura Text: "
f.UseGlow:Enable()
if (aura_type == "icon") then
aura_text_label:SetText ("Icon Text: ")
@@ -1708,8 +1874,28 @@
f.StackSlider.tooltip = "Will trigger when the bar remaining time reach this value."
f.SpellName:Disable()
f.UseSpellId:Disable()
elseif (trigger == 41) then --interrupt
f.StackSlider:Disable()
f.SpellName:Disable()
f.UseSpellId:Disable()
DetailsAuraPanel.AuraTypeDropdown:Select (2, true)
f.SoundEffectDropdown:Disable()
f.SaySomething:Disable()
f.IconButton:Disable()
f.UseGlow:Disable()
icon_size_label:SetText ("Text Size: ")
f.IconSizeSlider:SetValue (11)
f.AuraText:SetText ("=Not Interrupted!=")
aura_text_label.text = "Not Interrupted: "
end
if (DetailsAuraPanel.other_values and DetailsAuraPanel.other_values.text) then
DetailsAuraPanel.AuraText:SetText (DetailsAuraPanel.other_values.text)
end
end
end
DetailsAuraPanel.spellid = spellid
@@ -1727,7 +1913,7 @@
DetailsAuraPanel.IconSizeSlider:SetValue (64)
end
if (other_values.dbm_timer_id or other_values.bw_timer_id) then
if (DetailsAuraPanel.other_values.dbm_timer_id or DetailsAuraPanel.other_values.bw_timer_id) then
DetailsAuraPanel.WeakaurasFolderDropdown:Select ("Details! Boss Mods Group")
end
@@ -1846,10 +2032,6 @@
DBM:RegisterCallback ("DBM_Announce", dbm_callback_phase)
DBM:RegisterCallback ("pull", dbm_callback_pull)
--DBM:RegisterCallback ("DBM_TimerStart", function (a, b, c, d, e, f, g)
-- print ("details", a, b, c, d, e, f, g)
--end)
end
@@ -1861,12 +2043,9 @@
function _detalhes:BigWigs_Message (event, module, key, text, ...)
--print (event, module, key, text, ...)
if (key == "stages") then
local phase = text:gsub (".*%s", "")
phase = tonumber (phase)
--print ("Phase Changed!", phase)
if (phase and type (phase) == "number" and _detalhes.encounter_table.phase ~= phase) then
--_detalhes:Msg ("Current phase:", phase)
@@ -1888,11 +2067,6 @@
end
BigWigs.RegisterMessage (_detalhes, "BigWigs_Message")
--function _detalhes:BigWigs_StartBar (...)
-- print (...)
--end
--BigWigs.RegisterMessage (_detalhes, "BigWigs_StartBar")
end
end
+1
View File
@@ -1110,6 +1110,7 @@ local default_global_data = {
report_where = "SAY",
realm_sync = true,
spell_school_cache = {},
global_plugin_database = {},
--> switch tables
switchSaved = {slots = 4, table = {
{["atributo"] = 1, ["sub_atributo"] = 1}, --damage done
+25
View File
@@ -1025,6 +1025,31 @@ function SlashCmdList.DETAILS (msg, editbox)
1 --school =
)
elseif (msg == "ejloot") then
EJ_SelectInstance (669) -- hellfire citadel
EJ_SetDifficulty (16)
local r = {}
local total = 0
for i = 1, 100 do
local name, description, encounterID, rootSectionID, link = EJ_GetEncounterInfoByIndex (i, 669)
if (name) then
EJ_SelectEncounter (encounterID)
print (name, encounterID, EJ_GetNumLoot())
for o = 1, EJ_GetNumLoot() do
local name, icon, slot, armorType, itemID, link, encounterID = EJ_GetLootInfoByIndex (o)
r[slot] = r[slot] or {}
tinsert (r[slot], {itemID, encounterID})
total = total + 1
end
end
end
print ("total loot", total)
_detalhes_global.ALOOT = r
elseif (msg == "ilvl") then
local ilvl_frame = CreateFrame ("GameTooltip", "details_ilvl_tooltip", UIParent, "GameTooltipTemplate");
local get_ilvl = function (itemLink)
+81 -53
View File
@@ -5446,30 +5446,11 @@ function window:CreateFrame4()
end)
window:CreateLineBackground2 (frame4, "rowHeightSlider", "rowHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"])
--> bar grow direction
local grow_switch_func = function (slider, value)
if (value == 1) then
return true
elseif (value == 2) then
return false
end
end
local grow_return_func = function (slider, value)
if (value) then
return 1
else
return 2
end
end
local orientation_icon_size = {14, 14}
g:NewSwitch (frame4, _, "$parentBarGrowDirectionSlider", "barGrowDirectionSlider", 80, 20, Loc ["STRING_BOTTOM"], Loc ["STRING_TOP"], instance.bars_grow_direction, nil, grow_switch_func, grow_return_func, nil, options_switch_template)
g:NewLabel (frame4, _, "$parentBarGrowDirectionLabel", "barGrowDirectionLabel", Loc ["STRING_OPTIONS_BARGROW_DIRECTION"], "GameFontHighlightLeft")
frame4.barGrowDirectionSlider:SetPoint ("left", frame4.barGrowDirectionLabel, "right", 2)
frame4.barGrowDirectionSlider:SetAsCheckBox()
frame4.barGrowDirectionSlider.OnSwitch = function (self, instance, value)
--> grow direction
local set_bar_grow_direction = function (_, instance, value)
instance:SetBarGrowDirection (value)
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
if (this_instance ~= instance) then
@@ -5477,20 +5458,54 @@ function window:CreateFrame4()
end
end
end
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
frame4.barGrowDirectionSlider.thumb:SetSize (50, 12)
window:CreateLineBackground2 (frame4, "barGrowDirectionSlider", "barGrowDirectionLabel", Loc ["STRING_OPTIONS_BARGROW_DIRECTION_DESC"])
-- bar sort direction
g:NewSwitch (frame4, _, "$parentBarSortDirectionSlider", "barSortDirectionSlider", 80, 20, Loc ["STRING_BOTTOM"], Loc ["STRING_TOP"], instance.bars_sort_direction, nil, grow_switch_func, grow_return_func, nil, options_switch_template)
g:NewLabel (frame4, _, "$parentBarSortDirectionLabel", "barSortDirectionLabel", Loc ["STRING_OPTIONS_BARSORT_DIRECTION"], "GameFontHighlightLeft")
frame4.barSortDirectionSlider:SetPoint ("left", frame4.barSortDirectionLabel, "right", 2)
frame4.barSortDirectionSlider:SetAsCheckBox()
frame4.barSortDirectionSlider.OnSwitch = function (self, instance, value)
local grow_icon_size = {14, 14}
local grow_options = {
{value = 1, label = Loc ["STRING_TOP_TO_BOTTOM"], iconsize = orientation_icon_size, onclick = set_bar_grow_direction, icon = [[Interface\Calendar\MoreArrow]], texcoord = {0, 1, 0, 0.7}},
{value = 2, label = Loc ["STRING_BOTTOM_TO_TOP"], iconsize = orientation_icon_size, onclick = set_bar_grow_direction, icon = [[Interface\Calendar\MoreArrow]], texcoord = {0, 1, 0.7, 0}}
}
local grow_menu = function()
return grow_options
end
g:NewLabel (frame4, _, "$parentGrowLabel", "GrowLabel", Loc ["STRING_OPTIONS_BAR_GROW"], "GameFontHighlightLeft")
g:NewDropDown (frame4, _, "$parentGrowDropdown", "GrowDropdown", DROPDOWN_WIDTH, dropdown_height, grow_menu, nil, options_dropdown_template)
frame4.GrowDropdown:SetPoint ("left", frame4.GrowLabel, "right", 2)
window:CreateLineBackground2 (frame4, "GrowDropdown", "GrowLabel", Loc ["STRING_OPTIONS_BAR_GROW_DESC"])
--> orientation
--texture
local set_bar_orientation = function (_, instance, value)
instance:SetBarOrientationDirection (value)
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
if (this_instance ~= instance) then
this_instance:SetBarOrientationDirection (value)
end
end
end
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
local orientation_options = {
{value = false, label = Loc ["STRING_LEFT_TO_RIGHT"], iconsize = orientation_icon_size, onclick = set_bar_orientation, icon = [[Interface\CHATFRAME\ChatFrameExpandArrow]]},
{value = true, label = Loc ["STRING_RIGHT_TO_LEFT"], iconsize = orientation_icon_size, onclick = set_bar_orientation, icon = [[Interface\CHATFRAME\ChatFrameExpandArrow]], texcoord = {1, 0, 0, 1}}
}
local orientation_menu = function()
return orientation_options
end
g:NewLabel (frame4, _, "$parentOrientationLabel", "OrientationLabel", Loc ["STRING_OPTIONS_BARORIENTATION"], "GameFontHighlightLeft")
g:NewDropDown (frame4, _, "$parentOrientationDropdown", "OrientationDropdown", DROPDOWN_WIDTH, dropdown_height, orientation_menu, nil, options_dropdown_template)
frame4.OrientationDropdown:SetPoint ("left", frame4.OrientationLabel, "right", 2)
window:CreateLineBackground2 (frame4, "OrientationDropdown", "OrientationLabel", Loc ["STRING_OPTIONS_BARORIENTATION_DESC"])
--> sort direction
local set_bar_sorting = function (_, instance, value)
instance.bars_sort_direction = value
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
@@ -5502,11 +5517,23 @@ function window:CreateFrame4()
end
_detalhes:AtualizaGumpPrincipal (-1, true)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
frame4.barSortDirectionSlider.thumb:SetSize (50, 12)
window:CreateLineBackground2 (frame4, "barSortDirectionSlider", "barSortDirectionLabel", Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"])
local sorting_options = {
{value = 1, label = Loc ["STRING_DESCENDING"], iconsize ={14, 14}, onclick = set_bar_sorting, icon = [[Interface\Calendar\MoreArrow]], texcoord = {0, 1, 0, 0.7}},
{value = 2, label = Loc ["STRING_ASCENDING"], iconsize = {14, 14}, onclick = set_bar_sorting, icon = [[Interface\Calendar\MoreArrow]], texcoord = {0, 1, 0.7, 0}}
}
local sorting_menu = function()
return sorting_options
end
g:NewLabel (frame4, _, "$parentSortLabel", "SortLabel", Loc ["STRING_OPTIONS_BARSORT"], "GameFontHighlightLeft")
g:NewDropDown (frame4, _, "$parentSortDropdown", "SortDropdown", DROPDOWN_WIDTH, dropdown_height, sorting_menu, nil, options_dropdown_template)
frame4.SortDropdown:SetPoint ("left", frame4.SortLabel, "right", 2)
window:CreateLineBackground2 (frame4, "SortDropdown", "SortLabel", Loc ["STRING_OPTIONS_BARSORT_DESC"])
-- spacement
g:NewLabel (frame4, _, "$parentBarSpacementLabel", "BarSpacementLabel", Loc ["STRING_OPTIONS_BAR_SPACING"], "GameFontHighlightLeft")
local s = g:NewSlider (frame4, _, "$parentBarSpacementSizeSlider", "BarSpacementSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 10, 1, instance.row_info.space.between, nil, nil, nil, options_slider_template)
@@ -5996,23 +6023,22 @@ function window:CreateFrame4()
{frame4.iconFileLabel, 10},
{frame4.iconFileLabel2, 11},
{frame4.barStartLabel, 12},
}
local right_side = {
--basic
{frame4.RowGeneralAnchorLabel, 1, true},
{frame4.barGrowDirectionLabel, 2},
{frame4.barSortDirectionLabel, 3},
{frame4.rowHeightLabel, 4, true},
{frame4.BarSpacementLabel, 5},
{"GrowLabel", 2},
{"OrientationLabel", 3},
{"SortLabel", 4},
{frame4.rowHeightLabel, 5, true},
{frame4.BarSpacementLabel, 6},
--backdrop
{frame4.BackdropAnchorLabel, 6, true},
{frame4.BackdropColorLabel, 7},
{frame4.BackdropEnabledLabel, 8},
{frame4.BackdropSizeLabel, 9},
{frame4.BackdropBorderTextureLabel, 10},
{frame4.BackdropAnchorLabel, 7, true},
{frame4.BackdropColorLabel, 8},
{frame4.BackdropEnabledLabel, 9},
{frame4.BackdropSizeLabel, 10},
{frame4.BackdropBorderTextureLabel, 11},
}
window:arrange_menu (frame4, left_side, x, -90)
@@ -10262,6 +10288,14 @@ end --> if not window
end
--> window 4
_G.DetailsOptionsWindow4OrientationDropdown.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4OrientationDropdown.MyObject:Select (editing_instance.bars_inverted and 2 or 1, true)
_G.DetailsOptionsWindow4SortDropdown.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4SortDropdown.MyObject:Select (editing_instance.bars_sort_direction, true)
_G.DetailsOptionsWindow4GrowDropdown.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4GrowDropdown.MyObject:Select (editing_instance.bars_grow_direction, true)
_G.DetailsOptionsWindow4BarSpacementSizeSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4BarSpacementSizeSlider.MyObject:SetValue (editing_instance.row_info.space.between)
@@ -10688,12 +10722,6 @@ end --> if not window
_G.DetailsOptionsWindow6InstanceToolbarSideSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow6InstanceToolbarSideSlider.MyObject:SetValue (editing_instance.toolbar_side)
_G.DetailsOptionsWindow4BarSortDirectionSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4BarSortDirectionSlider.MyObject:SetValue (editing_instance.bars_sort_direction)
_G.DetailsOptionsWindow4BarGrowDirectionSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4BarGrowDirectionSlider.MyObject:SetValue (editing_instance.bars_grow_direction)
----------------------------------------------------------------
--instanceOverlayColorLabel
--closeOverlayColorLabel
+164 -33
View File
@@ -15,6 +15,7 @@ local segmentos = _detalhes.segmentos
local _cstr = tostring
local _math_ceil = math.ceil
local _math_floor = math.floor
local _math_max = math.max
local _ipairs = ipairs
local _pairs = pairs
local _string_lower = string.lower
@@ -1852,7 +1853,11 @@ local barra_scripts_onenter = function (self)
self:SetBackdropColor (0.588, 0.588, 0.588, 0.7)
if (not _detalhes.instances_disable_bar_highlight) then
self.textura:SetBlendMode ("ADD")
if (self._instance.bars_inverted) then
self.right_to_left_texture:SetBlendMode ("ADD")
else
self.textura:SetBlendMode ("ADD")
end
end
local lefttext = self.texto_esquerdo
@@ -1892,7 +1897,11 @@ local barra_scripts_onleave = function (self)
self:SetBackdropBorderColor (0, 0, 0, 0)
self:SetBackdropColor (0, 0, 0, 0)
self.textura:SetBlendMode ("BLEND")
if (self._instance.bars_inverted) then
self.right_to_left_texture:SetBlendMode ("BLEND")
else
self.textura:SetBlendMode ("BLEND")
end
self.showing_allspells = false
self:SetScript ("OnUpdate", nil)
@@ -1924,12 +1933,7 @@ local barra_scripts_onmousedown = function (self, button)
end
self.texto_direita:SetPoint ("right", self.statusbar, "right", 1, -1)
if (self._instance.row_info.no_icon) then
self.texto_esquerdo:SetPoint ("left", self.statusbar, "left", 3, -1)
else
self.texto_esquerdo:SetPoint ("left", self.icone_classe, "right", 4, -1)
end
self._instance:HandleTextsOnMouseClick (self, "down")
self.mouse_down = _GetTime()
self.button = button
@@ -1957,12 +1961,7 @@ local barra_scripts_onmouseup = function (self, button)
end
end
self.texto_direita:SetPoint ("right", self.statusbar, "right")
if (self._instance.row_info.no_icon) then
self.texto_esquerdo:SetPoint ("left", self.statusbar, "left", 2, 0)
else
self.texto_esquerdo:SetPoint ("left", self.icone_classe, "right", 3, 0)
end
self._instance:HandleTextsOnMouseClick (self, "up")
local x, y = _GetCursorPosition()
x = _math_floor (x)
@@ -2014,8 +2013,65 @@ local barra_scripts_onshow = function (self)
end
end
function _detalhes:HandleTextsOnMouseClick (row, type)
if (self.bars_inverted) then
if (type == "down") then
row.texto_direita:SetPoint ("left", row.statusbar, "left", 2, -1)
if (self.row_info.no_icon) then
row.texto_esquerdo:SetPoint ("right", row.statusbar, "right", -1, -1)
else
row.texto_esquerdo:SetPoint ("right", row.icone_classe, "left", -1, -1)
end
elseif (type == "up") then
row.texto_direita:SetPoint ("left", row.statusbar, "left", 1, 0)
if (self.row_info.no_icon) then
row.texto_esquerdo:SetPoint ("right", row.statusbar, "right", -2, 0)
else
row.texto_esquerdo:SetPoint ("right", row.icone_classe, "left", -2, 0)
end
end
else
if (type == "down") then
row.texto_direita:SetPoint ("right", row.statusbar, "right", 1, -1)
if (self.row_info.no_icon) then
row.texto_esquerdo:SetPoint ("left", row.statusbar, "left", 3, -1)
else
row.texto_esquerdo:SetPoint ("left", row.icone_classe, "right", 4, -1)
end
elseif (type == "up") then
row.texto_direita:SetPoint ("right", row.statusbar, "right")
if (self.row_info.no_icon) then
row.texto_esquerdo:SetPoint ("left", row.statusbar, "left", 2, 0)
else
row.texto_esquerdo:SetPoint ("left", row.icone_classe, "right", 3, 0)
end
end
end
end
local set_bar_value = function (self, value)
self.statusbar:SetValue (value)
if (self._instance.bars_inverted) then
self.statusbar:SetValue (0)
local width = self._instance.cached_bar_width
local inverse_bar_size = width / 100 * value
local coord_inverse = inverse_bar_size / width
inverse_bar_size = _math_max (inverse_bar_size, 0.00000001)
self.right_to_left_texture:SetWidth (inverse_bar_size)
self.right_to_left_texture:SetTexCoord (coord_inverse, 0, 0, 1)
else
self.statusbar:SetValue (value)
end
self.statusbar.value = value
if (self.using_upper_3dmodels) then
local width = self:GetWidth()
@@ -3633,14 +3689,25 @@ function _detalhes:SetBarFollowPlayer (follow)
self:ReajustaGump()
end
function _detalhes:SetBarGrowDirection (direction)
function _detalhes:SetBarOrientationDirection (orientation)
if (orientation == nil) then
orientation = self.bars_inverted
end
self.bars_inverted = orientation
self:InstanceRefreshRows()
self:RefreshBars()
self:InstanceReset()
self:ReajustaGump()
end
function _detalhes:SetBarGrowDirection (direction)
if (not direction) then
direction = self.bars_grow_direction
end
self.bars_grow_direction = direction
local x = self.row_info.space.left
if (direction == 1) then --> top to bottom
@@ -3716,6 +3783,14 @@ function gump:CriaNovaBarra (instancia, index)
--> statusbar
new_row.statusbar = CreateFrame ("StatusBar", "DetailsBarra_Statusbar_"..instancia.meu_id.."_"..index, new_row)
--> right to left texture
new_row.statusbar.right_to_left_texture = new_row.statusbar:CreateTexture (nil, "overlay")
new_row.statusbar.right_to_left_texture:SetPoint ("topright", new_row.statusbar, "topright")
new_row.statusbar.right_to_left_texture:SetPoint ("bottomright", new_row.statusbar, "bottomright")
new_row.statusbar.right_to_left_texture:SetWidth (0.000000001)
new_row.statusbar.right_to_left_texture:Hide()
new_row.right_to_left_texture = new_row.statusbar.right_to_left_texture
--> frame for hold the backdrop border
new_row.border = CreateFrame ("Frame", "DetailsBarra_Border_" .. instancia.meu_id .. "_" .. index, new_row.statusbar)
new_row.border:SetFrameLevel (new_row.statusbar:GetFrameLevel()+2)
@@ -3778,7 +3853,7 @@ function gump:CriaNovaBarra (instancia, index)
new_row.texto_direita = new_row.border:CreateFontString (nil, "overlay", "GameFontHighlight")
new_row.texto_direita:SetPoint ("right", new_row.statusbar, "right")
new_row.texto_direita:SetJustifyH ("right")
--> set the onclick, on enter scripts
barra_scripts (new_row, instancia, index)
@@ -4200,6 +4275,9 @@ function _detalhes:InstanceRefreshRows (instancia)
return
end
--> mirror
local is_mirror = self.bars_inverted
--> texture
local texture_file = SharedMedia:Fetch ("statusbar", self.row_info.texture)
local texture_file2 = SharedMedia:Fetch ("statusbar", self.row_info.texture_background)
@@ -4273,22 +4351,68 @@ function _detalhes:InstanceRefreshRows (instancia)
row.icone_classe:SetHeight (height)
row.icone_classe:SetWidth (height)
--> icon
if (no_icon) then
row.statusbar:SetPoint ("topleft", row, "topleft")
row.statusbar:SetPoint ("bottomright", row, "bottomright")
row.texto_esquerdo:SetPoint ("left", row.statusbar, "left", 2, 0)
row.icone_classe:Hide()
else
if (start_after_icon) then
row.statusbar:SetPoint ("topleft", row.icone_classe, "topright")
else
row.statusbar:SetPoint ("topleft", row, "topleft")
end
--> icon and texture anchors
if (not is_mirror) then
row.texto_esquerdo:ClearAllPoints()
row.texto_direita:ClearAllPoints()
row.texto_direita:SetJustifyH ("right")
row.texto_esquerdo:SetJustifyH ("left")
row.statusbar:SetPoint ("bottomright", row, "bottomright")
row.texto_esquerdo:SetPoint ("left", row.icone_classe, "right", 3, 0)
row.icone_classe:Show()
row.texto_direita:SetPoint ("right", row.statusbar, "right")
if (no_icon) then
row.statusbar:SetPoint ("topleft", row, "topleft")
row.statusbar:SetPoint ("bottomright", row, "bottomright")
row.texto_esquerdo:SetPoint ("left", row.statusbar, "left", 2, 0)
row.icone_classe:Hide()
else
row.icone_classe:ClearAllPoints()
row.icone_classe:SetPoint ("left", row, "left")
row.icone_classe:Show()
if (start_after_icon) then
row.statusbar:SetPoint ("topleft", row.icone_classe, "topright")
else
row.statusbar:SetPoint ("topleft", row, "topleft")
end
row.statusbar:SetPoint ("bottomright", row, "bottomright")
row.texto_esquerdo:SetPoint ("left", row.icone_classe, "right", 3, 0)
end
else
row.texto_esquerdo:ClearAllPoints()
row.texto_direita:ClearAllPoints()
row.texto_direita:SetJustifyH ("left")
row.texto_esquerdo:SetJustifyH ("right")
row.texto_direita:SetPoint ("left", row.statusbar, "left", 1, 0)
if (no_icon) then
row.statusbar:SetPoint ("topleft", row, "topleft")
row.statusbar:SetPoint ("bottomright", row, "bottomright")
row.texto_esquerdo:SetPoint ("right", row.statusbar, "right", -2, 0)
row.icone_classe:Hide()
row.right_to_left_texture:SetPoint ("topright", row.statusbar, "topright")
row.right_to_left_texture:SetPoint ("bottomright", row.statusbar, "bottomright")
else
row.icone_classe:ClearAllPoints()
row.icone_classe:SetPoint ("right", row, "right")
row.icone_classe:Show()
if (start_after_icon) then
row.statusbar:SetPoint ("bottomright", row.icone_classe, "bottomleft")
else
row.statusbar:SetPoint ("bottomright", row, "bottomright")
end
row.statusbar:SetPoint ("topleft", row, "topleft")
row.texto_esquerdo:SetPoint ("right", row.icone_classe, "left", -2, 0)
end
end
if (not self.row_info.texture_background_class_color) then
@@ -4315,8 +4439,15 @@ function _detalhes:InstanceRefreshRows (instancia)
--> texture:
row.textura:SetTexture (texture_file)
row.right_to_left_texture:SetTexture (texture_file)
row.background:SetTexture (texture_file2)
if (is_mirror) then
row.right_to_left_texture:Show()
else
row.right_to_left_texture:Hide()
end
--> texture class color: if true color changes on the fly through class refresh
if (not texture_class_color) then
row.textura:SetVertexColor (texture_r, texture_g, texture_b, alpha)