- Added four more abbreviation types.

- Abbreviations now are applied on all numbers in the bar.
- Minimum amount of instances was lowered to 3.
- Fixed issue where the instance menu wasn't respecting the amount limit of instances.
- Added options for cutomize the right text of a row.
- Added a option to be able to chance the framestrata of an window.
- Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.
- Fixed a issue where changing the alpha of a window makes it disappear on the next logon.
- Added a option for auto transparency to ignore rows.
- Added option to be able to set shadow on the attribute text.
- Fixed a issue with window snap where disabled statusbar makes a gap between the windows.
- Fixed issue where mini displayes wasn't saved and back to default values on every logon.
- Mini display 'instance segment' now have a option to show the encounter name instead the number of the segment.
- Added a new experimental library called hotcorners, this library create a menu hidden on the top left corner.
- New API: instance:GetId() return the id of the instance.
This commit is contained in:
tercio
2014-04-23 21:37:34 -03:00
parent 4384da2654
commit a56db81297
39 changed files with 1636 additions and 601 deletions
+1
View File
@@ -30,6 +30,7 @@ functions\slash.lua
functions\playerclass.lua
functions\timedata.lua
functions\report.lua
functions\rowanimation.lua
core\timemachine.lua
+122
View File
@@ -0,0 +1,122 @@
local major, minor = "LibHotCorners", 5
local LibHotCorners, oldminor = LibStub:NewLibrary (major, minor)
if (not LibHotCorners) then
return
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> main functions
LibHotCorners.embeds = LibHotCorners.embeds or {}
local embed_functions = {
"RegisterHotCornerButton"
}
function LibHotCorners:Embed (target)
for k, v in pairs (embed_functions) do
target[v] = self[v]
end
self.embeds [target] = true
return target
end
local CallbackHandler = LibStub:GetLibrary ("CallbackHandler-1.0")
LibHotCorners.callbacks = LibHotCorners.callbacks or CallbackHandler:New (LibHotCorners)
LibHotCorners.topleft = {widgets = {}}
LibHotCorners.bottomleft = {}
LibHotCorners.topright = {}
LibHotCorners.bottomright = {}
function LibHotCorners:RegisterHotCornerButton (corner, name, icon, tooltip, clickfunc, menus)
corner = string.lower (corner)
assert (corner == "topleft" or corner == "bottomleft" or corner == "topright" or corner == "bottomright", "LibHotCorners:RegisterAddon expects a corner on #1 argument.")
tinsert (LibHotCorners [corner], {name = name, icon = icon, tooltip = tooltip, click = clickfunc, menus = menus})
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> top left corner
local TopLeftCorner = CreateFrame ("frame", "LibHotCornersTopLeft", UIParent)
TopLeftCorner:SetSize (20, 20)
TopLeftCorner:SetFrameStrata ("fullscreen")
TopLeftCorner:SetPoint ("TopLeft", UIParent, "TopLeft", 0, 0)
local TopLeftCornerBackdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], tile = true, tileSize = 40}
--> on enter
local TopLeftCornerOnEnter = function (self)
self:SetSize (40, GetScreenHeight())
TopLeftCorner:SetBackdrop (TopLeftCornerBackdrop)
for index, button_table in ipairs (LibHotCorners.topleft) do
if (button_table.widget) then
button_table.widget:Show()
else
LibHotCorners:CreateAddonWidget (TopLeftCorner, button_table, index, "TopLeft")
end
end
end
--> on leave
local TopLeftCornerOnLeave = function (self)
self:SetSize (20, 20)
TopLeftCorner:SetBackdrop (nil)
for index, button_table in ipairs (LibHotCorners.topleft) do
button_table.widget:Hide()
end
end
TopLeftCorner:SetScript ("OnEnter", TopLeftCornerOnEnter)
TopLeftCorner:SetScript ("OnLeave", TopLeftCornerOnLeave)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> buttons
local ShowTooltip = function (self)
if (self.table.tooltip) then
GameTooltip:SetOwner (self, "ANCHOR_RIGHT")
GameTooltip:AddLine (self.table.tooltip)
GameTooltip:Show()
end
end
local WidgetOnEnter = function (self)
self.parent:GetScript("OnEnter")(self.parent)
ShowTooltip (self)
end
local WidgetOnLeave = function (self)
self:SetPoint ("topleft", self.parent, "topleft", 4, self.index*32*-1)
self.parent:GetScript("OnLeave")(self.parent)
GameTooltip:Hide()
end
local WidgetOnMouseDown = function (self)
self:SetPoint ("topleft", self.parent, "topleft", 5, self.index*33*-1)
end
local WidgetOnMouseUp = function (self)
self:SetPoint ("topleft", self.parent, "topleft", 4, self.index*32*-1)
self.table.click()
end
function LibHotCorners:CreateAddonWidget (frame, button_table, index, side)
local button = CreateFrame ("button", "LibHotCorners" .. side .. button_table.name, frame)
button.index = index
button.table = button_table
button.parent = frame
button_table.widget = button
button:SetNormalTexture (button_table.icon)
button:SetHighlightTexture (button_table.icon)
button:SetPoint ("topleft", frame, "topleft", 4, index*32*-1)
button:SetSize (32, 32)
button:SetFrameLevel (frame:GetFrameLevel()+1)
button:SetScript ("OnEnter", WidgetOnEnter)
button:SetScript ("OnLeave", WidgetOnLeave)
button:SetScript ("OnMouseDown", WidgetOnMouseDown)
button:SetScript ("OnMouseUp", WidgetOnMouseUp)
return button
end
+3
View File
@@ -0,0 +1,3 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
<Script file="LibHotCorners.lua"/>
</Ui>
+1
View File
@@ -9,6 +9,7 @@
<Include file="AceTimer-3.0\AceTimer-3.0.xml" />
<Include file="LibSharedMedia-3.0\lib.xml" />
<Include file="NickTag-1.0\NickTag-1.0.xml" />
<Include file="LibHotCorners\LibHotCorners.xml" />
<Script file="LibDataBroker-1.1\LibDataBroker-1.1.lua"/>
<Script file="LibDBIcon-1.0\LibDBIcon-1.0.lua"/>
+4 -4
View File
@@ -7,10 +7,10 @@
--> global name declaration
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
_detalhes.userversion = "v1.12.4"
_detalhes.version = "Alpha 016"
_detalhes.realversion = 16
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
_detalhes.userversion = "v1.13.0"
_detalhes.version = "Alpha 017"
_detalhes.realversion = 17
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
+179 -114
View File
@@ -21,11 +21,12 @@ local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
local _IsInRaid = IsInRaid
local _IsInGroup = IsInGroup
local _detalhes = _G._detalhes
local AceLocale = LibStub ("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
--constants
local gump = _detalhes.gump
local _
@@ -59,6 +60,11 @@ local div_abre = _detalhes.divisores.abre
local div_fecha = _detalhes.divisores.fecha
local div_lugar = _detalhes.divisores.colocacao
local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
local info = _detalhes.janela_info
@@ -907,6 +913,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
end
local combat_time = instancia.showing:GetCombatTime()
UsingCustomRightText = instancia.row_info.textR_enable_custom_text
local use_total_bar = false
if (instancia.total_bar.enabled) then
@@ -1124,38 +1131,68 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
esta_barra.texto_direita:SetText (_detalhes:ToK (self.custom) .." ".. div_abre .. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
esta_porcentagem = _math_floor ((self.custom/instancia.top) * 100) --> determina qual o tamanho da barra
else
if (sub_atributo == 1) then --> mostrando damage done
dps = _math_floor (dps)
if (_detalhes.ps_abbreviation == 2) then
dps = _detalhes:ToK (dps)
elseif (_detalhes.ps_abbreviation == 3) then
dps = _detalhes:ToK2 (dps)
end
esta_barra.texto_direita:SetText (_detalhes:ToK (damage_total) .." ".. div_abre .. dps .. ", ".. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 2) then --> mostrando dps
dps = _math_floor (dps)
if (_detalhes.ps_abbreviation == 2) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. _detalhes:ToK (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
elseif (_detalhes.ps_abbreviation == 3) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. _detalhes:ToK2 (damage_total) .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
local formated_damage = SelectedToKFunction (_, damage_total)
local formated_dps = SelectedToKFunction (_, dps)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage, formated_dps, _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (_detalhes:ToK2 (dps) .. " " .. div_abre .. damage_total .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
esta_barra.texto_direita:SetText (formated_damage .." ".. div_abre .. formated_dps .. ", ".. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
end
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 2) then --> mostrando dps
dps = _math_floor (dps)
local formated_damage = SelectedToKFunction (_, damage_total)
local formated_dps = SelectedToKFunction (_, dps)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_dps, formated_damage, _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_dps .. " " .. div_abre .. formated_damage .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
end
esta_porcentagem = _math_floor ((dps/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 3) then --> mostrando damage taken
esta_barra.texto_direita:SetText (_detalhes:ToK (self.damage_taken) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
local formated_damage_taken = SelectedToKFunction (_, self.damage_taken)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage_taken, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_damage_taken .." ".. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --
end
esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 4) then --> mostrando friendly fire
esta_barra.texto_direita:SetText (_detalhes:ToK (self.friendlyfire_total) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
local formated_friendly_fire = SelectedToKFunction (_, self.friendlyfire_total)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_friendly_fire, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_friendly_fire .. " " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --
end
esta_porcentagem = _math_floor ((self.friendlyfire_total/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 6) then --> mostrando friendly fire
esta_barra.texto_direita:SetText (_detalhes:ToK (damage_total) .." ".. div_abre .. _math_floor (dps) .. ", ".. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
elseif (sub_atributo == 6) then --> mostrando enemies
dps = _math_floor (dps)
local formated_damage = SelectedToKFunction (_, damage_total)
local formated_dps = SelectedToKFunction (_, dps)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_damage, formated_dps, _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_damage .. " " .. div_abre .. formated_dps .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
end
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) --> determina qual o tamanho da barra
end
end
@@ -1341,18 +1378,18 @@ end
---------> TOOLTIPS BIFURCAÇÃO
function atributo_damage:ToolTip (instancia, numero, barra)
function atributo_damage:ToolTip (instancia, numero, barra, keydown)
--> seria possivel aqui colocar o icone da classe dele?
if (instancia.atributo == 5) then --> custom
return self:TooltipForCustom (barra)
else
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 2 or instancia.sub_atributo == 6) then --> damage done or Dps or enemy
return self:ToolTip_DamageDone (instancia, numero, barra)
return self:ToolTip_DamageDone (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 3) then --> damage taken
return self:ToolTip_DamageTaken (instancia, numero, barra)
return self:ToolTip_DamageTaken (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 4) then --> friendly fire
return self:ToolTip_FriendlyFire (instancia, numero, barra)
return self:ToolTip_FriendlyFire (instancia, numero, barra, keydown)
end
end
end
@@ -1375,7 +1412,10 @@ local barAlha = .6
end
---------> DAMAGE DONE & DPS
function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local owner = self.owner
if (owner and owner.classe) then
@@ -1416,18 +1456,29 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {_target.nome, _target.total}
end
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
--> MOSTRA HABILIDADES
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\HELPFRAME\HotIssueIcon]], 1, 1, 14, 14, 0.0625, 0.90625, 0, 1)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
local tooltip_max_abilities = _detalhes.tooltip_max_abilities
if (instancia.sub_atributo == 2) then
tooltip_max_abilities = 6
end
if (keydown == "shift") then
tooltip_max_abilities = 99
end
--> MOSTRA HABILIDADES
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
if (tooltip_max_abilities == 99) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
--habilidades
if (#ActorSkillsSortTable > 0) then
for i = 1, _math_min (tooltip_max_abilities, #ActorSkillsSortTable) do
@@ -1448,10 +1499,22 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
--> MOSTRA INIMIGOS
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 6) then
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
local max_targets = _detalhes.tooltip_max_targets
if (keydown == "ctrl") then
max_targets = 99
end
for i = 1, _math_min (_detalhes.tooltip_max_targets, #ActorTargetsSortTable) do
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
if (max_targets == 99) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
for i = 1, _math_min (max_targets, #ActorTargetsSortTable) do
local este_inimigo = ActorTargetsSortTable [i]
GameCooltip:AddLine (este_inimigo[1]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
@@ -1516,85 +1579,44 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
local added_logo = false
_table_sort (totais, _detalhes.Sort2)
if (true) then
for index, _table in _ipairs (totais) do
for _, _table in _ipairs (totais) do
if (_table [2] > 0) then
if (not added_logo) then
added_logo = true
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
if (_table [2] > 0 and (index < 3 or keydown == "alt")) then
if (not added_logo) then
added_logo = true
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
if (keydown == "alt") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_alt]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_alt]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
local n = _table [1]:gsub (("%s%<.*"), "")
if (instancia.sub_atributo == 1) then
GameCooltip:AddLine (n, _detalhes:comma_value (_table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
else
GameCooltip:AddLine (n, _detalhes:comma_value ( _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
end
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
end
else
--> old pet display mode
for nome, meus_danos in _pairs (danos) do --> um pet de cada vez
local n = nome:gsub (("%s%<.*"), "")
--GameTooltip:AddDoubleLine ("Ajudante: ", "x"..quantidade[nome].." "..n.." (".._math_floor (totais [nome]/self.total*100).."%)", nil, nil, nil, 1, 1, 1)
--> pintar o nome do pet com a cor da classe do jogador
local cor = self.cor
GameCooltip:AddLine (Loc ["STRING_PET"]..":", n.." (".._math_floor (totais [nome]/self.total*100).."%)", 1, 1, 1, 1, _unpack (_detalhes.class_colors [self.classe])) --> removido a quantidade
--GameCooltip:AddLine (Loc ["STRING_SPELLS"])
--GameTooltip:AddDoubleLine (Loc ["STRING_PET"]..":", n.." (".._math_floor (totais [nome]/self.total*100).."%)", nil, nil, nil, _unpack (_detalhes.class_colors [self.classe])) --> removido a quantidade
--GameTooltip:AddLine (Loc ["STRING_SPELLS"])
for i = 1, 3 do
if (meus_danos[i]) then
--> meus_danos = { [1] = spellid [2] = total [3] = % [4] = { [1] = nome [2] = rank [3] = icone } }
GameCooltip:AddLine (meus_danos[i][4][1]..": ", _detalhes:comma_value (meus_danos[i][2]).." (".._cstr("%.1f", meus_danos[i][3]).."%)")
GameCooltip:AddIcon (meus_danos[i][4][3], nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .2)
--GameTooltip:AddDoubleLine (meus_danos[i][4][1]..": ", _detalhes:comma_value (meus_danos[i][2]).." (".._cstr("%.1f", meus_danos[i][3]).."%)", 1, 1, 1, 1, 1, 1)
--GameTooltip:AddTexture (meus_danos[i][4][3])
end
end
GameTooltip:AddLine (Loc ["STRING_TARGETS"])
for i = 1, 3 do
local meus_inimigos = alvos [nome]
if (meus_inimigos[i]) then
GameTooltip:AddLine (meus_inimigos[i][1]..": ", _detalhes:comma_value (meus_inimigos[i][2]).." (".._cstr("%.1f", meus_inimigos[i][3]).."%)")
--GameTooltip:AddDoubleLine (meus_inimigos[i][1]..": ", _detalhes:comma_value (meus_inimigos[i][2]).." (".._cstr("%.1f", meus_inimigos[i][3]).."%)", 1, 1, 1, 1, 1, 1)
--GameTooltip:AddTexture ("Interface\\GossipFrame\\BattleMasterGossipIcon.blp")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .2)
--GameTooltip:AddTexture ("Interface\\AddOns\\Details\\images\\espadas")
end
end
--GameTooltip:AddLine (" ")
_quantidade = _quantidade + 1
if (_quantidade >= _detalhes.tooltip_max_pets) then
return true
local n = _table [1]:gsub (("%s%<.*"), "")
if (instancia.sub_atributo == 1) then
GameCooltip:AddLine (n, _detalhes:comma_value (_table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
else
GameCooltip:AddLine (n, _detalhes:comma_value ( _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
end
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
end
end
return true
end
---------> DAMAGE TAKEN
function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra)
function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
local owner = self.owner
if (owner and owner.classe) then
@@ -1623,17 +1645,28 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra)
end
_table_sort (meus_agressores, function (a, b) return a[2] > b[2] end)
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
local max = #meus_agressores
if (max > 6) then
max = 6
end
if (keydown == "shift") then
max = #meus_agressores
end
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
if (keydown == "shift") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
for i = 1, max do
GameCooltip:AddLine (meus_agressores[i][1]..": ", _detalhes:comma_value (meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
local classe = meus_agressores[i][3]
@@ -1654,7 +1687,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra)
end
---------> FRIENDLY FIRE
function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown)
local owner = self.owner
if (owner and owner.classe) then
@@ -1686,11 +1719,23 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
_table_sort (Skills, _detalhes.Sort2)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.224609375, 0.056640625, 0.140625)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #DamagedPlayers) do
if (keydown == "shift") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
local max_abilities = _detalhes.tooltip_max_abilities
if (keydown == "shift") then
max_abilities = 99
end
for i = 1, _math_min (max_abilities, #DamagedPlayers) do
local classe = DamagedPlayers[i][3]
if (not classe) then
classe = "UNKNOW"
@@ -1709,11 +1754,23 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra)
end
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
GameCooltip:AddIcon ([[Interface\PVPFrame\bg-down-on]], 1, 1, 14, 14, 0, 1, 0, 1)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
for i = 1, _math_min (_detalhes.tooltip_max_abilities, #Skills) do
if (keydown == "ctrl") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
local max_abilities2 = _detalhes.tooltip_max_abilities
if (keydown == "ctrl") then
max_abilities2 = 99
end
for i = 1, _math_min (max_abilities2, #Skills) do
local nome, _, icone = _GetSpellInfo (Skills[i][1])
GameCooltip:AddLine (nome.." (x".. Skills[i][3].."): ", _detalhes:comma_value (Skills[i][2]).." (".._cstr("%.1f", Skills[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddIcon (icone, nil, nil, 14, 14)
@@ -2717,6 +2774,11 @@ end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
--> atualize a funcao de abreviacao
function atributo_damage:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
end
--> diminui o total das tabelas do combate
function atributo_damage:subtract_total (combat_table)
combat_table.totals [class_type] = combat_table.totals [class_type] - self.total
@@ -3047,3 +3109,6 @@ end
-- local grayscale = (_math_max (cor[1], cor[2], cor[3]) + _math_min (cor[1], cor[2], cor[3])) / 2 -- average
-- local grayscale = cor[1]*0.21 + cor[2]*0.71 + cor[3]*0.07
--(max(R, G, B) + min(R, G, B)) / 2
+17 -1
View File
@@ -61,6 +61,10 @@ local div_abre = _detalhes.divisores.abre
local div_fecha = _detalhes.divisores.fecha
local div_lugar = _detalhes.divisores.colocacao
local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
local info = _detalhes.janela_info
local keyName
@@ -281,6 +285,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local barras_container = instancia.barras
local combat_time = instancia.showing:GetCombatTime()
UsingCustomRightText = instancia.row_info.textR_enable_custom_text
local use_total_bar = false
if (instancia.total_bar.enabled) then
@@ -429,7 +434,13 @@ function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra,
local porcentagem = esta_e_energy_total / total * 100
local esta_porcentagem = _math_floor ((esta_e_energy_total/instancia.top) * 100)
esta_barra.texto_direita:SetText (_detalhes:ToK (esta_e_energy_total) .. " " .. div_abre .. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
local formated_energy = SelectedToKFunction (_, esta_e_energy_total)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_energy, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_energy .. " " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
end
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
@@ -946,6 +957,11 @@ end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
--> atualize a funcao de abreviacao
function atributo_energy:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
end
--> subtract total from a combat table
function atributo_energy:subtract_total (combat_table)
combat_table.totals [class_type].mana = combat_table.totals [class_type].mana - self.mana
+125 -35
View File
@@ -57,6 +57,10 @@ local div_abre = _detalhes.divisores.abre
local div_fecha = _detalhes.divisores.fecha
local div_lugar = _detalhes.divisores.colocacao
local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
local info = _detalhes.janela_info
local keyName
@@ -362,6 +366,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
--print (sub_atributo, total, keyName)
local combat_time = instancia.showing:GetCombatTime()
UsingCustomRightText = instancia.row_info.textR_enable_custom_text
local use_total_bar = false
if (instancia.total_bar.enabled) then
@@ -553,41 +558,71 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
if (sub_atributo == 1) then --> mostrando healing done
hps = _math_floor (hps)
if (_detalhes.ps_abbreviation == 2) then
hps = _detalhes:ToK (hps)
elseif (_detalhes.ps_abbreviation == 3) then
hps = _detalhes:ToK2 (hps)
end
local formated_heal = SelectedToKFunction (_, healing_total)
local formated_hps = SelectedToKFunction (_, hps)
esta_barra.texto_direita:SetText (_detalhes:ToK (healing_total) .." ".. div_abre .. hps .. ", ".. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_heal, formated_hps, _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_heal .." ".. div_abre .. formated_hps .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
end
esta_porcentagem = _math_floor ((healing_total/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 2) then --> mostrando hps
hps = _math_floor (hps)
if (_detalhes.ps_abbreviation == 2) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. _detalhes:ToK (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
elseif (_detalhes.ps_abbreviation == 3) then
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. _detalhes:ToK2 (healing_total) .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
else
esta_barra.texto_direita:SetText (_detalhes:ToK2 (hps) .." ".. div_abre .. healing_total .. ", ".._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
local formated_heal = SelectedToKFunction (_, healing_total)
local formated_hps = SelectedToKFunction (_, hps)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_hps, formated_heal, _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_hps .. " " .. div_abre .. formated_heal .. ", " .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita
end
esta_porcentagem = _math_floor ((hps/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 3) then --> mostrando overall
esta_barra.texto_direita:SetText (_detalhes:ToK (self.totalover) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
local formated_overheal = SelectedToKFunction (_, self.totalover)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_overheal, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_overheal .." " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
esta_porcentagem = _math_floor ((self.totalover/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 4) then --> mostrando healing take
esta_barra.texto_direita:SetText (_detalhes:ToK (self.healing_taken) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
local formated_healtaken = SelectedToKFunction (_, self.healing_taken)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_healtaken, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_healtaken .. " " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
esta_porcentagem = _math_floor ((self.healing_taken/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 5) then --> mostrando enemy heal
esta_barra.texto_direita:SetText (_detalhes:ToK (self.heal_enemy_amt) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
local formated_enemyheal = SelectedToKFunction (_, self.heal_enemy_amt)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_enemyheal, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_enemyheal .. " " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
esta_porcentagem = _math_floor ((self.heal_enemy_amt/instancia.top) * 100) --> determina qual o tamanho da barra
elseif (sub_atributo == 6) then --> mostrando enemy heal
esta_barra.texto_direita:SetText (_detalhes:ToK (self.totalabsorb) .." ".. div_abre .._cstr("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
elseif (sub_atributo == 6) then --> mostrando damage prevented
local formated_absorbs = SelectedToKFunction (_, self.totalabsorb)
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (formated_absorbs, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (formated_absorbs .. " " .. div_abre .. _cstr ("%.1f", porcentagem) .. "%" .. div_fecha) --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
end
esta_porcentagem = _math_floor ((self.totalabsorb/instancia.top) * 100) --> determina qual o tamanho da barra
end
end
@@ -758,7 +793,7 @@ end
---------> TOOLTIPS BIFURCAÇÃO
function atributo_heal:ToolTip (instancia, numero, barra)
function atributo_heal:ToolTip (instancia, numero, barra, keydown)
--> seria possivel aqui colocar o icone da classe dele?
if (instancia.atributo == 5) then --> custom
@@ -767,11 +802,11 @@ function atributo_heal:ToolTip (instancia, numero, barra)
--GameTooltip:ClearLines()
--GameTooltip:AddLine (barra.colocacao..". "..self.nome)
if (instancia.sub_atributo <= 3) then --> healing done, HPS or Overheal
return self:ToolTip_HealingDone (instancia, numero, barra)
return self:ToolTip_HealingDone (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 6) then --> healing done, HPS or Overheal
return self:ToolTip_HealingDone (instancia, numero, barra)
return self:ToolTip_HealingDone (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 4) then --> healing taken
return self:ToolTip_HealingTaken (instancia, numero, barra)
return self:ToolTip_HealingTaken (instancia, numero, barra, keydown)
end
end
end
@@ -779,9 +814,11 @@ end
local r, g, b
local headerColor = "yellow"
local barAlha = .6
local key_overlay = {1, 1, 1, .1}
local key_overlay_press = {1, 1, 1, .2}
---------> HEALING TAKEN
function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
local owner = self.owner
if (owner and owner.classe) then
@@ -810,17 +847,30 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra)
end
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (keydown == "shift") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
_table_sort (meus_curadores, function (a, b) return a[2] > b[2] end)
local max = #meus_curadores
if (max > 6) then
max = 6
end
if (keydown == "shift") then
max = 99
end
for i = 1, max do
for i = 1, _math_min (max, #meus_curadores) do
GameCooltip:AddLine (meus_curadores[i][1]..": ", _detalhes:comma_value (meus_curadores[i][2]).." (".._cstr ("%.1f", (meus_curadores[i][2]/total_curado) * 100).."%)")
local classe = meus_curadores[i][3]
if (not classe) then
@@ -839,7 +889,7 @@ end
---------> HEALING DONE / HPS / OVERHEAL
local background_heal_vs_absorbs = {value = 100, color = {1, 1, 0, .25}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_glass]]}
function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local owner = self.owner
if (owner and owner.classe) then
@@ -884,13 +934,23 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
--> Mostra as habilidades no tooltip
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
GameCooltip:AddIcon ([[Interface\RAIDFRAME\Raid-Icon-Rez]], 1, 1, 14, 14, 0.109375, 0.890625, 0.0625, 0.90625)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (keydown == "shift") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
local tooltip_max_abilities = _detalhes.tooltip_max_abilities
if (instancia.sub_atributo == 3 or instancia.sub_atributo == 2) then
tooltip_max_abilities = 6
end
if (keydown == "shift") then
tooltip_max_abilities = 99
end
for i = 1, _math_min (tooltip_max_abilities, #ActorHealingTable) do
if (ActorHealingTable[i][2] < 1) then
@@ -921,15 +981,32 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (keydown == "ctrl") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
for i = 1, _math_min (tooltip_max_abilities, #ActorHealingTargets) do
local tooltip_max_abilities2 = _detalhes.tooltip_max_abilities
if (keydown == "ctrl") then
tooltip_max_abilities2 = 99
end
for i = 1, _math_min (tooltip_max_abilities2, #ActorHealingTargets) do
if (ActorHealingTargets[i][2] < 1) then
break
end
GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
if (tooltip_max_abilities2 == 99 and ActorHealingTargets[i][1]:find (_detalhes.playername)) then
GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)", nil, "yellow")
GameCooltip:AddStatusBar (100, 1, .5, .5, .5, .7)
else
GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
end
local targetActor = container:PegarCombatente (nil, ActorHealingTargets[i][1])
@@ -1002,16 +1079,24 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra)
_table_sort (totais, _detalhes.Sort2)
for _, _table in _ipairs (totais) do
for index, _table in _ipairs (totais) do
if (_table [2] > 0) then
if (_table [2] > 0 and (index < 3 or keydown == "alt")) then
if (not added_logo) then
added_logo = true
GameCooltip:AddLine (Loc ["STRING_PETS"].."", nil, nil, headerColor, nil, 12)
--GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.03515625, 0.087890625, 0.0234375, 0.09765625, _detalhes.class_colors [self.classe])
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (keydown == "alt") then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_alt]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_alt]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
end
local n = _table [1]:gsub (("%s%<.*"), "")
@@ -1720,6 +1805,11 @@ end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
--> atualize a funcao de abreviacao
function atributo_heal:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
end
--> subtract total from a combat table
function atributo_heal:subtract_total (combat_table)
combat_table.totals [class_type] = combat_table.totals [class_type] - self.total
+118 -15
View File
@@ -115,6 +115,9 @@ function _detalhes:GetInstance (id)
return _detalhes.tabela_instancias [id]
end
function _detalhes:GetId()
return self.meu_id
end
function _detalhes:GetInstanceId()
return self.meu_id
end
@@ -191,9 +194,12 @@ end
_detalhes.opened_windows = _detalhes.opened_windows-1
self:ResetaGump()
gump:Fade (self.baseframe.cabecalho.atributo_icon, _unpack (_detalhes.windows_fade_in))
--gump:Fade (self.baseframe.cabecalho.atributo_icon, _unpack (_detalhes.windows_fade_in))
gump:Fade (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_in))
gump:Fade (self.baseframe, _unpack (_detalhes.windows_fade_in))
gump:Fade (self.rowframe, _unpack (_detalhes.windows_fade_in))
self:Desagrupar (-1)
if (self.modo == modo_raid) then
@@ -307,6 +313,7 @@ end
gump:Fade (self.baseframe.cabecalho.ball, 0)
gump:Fade (self.baseframe, 0)
gump:Fade (self.rowframe, 0)
self:SetMenuAlpha()
@@ -431,15 +438,27 @@ function _detalhes:BaseFrameSnap()
for lado, snap_to in _pairs (self.snap) do
--print ("DEBUG instancia " .. snap_to .. " lado "..lado)
local instancia_alvo = _detalhes.tabela_instancias [snap_to]
if (lado == 1) then --> a esquerda
instancia_alvo.baseframe:SetPoint ("TOPRIGHT", my_baseframe, "TOPLEFT")
elseif (lado == 2) then --> em baixo
instancia_alvo.baseframe:SetPoint ("TOPLEFT", my_baseframe, "BOTTOMLEFT", 0, -34)
local statusbar_y_mod = 0
if (not self.show_statusbar) then
statusbar_y_mod = 14
end
instancia_alvo.baseframe:SetPoint ("TOPLEFT", my_baseframe, "BOTTOMLEFT", 0, -34 + statusbar_y_mod)
elseif (lado == 3) then --> a direita
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", my_baseframe, "BOTTOMRIGHT")
elseif (lado == 4) then --> em cima
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", my_baseframe, "TOPLEFT", 0, 34)
local statusbar_y_mod = 0
if (not instancia_alvo.show_statusbar) then
statusbar_y_mod = -14
end
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", my_baseframe, "TOPLEFT", 0, 34 + statusbar_y_mod)
end
end
@@ -467,16 +486,32 @@ function _detalhes:BaseFrameSnap()
elseif (lado == 4) then
lado_reverso = 2
end
--> fazer os setpoints
if (lado_reverso == 1) then --> a esquerda
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", instancia.baseframe, "BOTTOMRIGHT")
elseif (lado_reverso == 2) then --> em baixo
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", instancia.baseframe, "TOPLEFT", 0, 34)
local statusbar_y_mod = 0
if (not instancia_alvo.show_statusbar) then
statusbar_y_mod = -14
end
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", instancia.baseframe, "TOPLEFT", 0, 34 + statusbar_y_mod) -- + (statusbar_y_mod*-1)
elseif (lado_reverso == 3) then --> a direita
instancia_alvo.baseframe:SetPoint ("TOPRIGHT", instancia.baseframe, "TOPLEFT")
elseif (lado_reverso == 4) then --> em cima
instancia_alvo.baseframe:SetPoint ("TOPLEFT", instancia.baseframe, "BOTTOMLEFT", 0, -34)
local statusbar_y_mod = 0
if (not instancia.show_statusbar) then
statusbar_y_mod = 14
end
instancia_alvo.baseframe:SetPoint ("TOPLEFT", instancia.baseframe, "BOTTOMLEFT", 0, -34 + statusbar_y_mod)
end
end
end
@@ -492,12 +527,26 @@ function _detalhes:BaseFrameSnap()
if (lado == 1) then --> a esquerda
instancia_alvo.baseframe:SetPoint ("TOPRIGHT", instancia.baseframe, "TOPLEFT")
elseif (lado == 2) then --> em baixo
instancia_alvo.baseframe:SetPoint ("TOPLEFT", instancia.baseframe, "BOTTOMLEFT", 0, -34)
local statusbar_y_mod = 0
if (not instancia.show_statusbar) then
statusbar_y_mod = 14
end
instancia_alvo.baseframe:SetPoint ("TOPLEFT", instancia.baseframe, "BOTTOMLEFT", 0, -34 + statusbar_y_mod)
elseif (lado == 3) then --> a direita
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", instancia.baseframe, "BOTTOMRIGHT")
elseif (lado == 4) then --> em cima
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", instancia.baseframe, "TOPLEFT", 0, 34)
local statusbar_y_mod = 0
if (not instancia_alvo.show_statusbar) then
statusbar_y_mod = -14
end
instancia_alvo.baseframe:SetPoint ("BOTTOMLEFT", instancia.baseframe, "TOPLEFT", 0, 34 + statusbar_y_mod)
end
end
end
@@ -529,9 +578,15 @@ function _detalhes:agrupar_janelas (lados)
elseif (lado == 4) then --> cima
--> mover frame
instancia.baseframe:SetPoint ("TOPLEFT", esta_instancia.baseframe, "BOTTOMLEFT", 0, -34)
instancia.baseframe:SetPoint ("TOP", esta_instancia.baseframe, "BOTTOM", 0, -34)
instancia.baseframe:SetPoint ("TOPRIGHT", esta_instancia.baseframe, "BOTTOMRIGHT", 0, -34)
local statusbar_y_mod = 0
if (not esta_instancia.show_statusbar) then
statusbar_y_mod = 14
end
instancia.baseframe:SetPoint ("TOPLEFT", esta_instancia.baseframe, "BOTTOMLEFT", 0, -34 + statusbar_y_mod)
instancia.baseframe:SetPoint ("TOP", esta_instancia.baseframe, "BOTTOM", 0, -34 + statusbar_y_mod)
instancia.baseframe:SetPoint ("TOPRIGHT", esta_instancia.baseframe, "BOTTOMRIGHT", 0, -34 + statusbar_y_mod)
local _, height = esta_instancia:GetSize()
instancia:SetSize (nil, height)
@@ -560,9 +615,15 @@ function _detalhes:agrupar_janelas (lados)
elseif (lado == 2) then --> baixo
--> mover frame
instancia.baseframe:SetPoint ("BOTTOMLEFT", esta_instancia.baseframe, "TOPLEFT", 0, 34)
instancia.baseframe:SetPoint ("BOTTOM", esta_instancia.baseframe, "TOP", 0, 34)
instancia.baseframe:SetPoint ("BOTTOMRIGHT", esta_instancia.baseframe, "TOPRIGHT", 0, 34)
local statusbar_y_mod = 0
if (not instancia.show_statusbar) then
statusbar_y_mod = -14
end
instancia.baseframe:SetPoint ("BOTTOMLEFT", esta_instancia.baseframe, "TOPLEFT", 0, 34 + statusbar_y_mod)
instancia.baseframe:SetPoint ("BOTTOM", esta_instancia.baseframe, "TOP", 0, 34 + statusbar_y_mod)
instancia.baseframe:SetPoint ("BOTTOMRIGHT", esta_instancia.baseframe, "TOPRIGHT", 0, 34 + statusbar_y_mod)
local _, height = esta_instancia:GetSize()
instancia:SetSize (nil, height)
@@ -979,6 +1040,7 @@ function _detalhes:RestauraJanela (index, temp)
self:DefaultIcons (true, true, true, true)
self.iniciada = true
self:AtivarInstancia (temp)
@@ -990,10 +1052,12 @@ end
function _detalhes:ExportSkin()
--create the table
local exported = {
version = _detalhes.preset_version --skin version
}
--export the keys
for key, value in pairs (self) do
if (_detalhes.instance_defaults [key] ~= nil) then
if (type (value) == "table") then
@@ -1003,6 +1067,24 @@ function _detalhes:ExportSkin()
end
end
end
--export mini displays
if (self.StatusBar and self.StatusBar.left) then
exported.StatusBarSaved = {
["left"] = self.StatusBar.left.real_name or "NONE",
["center"] = self.StatusBar.center.real_name or "NONE",
["right"] = self.StatusBar.right.real_name or "NONE",
}
exported.StatusBarSaved.options = {
[self.StatusBarSaved.left] = table_deepcopy (self.StatusBar.left.options),
[self.StatusBarSaved.center] = table_deepcopy (self.StatusBar.center.options),
[self.StatusBarSaved.right] = table_deepcopy (self.StatusBar.right.options)
}
elseif (self.StatusBarSaved) then
exported.StatusBarSaved = table_deepcopy (self.StatusBarSaved)
end
return exported
@@ -1019,6 +1101,8 @@ function _detalhes:ApplySavedSkin (style)
self.skin = ""
self:ChangeSkin (skin)
-- /script print (_detalhes.tabela_instancias[1].baseframe:GetAlpha())
--> overwrite all instance parameters with saved ones
for key, value in pairs (style) do
if (key ~= "skin") then
@@ -1030,6 +1114,25 @@ function _detalhes:ApplySavedSkin (style)
end
end
--> check for new keys inside tables
for key, value in pairs (_detalhes.instance_defaults) do
if (type (value) == "table") then
for key2, value2 in pairs (value) do
if (self [key] [key2] == nil) then
if (type (value2) == "table") then
self [key] [key2] = table_deepcopy (_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
end
end
end
end
end
self.StatusBarSaved = style.StatusBarSaved and table_deepcopy (style.StatusBarSaved) or {options = {}}
self.StatusBar.options = self.StatusBarSaved.options
_detalhes.StatusBar:UpdateChilds (self)
--> apply all changed attributes
self:ChangeSkin()
end
+9 -3
View File
@@ -72,16 +72,17 @@ _detalhes.instance_defaults = {
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1},
--auto hide window borders
menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1},
menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1, ignorebars = false},
--auto hide menu
auto_hide_menu = {left = false, right = false},
--attribute text
attribute_text = {enabled = false, anchor = {5, 1}, text_face = "Friz Quadrata TT", text_size = 12, text_color = {1, 1, 1, 1}, side = 1},
attribute_text = {enabled = false, anchor = {5, 1}, text_face = "Friz Quadrata TT", text_size = 12, text_color = {1, 1, 1, 1}, side = 1, shadow = false},
--instance button anchor store the anchor point of instance and delete button
instance_button_anchor = {-27, 1},
--total bar
total_bar = {enabled = false, color = {1, 1, 1}, only_in_group = true, icon = [[Interface\ICONS\INV_Sigil_Thorim]]},
--row animation when show
row_show_animation = {anim = "Fade", options = {}},
--row info
row_info = {
--if true the texture of the bars will have the color of his actor class
@@ -94,6 +95,9 @@ _detalhes.instance_defaults = {
textL_class_colors = false,
--right text class color
textR_class_colors = false,
--right text informations
textR_enable_custom_text = false,
textR_custom_text = "{data1} ({data2}, {data3}%)",
--if text class color are false, this color will be used
fixed_text_color = {1, 1, 1},
--left text outline effect
@@ -136,6 +140,8 @@ _detalhes.instance_defaults = {
--hide in combat
hide_in_combat = false,
hide_in_combat_alpha = 0,
--strata
strata = "LOW",
--wallpaper
wallpaper = {
enabled = false,
+18 -2
View File
@@ -61,6 +61,10 @@ local div_abre = _detalhes.divisores.abre
local div_fecha = _detalhes.divisores.fecha
local div_lugar = _detalhes.divisores.colocacao
local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
local info = _detalhes.janela_info
local keyName
@@ -566,6 +570,8 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
local qual_barra = 1
local barras_container = instancia.barras
UsingCustomRightText = instancia.row_info.textR_enable_custom_text
if (instancia.bars_sort_direction == 1) then --top to bottom
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName) --> instância, index, total, valor da 1º barra
@@ -648,7 +654,11 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
local porcentagem = meu_total / total * 100
local esta_porcentagem = _math_floor ((meu_total/instancia.top) * 100)
esta_barra.texto_direita:SetText (meu_total .." ".. div_abre .. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
if (UsingCustomRightText) then
esta_barra.texto_direita:SetText (instancia.row_info.textR_custom_text:ReplaceData (meu_total, "", _cstr ("%.1f", porcentagem)))
else
esta_barra.texto_direita:SetText (meu_total .." ".. div_abre .. _cstr ("%.1f", porcentagem).."%" .. div_fecha) --seta o texto da direita
end
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
gump:UpdateTooltip (qual_barra, esta_barra, instancia)
@@ -1841,7 +1851,13 @@ end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> core functions
local sub_list = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispell", "dead"}
--> atualize a funcao de abreviacao
function atributo_misc:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
end
local sub_list = {"cc_break", "ress", "interrupt", "cooldowns_defensive", "dispell", "dead"}
--> subtract total from a combat table
function atributo_misc:subtract_total (combat_table)
+15 -3
View File
@@ -22,6 +22,10 @@
local _GetInstanceInfo = GetInstanceInfo --wow api local
local _UnitExists = UnitExists --wow api local
local _UnitGUID = UnitGUID --wow api local
local _IsAltKeyDown = IsAltKeyDown
local _IsShiftKeyDown = IsShiftKeyDown
local _IsControlKeyDown = IsControlKeyDown
local atributo_damage = _detalhes.atributo_damage --details local
local atributo_heal = _detalhes.atributo_heal --details local
@@ -887,7 +891,7 @@
local backgroundPoint = {{"bottomleft", "topleft", 0, -3}, {"bottomright", "topright", 0, -3}}
local textPoint = {"left", "right", -11, -5}
function _detalhes:MontaTooltip (frame, qual_barra)
function _detalhes:MontaTooltip (frame, qual_barra, keydown)
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
@@ -912,7 +916,7 @@
return _detalhes:ToolTipVoidZones (self, objeto, esta_barra)
end
local t = objeto:ToolTip (self, qual_barra, esta_barra) --> instância, nº barra, objeto barra
local t = objeto:ToolTip (self, qual_barra, esta_barra, keydown) --> instância, nº barra, objeto barra, keydown
if (t) then
if (esta_barra.minha_tabela.serial and esta_barra.minha_tabela.serial ~= "") then
@@ -935,7 +939,15 @@
end
function _detalhes.gump:UpdateTooltip (qual_barra, esta_barra, instancia)
return instancia:MontaTooltip (esta_barra, qual_barra)
if (_IsShiftKeyDown()) then
return instancia:MontaTooltip (esta_barra, qual_barra, "shift")
elseif (_IsControlKeyDown()) then
return instancia:MontaTooltip (esta_barra, qual_barra, "ctrl")
elseif (_IsAltKeyDown()) then
return instancia:MontaTooltip (esta_barra, qual_barra, "alt")
else
return instancia:MontaTooltip (esta_barra, qual_barra)
end
end
function _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing)
+6 -45
View File
@@ -525,7 +525,12 @@
["left"] = esta_instancia.StatusBar.left.real_name or "NONE",
["center"] = esta_instancia.StatusBar.center.real_name or "NONE",
["right"] = esta_instancia.StatusBar.right.real_name or "NONE",
["options"] = esta_instancia.StatusBar.options
--["options"] = esta_instancia.StatusBar.options
}
esta_instancia.StatusBarSaved.options = {
[esta_instancia.StatusBarSaved.left] = esta_instancia.StatusBar.left.options,
[esta_instancia.StatusBarSaved.center] = esta_instancia.StatusBar.center.options,
[esta_instancia.StatusBarSaved.right] = esta_instancia.StatusBar.right.options
}
end
@@ -563,50 +568,6 @@
end
function _detalhes:ClearInstances()
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
--> detona a janela do Solo Mode
if (esta_instancia.StatusBar.left) then
esta_instancia.StatusBarSaved = {
["left"] = esta_instancia.StatusBar.left.real_name or "NONE",
["center"] = esta_instancia.StatusBar.center.real_name or "NONE",
["right"] = esta_instancia.StatusBar.right.real_name or "NONE",
["options"] = esta_instancia.StatusBar.options
}
end
--> erase all widgets frames
esta_instancia.scroll = nil
esta_instancia.baseframe = nil
esta_instancia.bgframe = nil
esta_instancia.bgdisplay = nil
esta_instancia.freeze_icon = nil
esta_instancia.freeze_texto = nil
esta_instancia.barras = nil
esta_instancia.showing = nil
esta_instancia.agrupada_a = nil
esta_instancia.grupada_pos = nil
esta_instancia.agrupado = nil
esta_instancia._version = nil
esta_instancia.h_baixo = nil
esta_instancia.h_esquerda = nil
esta_instancia.h_direita = nil
esta_instancia.h_cima = nil
esta_instancia.botao_separar = nil
esta_instancia.alert = nil
esta_instancia.StatusBar = nil
esta_instancia.consolidateFrame = nil
esta_instancia.consolidateButtonTexture = nil
esta_instancia.consolidateButton = nil
esta_instancia.lastIcon = nil
end
end
function _detalhes:reset_window (instancia)
if (instancia.segmento == -1) then
instancia.showing[instancia.atributo].need_refresh = true
+99 -5
View File
@@ -291,6 +291,36 @@
_detalhes.StatusBar:ApplyOptions (instance.StatusBar.right, "textsize", 9)
end
function _detalhes.StatusBar:GetIndexFromAbsoluteName (AbsName)
for index, object in ipairs (_detalhes.StatusBar.Plugins) do
if (object.real_name == AbsName) then
return index
end
end
end
function _detalhes.StatusBar:UpdateChilds (instance)
local left = instance.StatusBarSaved.left
local center = instance.StatusBarSaved.center
local right = instance.StatusBarSaved.right
--print (instance.StatusBarSaved.options [left].textSize)
--print (instance.StatusBar.options [left].textSize)
local left_index = _detalhes.StatusBar:GetIndexFromAbsoluteName (left)
ChoosePlugin (nil, nil, left_index, instance.StatusBar.left, "left")
instance.StatusBar.left.options = table_deepcopy (instance.StatusBarSaved.options [left])
instance.StatusBar.center.options = table_deepcopy (instance.StatusBarSaved.options [center])
instance.StatusBar.right.options = table_deepcopy (instance.StatusBarSaved.options [right])
_detalhes.StatusBar:ApplyOptions (instance.StatusBar.left, "textcolor")
_detalhes.StatusBar:ApplyOptions (instance.StatusBar.left, "textsize")
_detalhes.StatusBar:ApplyOptions (instance.StatusBar.left, "textface")
end
--> build-in function for create a frame for an plugin child
function _detalhes.StatusBar:CreateChildFrame (instance, name, w, h)
--local frame = _detalhes.gump:NewPanel (instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false)
@@ -533,24 +563,87 @@ do
return
end
function PSegment:Change ()
function PSegment:Change()
for index, child in _ipairs (PSegment.childs) do
if (child.enabled and child.instance:IsEnabled()) then
if (child.instance.segmento == -1) then --> overall
child.text:SetText (Loc ["STRING_OVERALL"])
elseif (child.instance.segmento == 0) then --> combate atual
child.text:SetText (Loc ["STRING_CURRENT"])
if (child.options.segmentType == 1) then
child.text:SetText (Loc ["STRING_CURRENT"])
elseif (child.options.segmentType == 2) then
if (child.instance.showing.is_boss) then
child.text:SetText (child.instance.showing.is_boss.encounter)
elseif (_detalhes.encounter_table and _detalhes.encounter_table.name) then
child.text:SetText (_detalhes.encounter_table.name)
else
child.text:SetText (child.instance.showing.enemy or "Unknown")
end
end
else --> alguma tabela do histórico
child.text:SetText (Loc ["STRING_FIGHTNUMBER"]..child.instance.segmento)
if (child.options.segmentType == 1) then
child.text:SetText (Loc ["STRING_FIGHTNUMBER"]..child.instance.segmento)
elseif (child.options.segmentType == 2) then
if (child.instance.showing.is_boss) then
child.text:SetText (child.instance.showing.is_boss.encounter)
else
child.text:SetText (child.instance.showing.enemy or "Unknown")
end
end
end
end
end
end
function PSegment:ExtraOptions()
--> all widgets need to be placed on a table
local widgets = {}
--> reference of extra window for custom options
local window = _G.DetailsStatusBarOptions2.MyObject
--> build all your widgets -----------------------------------------------------------------------------------------------------------------------------
_detalhes.gump:NewLabel (window, nil, "$parentSegmentOptionLabel", "segmentOptionLabel", Loc ["STRING_PLUGIN_SEGMENTTYPE"])
window.segmentOptionLabel:SetPoint (10, -15)
local onSelectSegmentType = function (_, child, thistype)
child.options.segmentType = thistype
PSegment:Change()
end
local segmentTypes = {
{value = 1, label = Loc ["STRING_PLUGIN_SEGMENTTYPE_1"], onclick = onSelectSegmentType, icon = [[Interface\ICONS\Ability_Rogue_KidneyShot]]},
{value = 2, label = Loc ["STRING_PLUGIN_SEGMENTTYPE_2"], onclick = onSelectSegmentType, icon = [[Interface\ICONS\Achievement_Boss_Ra_Den]]},
}
_detalhes.gump:NewDropDown (window, nil, "$parentSegmentTypeDropdown", "segmentTypeDropdown", 200, 20, function() return segmentTypes end, 1) -- func, default
window.segmentTypeDropdown:SetPoint ("left", window.segmentOptionLabel, "right", 2)
-----------------------------------------------------------------------------------------------------------------------------
--> now we insert all widgets created on widgets table
table.insert (widgets, window.segmentOptionLabel)
table.insert (widgets, window.segmentTypeDropdown)
--> after first call we replace this function with widgets table
PSegment.ExtraOptions = widgets
end
--> ExtraOptionsOnOpen is called when options are opened and plugin have custom options
--> here we setup options widgets for get the values of clicked child and also for tell options window what child we are configuring
function PSegment:ExtraOptionsOnOpen (child)
_G.DetailsStatusBarOptions2SegmentTypeDropdown.MyObject:SetFixedParameter (child)
_G.DetailsStatusBarOptions2SegmentTypeDropdown.MyObject:Select (child.options.segmentType, true)
end
--> Create Plugin Frames (must have)
function PSegment:CreateChildObject (instance)
local myframe = _detalhes.StatusBar:CreateChildFrame (instance, "DetailsPSegmentInstance" .. instance:GetInstanceId(), DEFAULT_CHILD_WIDTH, DEFAULT_CHILD_HEIGHT)
local new_child = _detalhes.StatusBar:CreateChildTable (instance, PSegment, myframe)
new_child.options.segmentType = new_child.options.segmentType or 1
return new_child
end
@@ -563,6 +656,7 @@ do
--> Register needed events
_detalhes:RegisterEvent (PSegment, "DETAILS_INSTANCE_CHANGESEGMENT", PSegment.Change)
_detalhes:RegisterEvent (PSegment, "COMBAT_PLAYER_ENTER", PSegment.Change)
end
@@ -1208,7 +1302,7 @@ end)
ColorPickerFrame:Show()
end
_detalhes.gump:NewImage (window, _, "$parentTextColorTexture", "textcolortexture", 150, 16)
_detalhes.gump:NewImage (window, nil, 150, 16, nil, nil, "textcolortexture", "$parentTextColorTexture")
window.textcolortexture:SetPoint ("left", window.textcolor, "right", 2)
window.textcolortexture:SetTexture (1, 1, 1)
@@ -1232,7 +1326,7 @@ end)
_detalhes.gump:NewSlider (window, _, "$parentSliderFontSize", "fonsizeSlider", 170, 20, 9, 15, .5, 1)
window.fonsizeSlider:SetPoint ("left", window.fonsizeLabel, "right", 2)
window.fonsizeSlider:SetThumbSize (50)
window.fonsizeSlider.useDecimals = true
--window.fonsizeSlider.useDecimals = true
window.fonsizeSlider:SetHook ("OnValueChange", function (self, child, amount)
_detalhes.StatusBar:ApplyOptions (child, "textsize", amount)
end)
+50
View File
@@ -74,7 +74,57 @@
end
return _string_format ("%.0f", numero)
end
function _detalhes:ToKMin (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 _string_format ("%.1f", numero)
end
function _detalhes:ToK2Min (numero)
if (numero > 999999) then
return _string_format ("%.2f", numero/1000000) .. "m"
elseif (numero > 99999) then
return _math_floor (numero/1000) .. "k"
elseif (numero > 999) then
return _string_format ("%.1f", (numero/1000)) .. "k"
end
return _string_format ("%.1f", numero)
end
--> short numbers no numbers after comma
function _detalhes:ToK0Min (numero)
if (numero > 1000000) then
return _string_format ("%.0f", numero/1000000) .."m"
elseif (numero > 1000) then
return _string_format ("%.0f", numero/1000) .."k"
end
return _string_format ("%.0f", numero)
end
--> no changes
function _detalhes:NoToK (numero)
return numero
end
_detalhes.ToKFunctions = {_detalhes.NoToK, _detalhes.ToK, _detalhes.ToK2, _detalhes.ToK0, _detalhes.ToKMin, _detalhes.ToK2Min, _detalhes.ToK0Min}
function string:ReplaceData (...)
local args = {...}
local function getarg (i)
local n = tonumber (i)
if (n) then
return args [tonumber(i)]
else
return loadstring (i)()
end
end
return (self:gsub('{data(%d+)}', getarg):gsub ('{func(.-)}', getarg))
end
--local usertext = "i got the time: {data2}, {data3}% of {data1} minutes"
--local expanded = usertext:expand(50000, 1000, 20)
--> remove a index from a hash table
function _detalhes:tableRemove (tabela, indexName)
local newtable = {}
+19 -8
View File
@@ -129,10 +129,15 @@
local metade_largura = _w/2
local metade_altura = _h/2
self.ponto1 = {x = _x - metade_largura, y = _y + metade_altura}
self.ponto2 = {x = _x - metade_largura, y = _y - metade_altura}
self.ponto3 = {x = _x + metade_largura, y = _y - metade_altura}
self.ponto4 = {x = _x + metade_largura, y = _y + metade_altura}
local statusbar_y_mod = 0
if (not self.show_statusbar) then
statusbar_y_mod = 14
end
self.ponto1 = {x = _x - metade_largura, y = _y + metade_altura + (statusbar_y_mod*-1)} --topleft
self.ponto2 = {x = _x - metade_largura, y = _y - metade_altura + statusbar_y_mod} --bottomleft
self.ponto3 = {x = _x + metade_largura, y = _y - metade_altura + statusbar_y_mod} --bottomright
self.ponto4 = {x = _x + metade_largura, y = _y + metade_altura + (statusbar_y_mod*-1)} --topright
end
function _detalhes:SaveMainWindowPosition (instance)
@@ -208,10 +213,15 @@
local metade_largura = _w/2
local metade_altura = _h/2
self.ponto1 = {x = _x - metade_largura, y = _y + metade_altura}
self.ponto2 = {x = _x - metade_largura, y = _y - metade_altura}
self.ponto3 = {x = _x + metade_largura, y = _y - metade_altura}
self.ponto4 = {x = _x + metade_largura, y = _y + metade_altura}
local statusbar_y_mod = 0
if (not self.show_statusbar) then
statusbar_y_mod = 14
end
self.ponto1 = {x = _x - metade_largura, y = _y + metade_altura + (statusbar_y_mod*-1)} --topleft
self.ponto2 = {x = _x - metade_largura, y = _y - metade_altura + statusbar_y_mod} --bottomleft
self.ponto3 = {x = _x + metade_largura, y = _y - metade_altura + statusbar_y_mod} --bottomright
self.ponto4 = {x = _x + metade_largura, y = _y + metade_altura + (statusbar_y_mod*-1)} --topright
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 --> isso aqui não sei o que esta fazendo aqui
@@ -389,6 +399,7 @@
--> reajustar o local do relógio
local meio = self.baseframe:GetWidth() / 2
local novo_local = meio - 25
self.rows_fit_in_window = _math_floor ( self.baseframe.BoxBarrasAltura / self.row_height)
--if (not _detalhes.initializing) then
+3 -3
View File
@@ -778,7 +778,7 @@ function gump:NewColorPickButton (parent, name, member, callback, alpha)
bgFile = [[Interface\AddOns\Details\images\background]], insets = {left = 0, right = 0, top = 0, bottom = 0}})
--textura do fundo
local background = gump:NewImage (button, _, "$parentBck", nil, color_button_width, color_button_height)
local background = gump:NewImage (button, nil, color_button_width, color_button_height, nil, nil, nil, "$parentBck")
background:SetTexture ([[Interface\AddOns\Details\images\icons]])
background:SetPoint ("topleft", button.widget, "topleft", 1, -2)
background:SetPoint ("bottomright", button.widget, "bottomright", -1, 1)
@@ -787,7 +787,7 @@ function gump:NewColorPickButton (parent, name, member, callback, alpha)
background:SetDrawLayer ("background", 1)
--textura da cor
local img = gump:NewImage (button, _, "$parentTex", "color_texture", color_button_width, color_button_height)
local img = gump:NewImage (button, nil, color_button_width, color_button_height, nil, nil, "color_texture", "$parentTex")
img:SetTexture (1, 1, 1)
img:SetPoint ("topleft", button.widget, "topleft", 1, -2)
img:SetPoint ("bottomright", button.widget, "bottomright", -1, 1)
@@ -795,7 +795,7 @@ function gump:NewColorPickButton (parent, name, member, callback, alpha)
--icone do color pick
--[[
local icon = gump:NewImage (button, _, "$parentIcon", nil, 16, color_button_height)
local icon = gump:NewImage (button, nil, "$parentIcon", nil, 16, color_button_height)
icon:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
icon:SetPoint ("topleft", button, "topleft", -1, 0)
icon:SetDrawLayer ("border", 3)
+5 -5
View File
@@ -392,12 +392,12 @@ end
function DetailsDropDownOptionOnEnter (frame)
if (frame.table.desc) then
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:SetColor ("main", "transparent")
_detalhes:CooltipPreset (1)
GameCooltip:AddLine (frame.table.desc)
GameCooltip:SetOwner (frame:GetParent():GetParent():GetParent())
GameCooltip:ShowCooltip()
if (frame.table.descfont) then
GameCooltip:SetOption ("TextFont", frame.table.descfont)
end
GameCooltip:ShowCooltip(frame:GetParent():GetParent():GetParent(), "tooltip")
frame.tooltip = true
end
frame:GetParent().mouseover:SetPoint ("left", frame)
+1 -7
View File
@@ -204,14 +204,11 @@ local ImageMetaFunctions = {}
------------------------------------------------------------------------------------------------------------
--> object constructor
function gump:NewImage (parent, container, name, member, w, h, texture, layer)
function gump:NewImage (parent, texture, w, h, layer, coords, member, name)
if (not parent) then
return nil
end
if (not container) then
container = parent
end
if (not name) then
name = "DetailsPictureNumber" .. gump.PictureNameCounter
@@ -231,9 +228,6 @@ function gump:NewImage (parent, container, name, member, w, h, texture, layer)
if (parent.dframework) then
parent = parent.widget
end
if (container.dframework) then
container = container.widget
end
texture = texture or ""
+6 -6
View File
@@ -11,11 +11,11 @@ local _
window.hooks = {}
local background = g:NewImage (window, nil, "$parentBackground", nil, nil, nil, nil, "background")
local background = g:NewImage (window, nil, nil, nil, "background", nil, nil, "$parentBackground")
background:SetAllPoints()
background:SetTexture (0, 0, 0, .8)
local edit_texture = g:NewImage (window, nil, "$parentImage", nil, 300, 250, nil, "artwork")
local edit_texture = g:NewImage (window, nil, 300, 250, "artwork", nil, nil, "$parentImage")
edit_texture:SetPoint ("center", window, "center")
local haveHFlip = false
@@ -23,7 +23,7 @@ local _
--> Top Slider
local topCoordTexture = g:NewImage (window, nil, "$parentImageTopCoord", nil, nil, nil, nil, "overlay")
local topCoordTexture = g:NewImage (window, nil, nil, nil, "overlay", nil, nil, "$parentImageTopCoord")
topCoordTexture:SetPoint ("topleft", window, "topleft")
topCoordTexture:SetPoint ("topright", window, "topright")
topCoordTexture.color = "red"
@@ -55,7 +55,7 @@ local _
--> Bottom Slider
local bottomCoordTexture = g:NewImage (window, nil, "$parentImageBottomCoord", nil, nil, nil, nil, "overlay")
local bottomCoordTexture = g:NewImage (window, nil, nil, nil, "overlay", nil, nil, "$parentImageBottomCoord")
bottomCoordTexture:SetPoint ("bottomleft", window, "bottomleft", 0, 0)
bottomCoordTexture:SetPoint ("bottomright", window, "bottomright", 0, 0)
bottomCoordTexture.color = "red"
@@ -88,7 +88,7 @@ local _
--> Left Slider
local leftCoordTexture = g:NewImage (window, nil, "$parentImageLeftCoord", nil, nil, nil, nil, "overlay")
local leftCoordTexture = g:NewImage (window, nil, nil, nil, "overlay", nil, nil, "$parentImageLeftCoord")
leftCoordTexture:SetPoint ("topleft", window, "topleft", 0, 0)
leftCoordTexture:SetPoint ("bottomleft", window, "bottomleft", 0, 0)
leftCoordTexture.color = "red"
@@ -119,7 +119,7 @@ local _
--> Right Slider
local rightCoordTexture = g:NewImage (window, nil, "$parentImageRightCoord", nil, nil, nil, nil, "overlay")
local rightCoordTexture = g:NewImage (window, nil, nil, nil, "overlay", nil, nil, "$parentImageRightCoord")
rightCoordTexture:SetPoint ("topright", window, "topright", 0, 0)
rightCoordTexture:SetPoint ("bottomright", window, "bottomright", 0, 0)
rightCoordTexture.color = "red"
+2 -2
View File
@@ -482,7 +482,7 @@ local SliderMetaFunctions = {}
local on_update = function (self, elapsed)
timer = timer + elapsed
if (timer > 0.6) then
if (timer > 0.4) then
change_timer = change_timer + elapsed
if (change_timer > 0.1) then
change_timer = 0
@@ -533,7 +533,7 @@ local SliderMetaFunctions = {}
local on_update = function (self, elapsed)
timer = timer + elapsed
if (timer > 0.6) then
if (timer > 0.4) then
change_timer = change_timer + elapsed
if (change_timer > 0.1) then
change_timer = 0
+2 -1
View File
@@ -507,7 +507,7 @@ local default_profile = {
segments_amount_to_save = 5,
segments_panic_mode = true,
--> max instances
instances_amount = 12,
instances_amount = 5,
--> if clear ungroup characters when logout
clear_ungrouped = true,
--> if clear graphic data when logout
@@ -516,6 +516,7 @@ local default_profile = {
--> text sizes
font_sizes = {menus = 10},
ps_abbreviation = 3,
total_abbreviation = 2,
--> performance
use_row_animations = false,
+72
View File
@@ -0,0 +1,72 @@
--File Revision: 1
--Last Modification: 19/04/2014
--Change Log:
-- 19/04/2014: File Created.
--Description:
-- this file maintain the main function for row animations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> basic functions
_detalhes.current_row_animation = ""
_detalhes.row_animation_pool = {}
function _detalhes:InstallRowAnimation (name, desc, func, options)
if (not name) then
return false
elseif (not func) then
return false
end
if (not desc) then
desc = ""
end
tinsert (_detalhes.row_animation_pool, {name = name, desc = desc, func = func, options = options})
return true
end
function _detalhes:SelectRowAnimation (name)
for key, value in ipairs (_detalhes.row_animation_pool) do
if (value.name == name) then
_detalhes.current_row_animation = name
return true
end
end
return false
end
function _detalhes:GetRowAnimationList()
local t = {}
for key, value in ipairs (_detalhes.row_animation_pool) do
tinsert (t, value.name)
end
return t
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> install default animations
do
local fade_func = function (row, state)
if (state) then
_detalhes.gump:Fade (row, "out")
else
_detalhes.gump:Fade (row, "in")
end
end
local fade_desc = "Default animation, makes the bar fade in or fade out when showing or hiding in the window"
_detalhes:InstallRowAnimation ("Fade", fade_desc , fade_func, nil)
_detalhes:SelectRowAnimation ("Fade")
end
+5 -1
View File
@@ -111,8 +111,12 @@ local _
attribute_text = {enabled = true, side = 1, text_size = 12, anchor = {-18, 4}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"},
},
callback = function (skin)
callback = function (skin, instance, just_updating)
DetailsResetButton2Text2:SetText ("")
if (not just_updating and not instance:IsLowerInstance()) then
instance:MenuAnchor (-67)
end
end,
})
+32
View File
@@ -250,6 +250,38 @@ function SlashCmdList.DETAILS (msg, editbox)
--vardump (_detalhes.ResetButton)
elseif (command == "mini") then
local instance = _detalhes.tabela_instancias [1]
--vardump ()
--print (instance, instance.StatusBar.options, instance.StatusBar.left)
print (instance.StatusBar.options [instance.StatusBar.left.mainPlugin.real_name].textSize)
print (instance.StatusBar.left.options.textSize)
elseif (command == "owner") then
local petname = rest:match ("^(%S*)%s*(.-)$")
if (not _G.DetailsScanTooltip) then
local scanTool = CreateFrame ("GameTooltip", "DetailsScanTooltip", nil, "GameTooltipTemplate")
scanTool:SetOwner (WorldFrame, "ANCHOR_NONE")
end
function getPetOwner (petName)
local scanTool = _G.DetailsScanTooltip
local scanText = _G ["DetailsScanTooltipTextLeft2"] -- This is the line with <[Player]'s Pet>
scanTool:ClearLines()
scanTool:SetUnit (petName)
local ownerText = scanText:GetText()
if not ownerText then return nil end
local owner, _ = string.split("'",ownerText)
return owner -- This is the pet's owner
end
print (getPetOwner (petname))
elseif (command == "buffsof") then
local playername, segment = rest:match("^(%S*)%s*(.-)$")
+1 -1
View File
@@ -12,7 +12,7 @@ do
panel:SetPoint ("center", UIParent, "center")
panel.locked = false
DetailsFrameWork:NewImage (panel, _, "$parentBackGround", "background", 512, 128, "Interface\\AddOns\\Details\\images\\copy", "background")
DetailsFrameWork:NewImage (panel, "Interface\\AddOns\\Details\\images\\copy", 512, 128, "background", nil, "background", "$parentBackGround")
panel.background:SetPoint()
--> title
+3 -3
View File
@@ -413,7 +413,7 @@ local function CreateCustomWindow()
if (not thisButton) then
thisButton = gump:NewButton (spellsFrame.frame, spellsFrame.frame, "DetailsCustomSpellsFrameButton"..i, "button"..i, 80, 20, selectedEncounterSpell)
thisButton:SetPoint ("topleft", "DetailsCustomSpellsFrame", "topleft", x, -y)
local t = gump:NewImage (thisButton, thisButton, "DetailsCustomEncounterImageButton"..i, "image", 20, 20)
local t = gump:NewImage (thisButton, nil, 20, 20, nil, nil, "image", "DetailsCustomEncounterImageButton"..i)
t:SetPoint ("left", thisButton)
thisButton:SetHook ("OnEnter", buttonMouseOver)
thisButton:SetHook ("OnLeave", buttonMouseOut)
@@ -423,12 +423,12 @@ local function CreateCustomWindow()
text:SetWidth (73)
text:SetHeight (10)
local border = gump:NewImage (thisButton, thisButton, "DetailsCustomEncounterBorderButton"..i, "border", 40, 38, "Interface\\SPELLBOOK\\Spellbook-Parts")
local border = gump:NewImage (thisButton, "Interface\\SPELLBOOK\\Spellbook-Parts", 40, 38, nil, nil, "border", "DetailsCustomEncounterBorderButton"..i)
border:SetTexCoord (0.00390625, 0.27734375, 0.44140625,0.69531250)
border:SetDrawLayer ("background")
border:SetPoint ("topleft", thisButton.button, "topleft", -9, 9)
local line = gump:NewImage (thisButton, thisButton, "DetailsCustomEncounterLineButton"..i, "line", 84, 25, "Interface\\SPELLBOOK\\Spellbook-Parts")
local line = gump:NewImage (thisButton, "Interface\\SPELLBOOK\\Spellbook-Parts", 84, 25, nil, nil, "line", "DetailsCustomEncounterLineButton"..i)
line:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750)
line:SetDrawLayer ("background")
line:SetPoint ("left", thisButton.button, "right", -60, -3)
+1 -1
View File
@@ -51,7 +51,7 @@ function _detalhes:CreateOrOpenNewsWindow()
titulo:SetPoint ("top", frame, "top", 0, -18)
--> reinstall textura
local textura = _detalhes.gump:NewImage (frame, _, "$parentExclamacao", nil, 64, 64, [[Interface\DialogFrame\DialogAlertIcon]])
local textura = _detalhes.gump:NewImage (frame, [[Interface\DialogFrame\DialogAlertIcon]], 64, 64, nil, nil, nil, "$parentExclamacao")
textura:SetPoint ("topleft", frame, "topleft", 60, -20)
--> reinstall aviso
local reinstall = _detalhes.gump:NewLabel (frame, nil, "$parentReinstall", nil, "", "GameFontHighlightLeft", 10)
+426 -262
View File
File diff suppressed because it is too large Load Diff
+182 -20
View File
@@ -304,7 +304,7 @@ end
local function OnLeaveMainWindow (instancia, self)
instancia.is_interacting = false
instancia:SetMenuAlpha (nil, nil, nil, true)
instancia:SetMenuAlpha (nil, nil, nil, nil, true)
instancia:SetAutoHideMenu (nil, nil, true)
if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then
@@ -333,7 +333,7 @@ _detalhes.OnLeaveMainWindow = OnLeaveMainWindow
local function OnEnterMainWindow (instancia, self)
instancia.is_interacting = true
instancia:SetMenuAlpha (nil, nil, nil, true)
instancia:SetMenuAlpha (nil, nil, nil, nil, true)
instancia:SetAutoHideMenu (nil, nil, true)
if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then
@@ -519,12 +519,16 @@ local function move_janela (baseframe, iniciando, instancia)
if (instancia_alvo:IsSoloMode()) then
_detalhes.SoloTables:switch()
end
instancia_alvo.ativa = false --> isso não ta legal
instancia_alvo.ativa = false
instancia_alvo:SaveMainWindowPosition()
instancia_alvo:RestoreMainWindowPosition()
gump:Fade (instancia_alvo.baseframe, 1)
gump:Fade (instancia_alvo.rowframe, 1)
gump:Fade (instancia_alvo.baseframe.cabecalho.ball, 1)
gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, 1)
need_start = false
end
@@ -1219,6 +1223,47 @@ local function bota_separar_script (botao, instancia)
end)
end
local shift_monitor = function (self)
if (_IsShiftKeyDown()) then
if (not self.showing_allspells) then
self.showing_allspells = true
local instancia = _detalhes:GetInstance (self.instance_id)
instancia:MontaTooltip (self, self.row_id, "shift")
end
elseif (self.showing_allspells) then
self.showing_allspells = false
local instancia = _detalhes:GetInstance (self.instance_id)
instancia:MontaTooltip (self, self.row_id)
end
if (_IsControlKeyDown()) then
if (not self.showing_alltargets) then
self.showing_alltargets = true
local instancia = _detalhes:GetInstance (self.instance_id)
instancia:MontaTooltip (self, self.row_id, "ctrl")
end
elseif (self.showing_alltargets) then
self.showing_alltargets = false
local instancia = _detalhes:GetInstance (self.instance_id)
instancia:MontaTooltip (self, self.row_id)
end
if (_IsAltKeyDown()) then
if (not self.showing_allpets) then
self.showing_allpets = true
local instancia = _detalhes:GetInstance (self.instance_id)
instancia:MontaTooltip (self, self.row_id, "alt")
end
elseif (self.showing_allpets) then
self.showing_allpets = false
local instancia = _detalhes:GetInstance (self.instance_id)
instancia:MontaTooltip (self, self.row_id)
end
end
local function barra_scripts (esta_barra, instancia, i)
esta_barra:SetScript ("OnEnter", function (self)
@@ -1232,6 +1277,9 @@ local function barra_scripts (esta_barra, instancia, i)
tile = true, tileSize = 16,
insets = {left = 1, right = 1, top = 0, bottom = 1},})
self:SetBackdropColor (0.588, 0.588, 0.588, 0.7)
self:SetScript ("OnUpdate", shift_monitor)
end)
esta_barra:SetScript ("OnLeave", function (self)
@@ -1247,6 +1295,10 @@ local function barra_scripts (esta_barra, instancia, i)
self:SetBackdropBorderColor (0, 0, 0, 0)
self:SetBackdropColor (0, 0, 0, 0)
self.showing_allspells = false
self:SetScript ("OnUpdate", nil)
end)
esta_barra:SetScript ("OnMouseDown", function (self, button)
@@ -1361,6 +1413,7 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
baseframe.isResizing = true
baseframe.isStretching = true
baseframe:SetFrameStrata ("TOOLTIP")
instancia.rowframe:SetFrameStrata ("TOOLTIP")
local _r, _g, _b, _a = baseframe:GetBackdropColor()
gump:GradientEffect ( baseframe, "frame", _r, _g, _b, _a, _r, _g, _b, 0.9, 1.5)
@@ -1408,6 +1461,7 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
esta_instancia.baseframe.isResizing = true
esta_instancia.baseframe.isStretching = true
esta_instancia.baseframe:SetFrameStrata ("TOOLTIP")
esta_instancia.rowframe:SetFrameStrata ("TOOLTIP")
local _r, _g, _b, _a = esta_instancia.baseframe:GetBackdropColor()
gump:GradientEffect ( esta_instancia.baseframe, "frame", _r, _g, _b, _a, _r, _g, _b, 0.9, 1.5)
@@ -1466,6 +1520,7 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
end
esta_instancia.baseframe:SetFrameStrata (baseframe_strata)
esta_instancia.rowframe:SetFrameStrata (baseframe_strata)
esta_instancia.baseframe.button_stretch:SetFrameStrata ("FULLSCREEN")
_detalhes:SendEvent ("DETAILS_INSTANCE_ENDSTRETCH", nil, esta_instancia.baseframe)
end
@@ -1483,6 +1538,7 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
end
baseframe:SetFrameStrata (baseframe_strata)
instancia.rowframe:SetFrameStrata (baseframe_strata)
baseframe.button_stretch:SetFrameStrata ("FULLSCREEN")
_detalhes:SnapTextures (false)
@@ -1843,7 +1899,7 @@ function _detalhes:InstanceMsg (text, icon, textcolor, icontexture, iconcoords,
end
end
--> inicio
--> inicio ~janela ~window
function gump:CriaJanelaPrincipal (ID, instancia, criando)
-- main frames -----------------------------------------------------------------------------------------------------------------------------------------------
@@ -1860,6 +1916,12 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
backgroundframe.instance = instancia
backgrounddisplay.instance = instancia
local rowframe = CreateFrame ("frame", "DetailsRowFrame"..ID, _UIParent) --> main frame
rowframe:SetAllPoints (baseframe)
rowframe:SetFrameStrata (baseframe_strata)
rowframe:SetFrameLevel (2)
instancia.rowframe = rowframe
local switchbutton = gump:NewDetailsButton (backgrounddisplay, baseframe, _, function() end, nil, nil, 1, 1, "", "", "", "",
{rightFunc = {func = function() _detalhes.switch:ShowMe (instancia) end, param1 = nil, param2 = nil}})
@@ -2297,8 +2359,11 @@ _detalhes.barras_criadas = 0
function gump:CriaNovaBarra (instancia, index)
local baseframe = instancia.baseframe
local esta_barra = CreateFrame ("button", "DetailsBarra_"..instancia.meu_id.."_"..index, baseframe)
local rowframe = instancia.rowframe
local esta_barra = CreateFrame ("button", "DetailsBarra_"..instancia.meu_id.."_"..index, rowframe)
esta_barra.row_id = index
esta_barra.instance_id = instancia.meu_id
local y = instancia.row_height*(index-1)
if (instancia.bars_grow_direction == 1) then
@@ -2393,13 +2458,14 @@ function gump:CriaNovaBarra (instancia, index)
--> inicia os scripts da barra
barra_scripts (esta_barra, instancia, index)
gump:Fade (esta_barra, 1) --> hida a barra
--> hida a barra
gump:Fade (esta_barra, 1)
return esta_barra
end
function _detalhes:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass, rightcolorbyclass, leftoutline, rightoutline)
function _detalhes:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass, rightcolorbyclass, leftoutline, rightoutline, customrighttextenabled, customrighttext)
--> size
if (size) then
@@ -2439,6 +2505,14 @@ function _detalhes:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass,
self.row_info.textR_outline = rightoutline
end
--custom right text
if (type (customrighttextenabled) == "boolean") then
self.row_info.textR_enable_custom_text = customrighttextenabled
end
if (customrighttext) then
self.row_info.textR_custom_text = customrighttext
end
self:InstanceReset()
self:InstanceRefreshRows()
end
@@ -2557,7 +2631,11 @@ function _detalhes:InstanceRefreshRows (instancia)
local no_icon = self.row_info.no_icon
local icon_texture = self.row_info.icon_file
local start_after_icon = self.row_info.start_after_icon
--custom right text
local custom_right_text_enabled = self.row_info.textR_enable_custom_text
local custom_right_text = self.row_info.textR_custom_text
-- do it
for _, row in _ipairs (self.barras) do
@@ -2772,41 +2850,71 @@ end
function _detalhes:SetWindowAlphaForInteract (alpha)
local ignorebars = self.menu_alpha.ignorebars
if (self.is_interacting) then
--> entrou
self.baseframe:SetAlpha (alpha)
if (ignorebars) then
self.rowframe:SetAlpha (1)
else
self.rowframe:SetAlpha (alpha)
end
else
--> saiu
if (self.combat_changes_alpha) then --> combat alpha
self.baseframe:SetAlpha (self.combat_changes_alpha)
self.rowframe:SetAlpha (self.combat_changes_alpha) --alpha do combate é absoluta
else
self.baseframe:SetAlpha (alpha)
if (ignorebars) then
self.rowframe:SetAlpha (1)
else
self.rowframe:SetAlpha (alpha)
end
end
end
end
function _detalhes:SetWindowAlphaForCombat (entering_in_combat)
local amount
local amount, rowsamount
--get the values
if (entering_in_combat) then
amount = self.hide_in_combat_alpha / 100
self.combat_changes_alpha = amount
rowsamount = amount
else
if (self.menu_alpha.enabled) then --auto transparency
if (self.is_interacting) then
amount = self.menu_alpha.onenter
if (self.menu_alpha.ignorebars) then
rowsamount = 1
else
rowsamount = amount
end
else
amount = self.menu_alpha.onleave
if (self.menu_alpha.ignorebars) then
rowsamount = 1
else
rowsamount = amount
end
end
else
amount = self.color [4]
rowsamount = 1
end
self.combat_changes_alpha = nil
end
--apply
gump:Fade (self.baseframe, "ALPHAANIM", amount)
gump:Fade (self.rowframe, "ALPHAANIM", rowsamount)
if (self.show_statusbar) then
self.baseframe.barra_fundo:Hide()
@@ -4075,6 +4183,13 @@ function _detalhes:ChangeSkin (skin_name)
else
self.baseframe.cabecalho.ball:SetAlpha (self.color[4])
end
----------> update abbreviation function on the class files
_detalhes.atributo_damage:UpdateSelectedToKFunction()
_detalhes.atributo_heal:UpdateSelectedToKFunction()
_detalhes.atributo_energy:UpdateSelectedToKFunction()
_detalhes.atributo_misc:UpdateSelectedToKFunction()
----------> call widgets handlers
self:SetBarSettings (self.row_info.height)
@@ -4138,6 +4253,10 @@ function _detalhes:ChangeSkin (skin_name)
self:AttributeMenu()
self:LeftMenuAnchorSide()
--> update window strata level
self:SetFrameStrata()
--> update icons
_detalhes.ToolBar:ReorganizeIcons (nil, true) --call self:SetMenuAlpha()
--> refresh options panel if opened
@@ -4148,7 +4267,7 @@ function _detalhes:ChangeSkin (skin_name)
if (not just_updating or _detalhes.initializing) then
if (this_skin.callback) then
this_skin:callback (self)
this_skin:callback (self, just_updating)
end
if (this_skin.control_script) then
@@ -4165,6 +4284,19 @@ function _detalhes:ChangeSkin (skin_name)
end
function _detalhes:SetFrameStrata (strata)
if (not strata) then
strata = self.strata
end
self.strata = strata
self.rowframe:SetFrameStrata (strata)
self.baseframe:SetFrameStrata (strata)
end
function _detalhes:LeftMenuAnchorSide (side)
if (not side) then
@@ -4177,8 +4309,8 @@ function _detalhes:LeftMenuAnchorSide (side)
end
-- ~attributemenu
function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side)
-- ~attributemenu (text with attribute name)
function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side, shadow)
if (type (enabled) ~= "boolean") then
enabled = self.attribute_text.enabled
@@ -4207,6 +4339,10 @@ function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side
side = self.attribute_text.side
end
if (type (shadow) ~= "boolean") then
shadow = self.attribute_text.shadow
end
self.attribute_text.enabled = enabled
self.attribute_text.anchor [1] = pos_x
self.attribute_text.anchor [2] = pos_y
@@ -4214,6 +4350,7 @@ function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side
self.attribute_text.text_size = size
self.attribute_text.text_color = color
self.attribute_text.side = side
self.attribute_text.shadow = shadow
--> enabled
if (not enabled and self.menu_attribute_string) then
@@ -4222,6 +4359,11 @@ function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side
return
end
--> protection against failed clean up framework table
if (self.menu_attribute_string and not getmetatable (self.menu_attribute_string)) then
self.menu_attribute_string = nil
end
if (not self.menu_attribute_string) then
local label = gump:NewLabel (self.floatingframe, nil, "DetailsAttributeStringInstance" .. self.meu_id, nil, "", "GameFontHighlightSmall")
@@ -4241,7 +4383,7 @@ function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side
_detalhes:RegisterEvent (self.menu_attribute_string, "DETAILS_INSTANCE_CHANGEATTRIBUTE", self.menu_attribute_string.OnEvent)
end
self.menu_attribute_string:Show()
--> anchor
@@ -4277,6 +4419,9 @@ function _detalhes:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side
--color
_detalhes:SetFontColor (self.menu_attribute_string, color)
--shadow
_detalhes:SetFontOutline (self.menu_attribute_string, shadow)
end
-- ~backdrop
@@ -4303,7 +4448,7 @@ function _detalhes:SetBackdropTexture (texturename)
end
-- ~alpha
-- ~alpha (transparency of buttons on the toolbar)
function _detalhes:SetAutoHideMenu (left, right, interacting)
if (interacting) then
@@ -4366,7 +4511,9 @@ function _detalhes:SetAutoHideMenu (left, right, interacting)
--auto_hide_menu = {left = false, right = false},
end
function _detalhes:SetMenuAlpha (enabled, onenter, onleave, interacting)
-- transparency for toolbar, borders and statusbar
function _detalhes:SetMenuAlpha (enabled, onenter, onleave, ignorebars, interacting)
if (interacting) then --> called from a onenter or onleave script
if (self.menu_alpha.enabled) then
@@ -4379,6 +4526,8 @@ function _detalhes:SetMenuAlpha (enabled, onenter, onleave, interacting)
return
end
--ignorebars
if (enabled == nil) then
enabled = self.menu_alpha.enabled
end
@@ -4388,13 +4537,25 @@ function _detalhes:SetMenuAlpha (enabled, onenter, onleave, interacting)
if (not onleave) then
onleave = self.menu_alpha.onleave
end
if (ignorebars == nil) then
ignorebars = self.menu_alpha.ignorebars
end
self.menu_alpha.enabled = enabled
self.menu_alpha.onenter = onenter
self.menu_alpha.onleave = onleave
self.menu_alpha.ignorebars = ignorebars
if (not enabled) then
return self:SetWindowAlphaForInteract (self.color [4])
--> aqui esta mandando setar a alpha do baseframe
self.baseframe:SetAlpha (1)
return self:InstanceColor (unpack (self.color))
--return self:SetWindowAlphaForInteract (self.color [4])
else
local r, g, b = unpack (self.color)
self:InstanceColor (r, g, b, 1)
r, g, b = unpack (self.statusbar_info.overlay)
self:StatusBarColor (r, g, b, 1)
end
if (self.is_interacting) then
@@ -5283,7 +5444,7 @@ function gump:CriaCabecalho (baseframe, instancia)
local ClosedInstances = {}
for index = 1, #_detalhes.tabela_instancias, 1 do
for index = 1, math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount), 1 do
local _this_instance = _detalhes.tabela_instancias [index]
@@ -5331,6 +5492,7 @@ function gump:CriaCabecalho (baseframe, instancia)
CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], _, true)
CoolTip:AddIcon (_detalhes.sub_atributos [atributo].icones[sub_atributo] [1], 1, 1, 20, 20, unpack (_detalhes.sub_atributos [atributo].icones[sub_atributo] [2]))
end
end
+5 -5
View File
@@ -372,23 +372,23 @@ function _detalhes:OpenWelcomeWindow ()
data_text2:SetPoint ("topleft", window, "topleft", 30, -201)
--------------- Captures
g:NewImage (window, _, "$parentCaptureDamage", "damageCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_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, _, "$parentCaptureHeal", "healCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
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, _, "$parentCaptureEnergy", "energyCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
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, _, "$parentCaptureMisc", "miscCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
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, _, "$parentCaptureAura", "auraCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
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)
+39 -15
View File
@@ -2,9 +2,7 @@ local Loc = LibStub("AceLocale-3.0"):NewLocale("Details", "enUS", true)
if not Loc then return end
--------------------------------------------------------------------------------------------------------------------------------------------
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.12.3|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: 'Minimalistic' and 'Elm UI Frame Style'. It's necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars.\n\n|cFFFFFF00-|r - Added new feature: Auto Transparency, hide or show menus, statusbar and borders when mouse enter or leaves the window.\n\n|cFFFFFF00-|r - Added new feature: Attribute Text, shows on the toolbar or statusbar the current attribute shown.\n\n|cFFFFFF00-|r - Added new fueature: Auto Hide Menu, which hide or show the menus when mouse enter or leaves the window.\n\n|cFFFFFF00-|r - Image Editor now can Flip the image without messing with the crop.\n\n|cFFFFFF00v1.12.0|r\n\n|cFFFFFF00-|r Added support to Profiles, now you can share the same config between two or more characters.\n\n|cFFFFFF00-|r - Options window now can be opened while in combat without triggering 'script ran too long' error.\n\n|cFFFFFF00-|r Added support for BattleTag friends over report window.\n\n|cFFFFFF00-|r Added pet threat to Tiny Threat plugin when out of a party or raid group.\n\n|cFFFFFF00-|r Fixed a issue with close button where it disappear without close the window when toolbar is in bottom side.\n\n|cFFFFFF00-|r Also fixed a issue where swapping toolbar positioning was sometimes making close button disappear.\n\n|cFFFFFF00-|r Fixed a problem opening options panel through minimap when there is no window opened.\n\n|cFFFFFF00v1.11.10|r\n\n|cFFFFFF00-|r Accuracy with warcraftlogs.com now is very high and okey with worldoflogs.com. Make sure the option |cFFFFDD00Time Measure|r under General Settings -> Combat is set to |cFFFFDD00Effective Time|r.\n\n|cFFFFFF00-|r Options Window has been revamped, again.\n\n|cFFFFFF00-|r Added a option for change the class icons.\n\n|cFFFFFF00-|r Added options for show Total Bar and configure it.\n\n|cFFFFFF00-|r Added a option for save a Standard Skin, new windows opened use this skin.\n\n|cFFFFFF00-|r Added a new skin: ElvUI Frame Style.\n\n|cFFFFFF00-|r When hover a spell icon under Player Details Window, the spell description is shown.\n\n|cFFFFFF00-|r Pressing Shift key on a spell bar over the Encounter Details Window, shows up the spell description.\n\n|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Added new skin: Minimalistic, a very clean one.\n\n|cFFFFFF00-|r Added a new tab called avoidance on Player Details window for tanks.\n\n|cFFFFFF00-|r Added Copy & Paste option on report window. Now you can share your dps on twitter and facebook!\n\n|cFFFFFF00-|r Added a new option for auto switch what a window shows when you enter in a combat.\n\n|cFFFFFF00-|r Fixed issue with window background alpha which was changing the value everytime the options window is opened.\n\n|cFFFFFF00-|r Fixed the gap between the bar and the window background when disabling borders.\n\n|cFFFFFF00-|r Make some improvements on Tiny Threat plugin.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs."
Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.13.0|r\n\n|cFFFFFF00-|r Added four more abbreviation types.\n\n|cFFFFFF00-|r Fixed issue where the instance menu wasnt respecting the amount limit of instances.\n\n|cFFFFFF00-|r Added options for cutomize the right text of a row.\n\n|cFFFFFF00-|r Added a option to be able to chance the framestrata of an window.\n\n|cFFFFFF00-|r Added shift, ctrl, alt interaction for rows which shows all spells, targets or pets when pressed.\n\n|cFFFFFF00-|r Fixed a issue where changing the alpha of a window makes it disappear on the next logon.\n\n|cFFFFFF00-|r Added a option for auto transparency to ignore rows.\n\n|cFFFFFF00-|r Added option to be able to set shadow on the attribute text.\n\n|cFFFFFF00-|r Fixed a issue with window snap where disabled statusbar makes a gap between the windows.\n\n|cFFFFFF00-|r Added a hidden menu on the top left corner (experimental).\n\n|cFFFFFF00v1.12.3|r\n\n|cFFFFFF00-|r - Fixed 'Healing Per Second' which wasn't working at all.\n\n|cFFFFFF00-|r - Fixed the percent amount for target of damage done where sometimes it pass 100%.\n\n|cFFFFFF00-|r - Changes on Skins: 'Minimalistic' and 'Elm UI Frame Style'. It's necessary re-apply.\n\n|cFFFFFF00-|r - Added more cooldowns and spells for Monk tank over avoidance panel.\n\n|cFFFFFF00-|r - Player avatar now is also shown on the Player Details window.\n\n|cFFFFFF00-|r - Leaving empty the the icon file box, make details use no icons on bars.\n\n|cFFFFFF00-|r - Added new feature: Auto Transparency, hide or show menus, statusbar and borders when mouse enter or leaves the window.\n\n|cFFFFFF00-|r - Added new feature: Attribute Text, shows on the toolbar or statusbar the current attribute shown.\n\n|cFFFFFF00-|r - Added new fueature: Auto Hide Menu, which hide or show the menus when mouse enter or leaves the window.\n\n|cFFFFFF00-|r - Image Editor now can Flip the image without messing with the crop.\n\n|cFFFFFF00v1.12.0|r\n\n|cFFFFFF00-|r Added support to Profiles, now you can share the same config between two or more characters.\n\n|cFFFFFF00-|r - Options window now can be opened while in combat without triggering 'script ran too long' error.\n\n|cFFFFFF00-|r Added support for BattleTag friends over report window.\n\n|cFFFFFF00-|r Added pet threat to Tiny Threat plugin when out of a party or raid group.\n\n|cFFFFFF00-|r Fixed a issue with close button where it disappear without close the window when toolbar is in bottom side.\n\n|cFFFFFF00-|r Also fixed a issue where swapping toolbar positioning was sometimes making close button disappear.\n\n|cFFFFFF00-|r Fixed a problem opening options panel through minimap when there is no window opened.\n\n|cFFFFFF00v1.11.10|r\n\n|cFFFFFF00-|r Accuracy with warcraftlogs.com now is very high and okey with worldoflogs.com. Make sure the option |cFFFFDD00Time Measure|r under General Settings -> Combat is set to |cFFFFDD00Effective Time|r.\n\n|cFFFFFF00-|r Options Window has been revamped, again.\n\n|cFFFFFF00-|r Added a option for change the class icons.\n\n|cFFFFFF00-|r Added options for show Total Bar and configure it.\n\n|cFFFFFF00-|r Added a option for save a Standard Skin, new windows opened use this skin.\n\n|cFFFFFF00-|r Added a new skin: ElvUI Frame Style.\n\n|cFFFFFF00-|r When hover a spell icon under Player Details Window, the spell description is shown.\n\n|cFFFFFF00-|r Pressing Shift key on a spell bar over the Encounter Details Window, shows up the spell description.\n\n|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Added new skin: Minimalistic, a very clean one.\n\n|cFFFFFF00-|r Added a new tab called avoidance on Player Details window for tanks.\n\n|cFFFFFF00-|r Added Copy & Paste option on report window. Now you can share your dps on twitter and facebook!\n\n|cFFFFFF00-|r Added a new option for auto switch what a window shows when you enter in a combat.\n\n|cFFFFFF00-|r Fixed issue with window background alpha which was changing the value everytime the options window is opened.\n\n|cFFFFFF00-|r Fixed the gap between the bar and the window background when disabling borders.\n\n|cFFFFFF00-|r Make some improvements on Tiny Threat plugin.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs."
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name
@@ -258,10 +256,14 @@ if not Loc then return end
Loc ["STRING_PLUGIN_SECONLY"] = "Seconds Only"
Loc ["STRING_PLUGIN_TIMEDIFF"] = "Last Combat Difference"
Loc ["STRING_PLUGIN_SEGMENTTYPE_1"] = "Show Fight #X"
Loc ["STRING_PLUGIN_SEGMENTTYPE_2"] = "Show Encounter Name"
Loc ["STRING_PLUGIN_TOOLTIP_LEFTBUTTON"] = "Config current plugin"
Loc ["STRING_PLUGIN_TOOLTIP_RIGHTBUTTON"] = "Choose another plugin"
Loc ["STRING_PLUGIN_CLOCKTYPE"] = "Clock Type"
Loc ["STRING_PLUGIN_SEGMENTTYPE"] = "Segment Type"
Loc ["STRING_PLUGIN_DURABILITY"] = "Durability"
Loc ["STRING_PLUGIN_LATENCY"] = "Latency"
@@ -391,6 +393,8 @@ if not Loc then return end
-- OPTIONS PANEL -----------------------------------------------------------------------------------------------------------------
Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"] = "There's no use trying to forget\nFor a long time in your life I will live\nDetails as small of us"
Loc ["STRING_OPTIONS_COMBATTWEEKS"] = "Combat Tweeks"
Loc ["STRING_OPTIONS_COMBATTWEEKS_DESC"] = "Behavioral adjustments on how Details! deal with some combat aspects."
@@ -423,7 +427,7 @@ if not Loc then return end
Loc ["STRING_OPTIONS_SCROLLBAR"] = "Scroll Bar"
Loc ["STRING_OPTIONS_SCROLLBAR_DESC"] = "Enable ou Disable the scroll bar.\n\nBy default, Details! scroll bars are replaced by a mechanism that stretches the window.\n\nThe |cFFFFFF00stretch handle|r is outside over instances button/menu (left of close button)."
Loc ["STRING_OPTIONS_MAXINSTANCES"] = "Max. Instances"
Loc ["STRING_OPTIONS_MAXINSTANCES_DESC"] = "Limit the number of Details! instances which can be created.\n\nYou can open and re-open instances clicking on the instance button |cFFFFFF00#X|r."
Loc ["STRING_OPTIONS_MAXINSTANCES_DESC"] = "Limit the number of Details! instances which can be created and the amount displayed on the instance button.\n\nYou can open and re-open instances clicking on the instance button |cFFFFFF00#X|r."
Loc ["STRING_OPTIONS_PVPFRAGS"] = "Only Pvp Frags"
Loc ["STRING_OPTIONS_PVPFRAGS_DESC"] = "When enabled, only kills against enemy players will be count."
Loc ["STRING_OPTIONS_MINIMAP"] = "Minimap Icon"
@@ -436,11 +440,16 @@ if not Loc then return end
Loc ["STRING_OPTIONS_HIDECOMBATALPHA_DESC"] = "The window can be completely hidden or just be more transparent."
Loc ["STRING_OPTIONS_AUTO_SWITCH"] = "Auto Switch"
Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] = "When you enter in combat, this window change for the selected attribute or plugin.\n\nLeaving the combat, it switch back."
Loc ["STRING_OPTIONS_PS_ABBREVIATE"] = "PS Abbreviation"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] = "Choose the abbreviation method for Dps and Hps.\n\n|cFFFFFF00None|r: no abbreviation, the raw number is shown.\n\n|cFFFFFF00Hundreds I|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100.0K\n19.530.000 = 19.53M\n\n|cFFFFFF00Hundreds II|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100K\n19.530.000 = 19.53M"
Loc ["STRING_OPTIONS_PS_ABBREVIATE"] = "Abbreviation Type"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] = "Choose the abbreviation method.\n\n|cFFFFFF00None|r: no abbreviation, the raw number is shown.\n\n|cFFFFFF00ToK I|r: the number is abbreviated showing the fractional-part.\n\n59874 = 59.8K\n520.600 = 520.6K\n19.530.000 = 19.53M\n\n|cFFFFFF00ToK II|r: Is the same as ToK I, but, numbers between one hundred and one million doesn't show fractional-part.\n\n59874 = 59.8K\n520.600 = 520K\n19.530.000 = 19.53M\n\n|cFFFFFF00ToM I|r: Numbers equals or biggest of one million doesn't show the fractional-part.\n\n59874 = 59.8K\n520.600 = 520.6K\n19.530.000 = 19M\n\n|cFFFFFF00Lower|r: The letters K and M are lowercase.\n\n|cFFFFFF00Upper|r: The letter K and M are uppercase."
Loc ["STRING_OPTIONS_PS_ABBREVIATE_NONE"] = "None"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK"] = "Hundrets I"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2"] = "Hundrets II"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK"] = "ToK I Upper"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2"] = "ToK II Upper"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK0"] = "ToM I Upper"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOKMIN"] = "ToK I Lower"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2MIN"] = "ToK II Lower"
Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK0MIN"] = "ToM I Lower"
Loc ["STRING_OPTIONS_PERFORMANCE1"] = "Performance Tweaks"
Loc ["STRING_OPTIONS_PERFORMANCE1_DESC"] = "This options can help save some cpu usage."
@@ -522,10 +531,10 @@ if not Loc then return end
Loc ["STRING_OPTIONS_TEXT_FONT"] = "Font"
Loc ["STRING_OPTIONS_TEXT_FONT_DESC"] = "Change the font of bar texts."
Loc ["STRING_OPTIONS_TEXT_LOUTILINE"] = "Left Text Outline"
Loc ["STRING_OPTIONS_TEXT_LOUTILINE"] = "Left Text Shadow"
Loc ["STRING_OPTIONS_TEXT_LOUTILINE_DESC"] = "Enable or Disable the outline for left text."
Loc ["STRING_OPTIONS_TEXT_ROUTILINE"] = "Right Text Outline"
Loc ["STRING_OPTIONS_TEXT_ROUTILINE"] = "Right Text Shadow"
Loc ["STRING_OPTIONS_TEXT_ROUTILINE_DESC"] = "Enable or Disable the outline for right text."
Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR"] = "Left Text Color By Class"
@@ -542,10 +551,10 @@ if not Loc then return end
Loc ["STRING_OPTIONS_INSTANCE_DESC"] = "This options control the appearance of the instance it self."
Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Window Color"
Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color and alpha of instance window."
Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color and alpha of this window.\n\n|cFFFF8800Important|r: the alpha chosen here are overwritten with |cFFFFFF00Auto Transparency|r values when enabled.\n\n|cFFFF8800Important|r: selecting the instance window color overwrite any color customization over the statusbar."
Loc ["STRING_OPTIONS_INSTANCE_BACKDROP"] = "Background Texture"
Loc ["STRING_OPTIONS_INSTANCE_BACKDROP_DESC"] = "Select the background texture used by this window."
Loc ["STRING_OPTIONS_INSTANCE_BACKDROP_DESC"] = "Select the background texture used by this window.\n\n|cFFFF8800Default|r: Details Background."
Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Background Alpha"
Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] = "This option let you change the transparency of the instance window background."
@@ -569,6 +578,11 @@ if not Loc then return end
Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON_DESC"] = "Select the icon shown on the total bar."
Loc ["STRING_OPTIONS_SHOW_TOTALBAR_COLOR_DESC"] = "Select the color. The transparency value follow the row alpha value."
Loc ["STRING_OPTIONS_BARRIGHTTEXTCUSTOM2"] = "Text"
Loc ["STRING_OPTIONS_BARRIGHTTEXTCUSTOM2_DESC"] = "The customized text shown on the right side of the bars.\n\n|cFFFF8800{data1}|r: is the first number passed, generally this number represents the total done.\n\n|cFFFF8800{data2}|r: is the second number passed, most of the times represents the per second average.\n\n|cFFFF8800{data3}|r: third number passed, normally is the percentage. \n\n|cFFFF8800{func}|r: runs a customized Lua function adding its return value to the text.\nExample: \n{func return 'hello azeroth'}\n\n|cFFFF8800Scape Sequences|r: use to change color or add textures. Search 'UI escape sequences' for more information."
Loc ["STRING_OPTIONS_BARRIGHTTEXTCUSTOM"] = "Custom Right Text Enabled"
Loc ["STRING_OPTIONS_BARRIGHTTEXTCUSTOM_DESC"] = "Enable or disable the customization of the right text in the bars."
Loc ["STRING_OPTIONS_INSTANCE_SKIN"] = "Skin"
Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] = "Modify window appearance based on a skin theme."
@@ -595,6 +609,9 @@ Loc ["STRING_OPTIONS_MENU_Y_DESC"] = "Slightly move the main menu on tooltip to
Loc ["STRING_OPTIONS_MENU_ANCHOR"] = "Menu Anchor Side"
Loc ["STRING_OPTIONS_MENU_ANCHOR_DESC"] = "Change if the left menu is attached within left side of window or in the right side."
Loc ["STRING_OPTIONS_ATTRIBUTE_TEXT"] = "Attribute Text Settings"
Loc ["STRING_OPTIONS_ATTRIBUTE_TEXT_DESC"] = "This options controls the attribute text basic settings."
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHOR"] = "Attribute Text"
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ENABLED"] = "Enabled"
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ENABLED_DESC"] = "Enable or disable the attribute name which is current shown on this instance."
@@ -610,6 +627,11 @@ Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTCOLOR"] = "Text Color"
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTCOLOR_DESC"] = "Change the attribute text color."
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SIDE"] = "Text Anchor"
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SIDE_DESC"] = "Choose where the text is anchored."
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SHADOW"] = "Shadow"
Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SHADOW_DESC"] = "Enable or disable the shadow on the text."
Loc ["STRING_OPTIONS_INSTANCE_STRATA"] = "Layer Strata"
Loc ["STRING_OPTIONS_INSTANCE_STRATA_DESC"] = "Selects the layer height that the frame will be placed on.\n\nLow layer is the default and makes the window stay behind of the most interface panels.\n\nUsing high layer the window might stay in front of the major others panels.\n\nWhen changing the layer height you may find some conflict with others panels, overlapping each other."
Loc ["STRING_OPTIONS_MENU_AUTOHIDE_ANCHOR"] = "Auto Hide Menu Buttons"
Loc ["STRING_OPTIONS_MENU_AUTOHIDE_LEFT"] = "Left Menu"
@@ -618,15 +640,17 @@ Loc ["STRING_OPTIONS_MENU_AUTOHIDE_DESC"] = "When enabled the chosen menu automa
Loc ["STRING_OPTIONS_INSTANCE_STATUSBAR_ANCHOR"] = "Statusbar"
Loc ["STRING_OPTIONS_INSTANCE_STATUSBARCOLOR"] = "Color and Transparency"
Loc ["STRING_OPTIONS_INSTANCE_STATUSBARCOLOR_DESC"] = "This option overwrite the default statusbar color and transparency."
Loc ["STRING_OPTIONS_INSTANCE_STATUSBARCOLOR_DESC"] = "Select the color used by the statusbar.\n\n|cFFFF8800Important|r: this option overwrite the color and transparency chosen over Window Color."
Loc ["STRING_OPTIONS_MENU_ALPHA"] = "Auto Transparency:"
Loc ["STRING_OPTIONS_MENU_ALPHAENABLED"] = "Enabled"
Loc ["STRING_OPTIONS_MENU_ALPHAENTER"] = "When Interacting"
Loc ["STRING_OPTIONS_MENU_ALPHALEAVE"] = "Stand by"
Loc ["STRING_OPTIONS_MENU_ALPHAICONSTOO"] = "Affect Buttons"
Loc ["STRING_OPTIONS_MENU_IGNOREBARS"] = "Ignore Rows"
Loc ["STRING_OPTIONS_MENU_ALPHAENABLED_DESC"] = "Enable or disable the auto transparency. When enabled, the alpha changes automatically when you hover and leave the window.\n\nThis settings overwrite the alpha selected over window settings."
Loc ["STRING_OPTIONS_MENU_IGNOREBARS_DESC"] = "When enabled, all rows on this window aren't affected by this mechanism."
Loc ["STRING_OPTIONS_MENU_ALPHAENABLED_DESC"] = "Enable or disable the auto transparency. When enabled, the alpha changes automatically when you hover and leave the window.\n\n|cFFFF8800Important|r: This settings overwrites the alpha selected over Window Color."
Loc ["STRING_OPTIONS_MENU_ALPHAENTER_DESC"] = "When you have the mouse over the window, the transparency changes to this value."
Loc ["STRING_OPTIONS_MENU_ALPHALEAVE_DESC"] = "When you don't have the mouse over the window, the transparency changes to this value."
Loc ["STRING_OPTIONS_MENU_ALPHAICONSTOO_DESC"] = "If enabled, all icons, buttons, also have their alpha affected by this feature."
@@ -668,7 +692,7 @@ Loc ["STRING_OPTIONS_CLOSE_OVERLAY"] = "Overlay Color"
Loc ["STRING_OPTIONS_CLOSE_OVERLAY_DESC"] = "Change the close button overlay color."
Loc ["STRING_OPTIONS_STRETCH"] = "Stretch Button Anchor"
Loc ["STRING_OPTIONS_STRETCH_DESC"] = "Alternate the stretch button position.\n\nTop: the grab is placed on the top right corner.\n\nBottom: the grab is placed on the bottom center."
Loc ["STRING_OPTIONS_STRETCH_DESC"] = "Alternate the stretch button position.\n\n|cFFFFFF00Top|r: the grab is placed on the top right corner.\n\n|cFFFFFF00Bottom|r: the grab is placed on the bottom center."
Loc ["STRING_OPTIONS_PICONS_DIRECTION"] = "Plugin Icons Direction"
Loc ["STRING_OPTIONS_PICONS_DIRECTION_DESC"] = "Change the direction which plugins icons are displayed on the toolbar."
File diff suppressed because one or more lines are too long
@@ -670,6 +670,10 @@ function EncounterDetails:OpenAndRefresh (_, segment)
map_id = _combat_object.is_boss.mapid
boss_info = _detalhes:GetBossDetails (_combat_object.is_boss.mapid, _combat_object.is_boss.index)
if (not boss_info) then
return EncounterDetails:Msg (Loc ["STRING_BOSS_NOT_REGISTRED"])
end
-------------- set boss name and zone name --------------
EncounterDetailsFrame.boss_name:SetText (_combat_object.is_boss.encounter)
EncounterDetailsFrame.raid_name:SetText (_combat_object.is_boss.zone)
@@ -35,6 +35,8 @@ Loc ["STRING_TOOLTIP"] = "Show Encounter Details Window"
Loc ["STRING_LAST_COOLDOWN"] = "last cooldown used"
Loc ["STRING_NOLAST_COOLDOWN"] = "no cooldown used"
Loc ["STRING_BOSS_NOT_REGISTRED"] = "This encounter isn't registred on Details!\nMake sure this raid is enabled over addon control panel on the character selection screen."
Loc ["STRING_HOLDSHIFT"] = "SHIFT For Spell Description"
Loc ["STRING_ADDS_HELP"] = "Mouse over |cFF00FF00Arrow Up|r\nfor dmg received, |cFFFF0000Arrow\n|cFFFF0000Down|r for dmg dealt. |cFFFFFF00Click\n|cFFFFFF00Arrow|r: Report the data\nshown on tooltip."
@@ -104,24 +104,6 @@ local function CreatePluginFrames (data)
ThreatMeterFrame:SetWidth (300)
ThreatMeterFrame:SetHeight (100)
--[[
ThreatMeterFrame:SetBackdrop ({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true, tileSize = 16,
insets = {left = 1, right = 1, top = 0, bottom = 1},})
ThreatMeterFrame:SetBackdropColor (.3, .3, .3, .3)
local icon1 = DetailsFrameWork:NewImage (ThreatMeterFrame, nil, nil, "titleIcon", 64, 64, "Interface\\HELPFRAME\\HelpIcon-ItemRestoration")
icon1:SetPoint (10, -10)
local title = DetailsFrameWork:NewLabel (ThreatMeterFrame, nil, nil, "titleText", "Tiny Threat", "CoreAbilityFont", 26)
title:SetPoint ("left", icon1, "right", 2)
title.color = "white"
DetailsFrameWork:Fade (icon1, 1)
DetailsFrameWork:Fade (title, 1)
local title2 = DetailsFrameWork:NewLabel (ThreatMeterFrame, nil, nil, "titleText2", "A (very) small threat meter.", "GameFontHighlightSmall", 9)
title2:SetPoint ("bottomright", title, "bottomright", 0, -10)
--]]
function ThreatMeter:UpdateContainers()
for _, row in _ipairs (ThreatMeter.Rows) do
row:SetContainer (instance.baseframe)
+11 -11
View File
@@ -361,7 +361,7 @@ local function CreatePluginFrames (data)
local healPerSecondNumber = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHealHealHpsAmount", nil, "0", "GameFontHighlightSmall", 9.5)
healPerSecondNumber:SetPoint ("left", healPerSecond, "right", 2)
local icon1 = DetailsFrameWork:NewImage (infoFrame, nil, "VanguardInfoHealTop1Icon", nil, 14, 14)
local icon1 = DetailsFrameWork:NewImage (infoFrame, nil, 14, 14, nil, nil, nil, "VanguardInfoHealTop1Icon")
local topHealer1 = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHealTop1", nil, "", "GameFontHighlightSmall", 9.5)
topHealer1:SetWidth (80)
topHealer1:SetHeight (10)
@@ -370,7 +370,7 @@ local function CreatePluginFrames (data)
topHealer1:SetPoint ("left", icon1, "right", 2)
topHealer1Amount:SetPoint ("left", topHealer1, "right", 2)
local icon2 = DetailsFrameWork:NewImage (infoFrame, nil, "VanguardInfoHealTop2Icon", nil, 14, 14)
local icon2 = DetailsFrameWork:NewImage (infoFrame, nil, 14, 14, nil, nil, nil, "VanguardInfoHealTop2Icon")
local topHealer2 = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHealTop2", nil, "", "GameFontHighlightSmall", 9.5)
topHealer2:SetWidth (80)
topHealer2:SetHeight (10)
@@ -379,7 +379,7 @@ local function CreatePluginFrames (data)
topHealer2:SetPoint ("left", icon2, "right", 2)
topHealer2Amount:SetPoint ("left", topHealer2, "right", 2)
local icon3 = DetailsFrameWork:NewImage (infoFrame, nil, "VanguardInfoHealTop3Icon", nil, 14, 14)
local icon3 = DetailsFrameWork:NewImage (infoFrame, nil, 14, 14, nil, nil, nil, "VanguardInfoHealTop3Icon")
local topHealer3 = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHealTop3", nil, "", "GameFontHighlightSmall", 9.5)
topHealer3:SetWidth (80)
topHealer3:SetHeight (10)
@@ -388,7 +388,7 @@ local function CreatePluginFrames (data)
topHealer3:SetPoint ("left", icon3, "right", 2)
topHealer3Amount:SetPoint ("left", topHealer3, "right", 2)
local icon4 = DetailsFrameWork:NewImage (infoFrame, nil, "VanguardInfoHealTop4Icon", nil, 14, 14)
local icon4 = DetailsFrameWork:NewImage (infoFrame, nil, 14, 14, nil, nil, nil, "VanguardInfoHealTop4Icon")
local topHealer4 = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHealTop4", nil, "", "GameFontHighlightSmall", 9.5)
topHealer4:SetWidth (80)
topHealer4:SetHeight (10)
@@ -758,7 +758,7 @@ local function CreatePluginFrames (data)
life:SetFrameLevel (-1, Frame)
ThisBoxObject.Life = life
local tanknameTexture = DetailsFrameWork:NewImage (Frame, Frame, "DetailsVanguardTankName"..i.."bG", "tanknamebg", 80, 10, "Interface\\ACHIEVEMENTFRAME\\UI-Achievement-Parchment-Highlight")
local tanknameTexture = DetailsFrameWork:NewImage (Frame, "Interface\\ACHIEVEMENTFRAME\\UI-Achievement-Parchment-Highlight", 80, 10, nil, nil, "tanknamebg", "DetailsVanguardTankName"..i.."bG" )
tanknameTexture:SetTexCoord (0.15234375, 0.82421875, 0, 0.2734375)
tanknameTexture:SetPoint ("center", Frame)
@@ -772,7 +772,7 @@ local function CreatePluginFrames (data)
-------------------------------------------------------------------------------------
local Icon1 = DetailsFrameWork:NewImage (Frame, Vanguard, "DetailsVanguardFrameBox"..i.."Icon1", nil, 24, 24, "Interface\\ICONS\\Ability_Creature_Amber_02")
local Icon1 = DetailsFrameWork:NewImage (Frame, "Interface\\ICONS\\Ability_Creature_Amber_02", 24, 24, nil, nil, nil, "DetailsVanguardFrameBox"..i.."Icon1")
Icon1:SetDrawLayer ("overlay", 1)
Icon1:SetPoint ("bottomleft", ThisBoxObject.Frame.frame, 4, 3)
@@ -786,7 +786,7 @@ local function CreatePluginFrames (data)
local Icon1Text = DetailsFrameWork:NewLabel (ThisBoxObject.Frame.frame, Vanguard, "DetailsVanguardFrameBox"..i.."Text1", nil, "25", "GameFontHighlightLarge", 18, {1, 1, 0, 1})
Icon1Text:SetPoint ("center", Icon1, "center")
local blackbg1 = DetailsFrameWork:NewImage (Frame, Vanguard, "DetailsVanguardFrameBox"..i.."BlackBG1", nil, 12, 12)
local blackbg1 = DetailsFrameWork:NewImage (Frame, nil, 12, 12, nil, nil, nil, "DetailsVanguardFrameBox"..i.."BlackBG1")
blackbg1:SetDrawLayer ("overlay", 2)
blackbg1:SetTexture (0, 0, 0, 1)
blackbg1:SetPoint ("bottomright", Icon1, 5, -5)
@@ -802,7 +802,7 @@ local function CreatePluginFrames (data)
-------------------------------------------------------------------------------------
local Icon2 = DetailsFrameWork:NewImage (Frame, Vanguard, "DetailsVanguardFrameBox"..i.."Icon2", nil, 24, 24, "Interface\\ICONS\\Ability_Creature_Amber_02")
local Icon2 = DetailsFrameWork:NewImage (Frame, "Interface\\ICONS\\Ability_Creature_Amber_02", 24, 24, nil, nil, nil, "DetailsVanguardFrameBox"..i.."Icon2")
Icon2:SetDrawLayer ("overlay", 1)
Icon2:SetPoint ("bottomleft", Frame, 37, 3)
@@ -816,7 +816,7 @@ local function CreatePluginFrames (data)
local Icon2Text = DetailsFrameWork:NewLabel (Frame, Vanguard, "DetailsVanguardFrameBox"..i.."Text2", nil, "3", "GameFontHighlightLarge", 18, {1, 1, 0, 1})
Icon2Text:SetPoint ("center", Icon2, "center")
local blackbg2 = DetailsFrameWork:NewImage (Frame, Vanguard, "DetailsVanguardFrameBox"..i.."BlackBG2", nil, 12, 12)
local blackbg2 = DetailsFrameWork:NewImage (Frame, nil, 12, 12, nil, nil, nil, "DetailsVanguardFrameBox"..i.."BlackBG2")
blackbg2:SetDrawLayer ("overlay", 2)
blackbg2:SetTexture (0, 0, 0, 1)
blackbg2:SetPoint ("bottomright", Icon2, 5, -5)
@@ -832,7 +832,7 @@ local function CreatePluginFrames (data)
-------------------------------------------------------------------------------------
local Icon3 = DetailsFrameWork:NewImage (Frame, Vanguard, "DetailsVanguardFrameBox"..i.."Icon3", nil, 24, 24, "Interface\\ICONS\\Ability_Creature_Amber_02")
local Icon3 = DetailsFrameWork:NewImage (Frame, "Interface\\ICONS\\Ability_Creature_Amber_02", 24, 24, nil, nil, nil, "DetailsVanguardFrameBox"..i.."Icon3")
Icon3:SetDrawLayer ("overlay", 1)
Icon3:SetPoint ("bottomleft", ThisBoxObject.Frame.frame, 70, 3)
@@ -846,7 +846,7 @@ local function CreatePluginFrames (data)
local Icon3Text = DetailsFrameWork:NewLabel (ThisBoxObject.Frame.frame, Vanguard, "DetailsVanguardFrameBox"..i.."Text3", nil, "5", "GameFontHighlightLarge", 18, {1, 1, 0, 1})
Icon3Text:SetPoint ("center", Icon3, "center")
local blackbg3 = DetailsFrameWork:NewImage (Frame, Vanguard, "DetailsVanguardFrameBox"..i.."BlackBG3", nil, 12, 12)
local blackbg3 = DetailsFrameWork:NewImage (Frame, nil, 12, 12, nil, nil, nil, "DetailsVanguardFrameBox"..i.."BlackBG3")
blackbg3:SetDrawLayer ("overlay", 2)
blackbg3:SetTexture (0, 0, 0, 1)
blackbg3:SetPoint ("bottomright", Icon3, 5, -5)
@@ -105,7 +105,7 @@ local function CreatePluginFrames()
c:SetFrameLevel (YouAreNotPreparedFrame:GetFrameLevel()+1)
--background image
local b = DetailsFrameWork:NewImage (YouAreNotPreparedFrame, nil, "$parentBackground", nil, 512, 256, [[Interface\AddOns\Details_YouAreNotPrepared\background]])
local b = DetailsFrameWork:NewImage (YouAreNotPreparedFrame, [[Interface\AddOns\Details_YouAreNotPrepared\background]], 512, 256, nil, nil, nil, "$parentBackground")
b:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft")
--title
@@ -256,7 +256,7 @@ local function CreatePluginFrames()
b_texture:SetDesaturated (true)
button.widget.b_texture = b_texture
local icon = DetailsFrameWork:NewImage (button, _, "$parentIcon", "icon", 20, 20)
local icon = DetailsFrameWork:NewImage (button, nil, 20, 20, nil, nil, "icon", "$parentIcon")
icon:SetTexCoord (0, 0.4921875, 0, 0.4921875) --0.0078125
icon:SetPoint ("left", button, "left", 1, 0)
icon.texture = [[Interface\WorldStateFrame\SkullBones]]
+43 -2
View File
@@ -7,8 +7,40 @@
function _G._detalhes:Start()
-- slider de scale nas opções
--teste de box
--[[
local f = CreateFrame ("frame", "TestBoxFrame", UIParent)
f:SetPoint ("center", UIParent, "center")
f:SetSize (256, 256)
f:SetMovable (true)
local t = f:CreateTexture (nil, "artwork")
t:SetSize (90, 90)
t:SetPoint ("topleft", f, "topleft")
t:SetTexture ("Interface\\Addons\\Details\\box")
t:SetTexCoord (0.29296875, 0.64453125, 0.265625-0.001953125, 0.6171875+0.001953125) -- 75 68 165 158 0.001953125 //
local left = f:CreateFontString (nil, "overlay", "GameFontNormal")
local right = f:CreateFontString (nil, "overlay", "GameFontNormal")
local top = f:CreateFontString (nil, "overlay", "GameFontNormal")
local bottom = f:CreateFontString (nil, "overlay", "GameFontNormal")
left:SetPoint ("right", t, "left", -20, 0)
right:SetPoint ("left", t, "right", 20, 0)
top:SetPoint ("bottom", t, "top", 0, 20)
bottom:SetPoint ("top", t, "bottom", 0, -20)
function f:UpdateLeftRight()
left:SetText ("left: " .. string.format ("%.3f", t:GetLeft()))
right:SetText ("right: " .. string.format ("%.3f", t:GetRight()))
top:SetText ("top: " .. string.format ("%.3f", t:GetTop()))
bottom:SetText ("bottom: " .. string.format ("%.3f", t:GetBottom()))
end
f:UpdateLeftRight()
f:SetScript ("OnMouseDown", function() f:StartMoving(); f:SetScript("OnUpdate", function() f:UpdateLeftRight() end) end)
f:SetScript ("OnMouseUp", function() f:StopMovingOrSizing(); f:SetScript("OnUpdate", nil); f:UpdateLeftRight() end)
--]]
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> details defaults
@@ -82,6 +114,12 @@ function _G._detalhes:Start()
--> start time machine
self.timeMachine:Ligar()
--> update abbreviation shorcut
self.atributo_damage:UpdateSelectedToKFunction()
self.atributo_heal:UpdateSelectedToKFunction()
self.atributo_energy:UpdateSelectedToKFunction()
self.atributo_misc:UpdateSelectedToKFunction()
--> start instances updater
self:AtualizaGumpPrincipal (-1, true)
@@ -550,6 +588,9 @@ function _G._detalhes:Start()
end
end
--register lib-hotcorners
_detalhes:RegisterHotCornerButton ("TOPLEFT", "DetailsLeftCornerButton", [[Interface\AddOns\Details\images\minimap]], "|cFFFFFFFFDetails!\n|cFF00FF00Left Click:|r clear all segments.", function() _detalhes.tabela_historico:resetar() end)
--[[
local f = CreateFrame ("frame", nil, UIParent)