- solo mode will resize the frame if isn't on the correct size.
- new tutorials added to main frame and main frame gear meni. - blizzard help system added to the frame work. - added panic mode and max segments to save options. - fixed a bug where wallpaper isn't change on apply to all. - Vanguard frames are na resizables. - Report button added to Vanguard avoindace info. - Vanguard also now have better tooltips explaining things. - New logo added to tiny threat. - Fixed an issue with dropdowns where no options shown up.
This commit is contained in:
@@ -48,7 +48,7 @@ combate.__call = _detalhes.call_combate
|
||||
--[[ Class Constructor ]]
|
||||
function combate:NovaTabela (iniciada, _tabela_overall, combatId, ...)
|
||||
|
||||
local esta_tabela = {}
|
||||
local esta_tabela = {true, true, true, true, true}
|
||||
|
||||
esta_tabela [1] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_DAMAGE_CLASS, esta_tabela, combatId) --> Damage
|
||||
esta_tabela [2] = container_combatentes:NovoContainer (_detalhes.container_type.CONTAINER_HEAL_CLASS, esta_tabela, combatId) --> Healing
|
||||
|
||||
@@ -833,12 +833,21 @@ function _detalhes:RestauraJanela (index, temp)
|
||||
self.StatusBar.right = nil
|
||||
self.StatusBar.options = self.StatusBarSaved.options
|
||||
|
||||
if (self.StatusBarSaved.center and self.StatusBarSaved.center == "NONE") then
|
||||
self.StatusBarSaved.center = "DETAILS_STATUSBAR_PLUGIN_CLOCK"
|
||||
end
|
||||
local clock = _detalhes.StatusBar:CreateStatusBarChildForInstance (self, self.StatusBarSaved.center or "DETAILS_STATUSBAR_PLUGIN_CLOCK")
|
||||
_detalhes.StatusBar:SetCenterPlugin (self, clock)
|
||||
|
||||
if (self.StatusBarSaved.left and self.StatusBarSaved.left == "NONE") then
|
||||
self.StatusBarSaved.left = "DETAILS_STATUSBAR_PLUGIN_PSEGMENT"
|
||||
end
|
||||
local segment = _detalhes.StatusBar:CreateStatusBarChildForInstance (self, self.StatusBarSaved.left or "DETAILS_STATUSBAR_PLUGIN_PSEGMENT")
|
||||
_detalhes.StatusBar:SetLeftPlugin (self, segment)
|
||||
|
||||
if (self.StatusBarSaved.right and self.StatusBarSaved.right == "NONE") then
|
||||
self.StatusBarSaved.right = "DETAILS_STATUSBAR_PLUGIN_PDPS"
|
||||
end
|
||||
local dps = _detalhes.StatusBar:CreateStatusBarChildForInstance (self, self.StatusBarSaved.right or "DETAILS_STATUSBAR_PLUGIN_PDPS")
|
||||
_detalhes.StatusBar:SetRightPlugin (self, dps)
|
||||
--
|
||||
|
||||
+17
-1
@@ -366,6 +366,14 @@
|
||||
|
||||
local historico_tabelas = _detalhes.tabela_historico.tabelas or {}
|
||||
|
||||
if (_detalhes.segments_amount_to_save and _detalhes.segments_amount_to_save < _detalhes.segments_amount) then
|
||||
for i = _detalhes.segments_amount, _detalhes.segments_amount_to_save+1, -1 do
|
||||
if (_detalhes.tabela_historico.tabelas [i]) then
|
||||
_detalhes.tabela_historico.tabelas [i] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--local tabela_overall = _detalhes.tabela_overall
|
||||
_detalhes.tabela_overall = nil
|
||||
|
||||
@@ -621,8 +629,16 @@
|
||||
end
|
||||
end
|
||||
|
||||
--> Limpa instâncias
|
||||
|
||||
--> panic mode
|
||||
if (_detalhes.segments_panic_mode and _detalhes.in_combat) then
|
||||
if (_detalhes.tabela_vigente.is_boss) then
|
||||
_detalhes.tabela_historico = _detalhes.historico:NovoHistorico()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--> Limpa instâncias
|
||||
for _, esta_instancia in _ipairs (_detalhes.tabela_instancias) do
|
||||
--> detona a janela do Solo Mode
|
||||
|
||||
|
||||
+28
-24
@@ -357,35 +357,39 @@
|
||||
|
||||
function gump:Fade (frame, tipo, velocidade, parametros)
|
||||
|
||||
if (_type (frame) == "table" and frame.meu_id) then --> ups, é uma instância
|
||||
if (parametros == "barras") then --> hida todas as barras da instância
|
||||
if (velocidade) then
|
||||
for i = 1, frame.barrasInfo.criadas, 1 do
|
||||
gump:Fade (frame.barras[i], tipo, velocidade)
|
||||
if (_type (frame) == "table") then
|
||||
if (frame.meu_id) then --> ups, é uma instância
|
||||
if (parametros == "barras") then --> hida todas as barras da instância
|
||||
if (velocidade) then
|
||||
for i = 1, frame.barrasInfo.criadas, 1 do
|
||||
gump:Fade (frame.barras[i], tipo, velocidade)
|
||||
end
|
||||
return
|
||||
else
|
||||
velocidade = velocidade or 0.3
|
||||
for i = 1, frame.barrasInfo.criadas, 1 do
|
||||
gump:Fade (frame.barras[i], tipo, 0.3+(i/10))
|
||||
end
|
||||
return
|
||||
end
|
||||
return
|
||||
else
|
||||
velocidade = velocidade or 0.3
|
||||
elseif (parametros == "hide_barras") then --> hida todas as barras da instância
|
||||
for i = 1, frame.barrasInfo.criadas, 1 do
|
||||
gump:Fade (frame.barras[i], tipo, 0.3+(i/10))
|
||||
local esta_barra = frame.barras[i]
|
||||
if (esta_barra.fading_in or esta_barra.fading_out) then
|
||||
esta_barra.fadeInfo.finishedFunc = nil
|
||||
_UIFrameFadeIn (esta_barra, 0.01, esta_barra:GetAlpha(), esta_barra:GetAlpha())
|
||||
end
|
||||
esta_barra.hidden = true
|
||||
esta_barra.faded = true
|
||||
esta_barra.fading_in = false
|
||||
esta_barra.fading_out = false
|
||||
esta_barra:Hide()
|
||||
esta_barra:SetAlpha(0)
|
||||
end
|
||||
return
|
||||
end
|
||||
elseif (parametros == "hide_barras") then --> hida todas as barras da instância
|
||||
for i = 1, frame.barrasInfo.criadas, 1 do
|
||||
local esta_barra = frame.barras[i]
|
||||
if (esta_barra.fading_in or esta_barra.fading_out) then
|
||||
esta_barra.fadeInfo.finishedFunc = nil
|
||||
_UIFrameFadeIn (esta_barra, 0.01, esta_barra:GetAlpha(), esta_barra:GetAlpha())
|
||||
end
|
||||
esta_barra.hidden = true
|
||||
esta_barra.faded = true
|
||||
esta_barra.fading_in = false
|
||||
esta_barra.fading_out = false
|
||||
esta_barra:Hide()
|
||||
esta_barra:SetAlpha(0)
|
||||
end
|
||||
return
|
||||
elseif (frame.dframework) then
|
||||
frame = frame.widget
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
--> details main objects
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
--> lua locals
|
||||
local _rawset = rawset --> lua local
|
||||
@@ -161,6 +162,28 @@ local APIFrameFunctions
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> methods
|
||||
|
||||
--> right click to close
|
||||
function PanelMetaFunctions:CreateRightClickLabel (textType, w, h)
|
||||
local text
|
||||
w = w or 20
|
||||
h = h or 20
|
||||
|
||||
if (textType) then
|
||||
textType = string.lower (textType)
|
||||
if (textType == "short") then
|
||||
text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
|
||||
elseif (textType == "medium") then
|
||||
text = Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"]
|
||||
elseif (textType == "large") then
|
||||
text = Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"]
|
||||
end
|
||||
else
|
||||
text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
|
||||
end
|
||||
|
||||
return gump:NewLabel (self, _, "$parentRightMouseToClose", nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:"..w..":"..h..":0:1:512:512:8:70:328:409|t " .. text)
|
||||
end
|
||||
|
||||
--> show & hide
|
||||
function PanelMetaFunctions:Show()
|
||||
self.frame:Show()
|
||||
|
||||
@@ -530,6 +530,10 @@ local APISplitBarFunctions
|
||||
frame.MyObject.container.isMoving = false
|
||||
end
|
||||
end
|
||||
|
||||
local OnSizeChanged = function (statusbar)
|
||||
statusbar.MyObject.div:SetPoint ("left", statusbar, "left", statusbar:GetValue() * (statusbar:GetWidth()/100) - 18, 0)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
@@ -623,6 +627,7 @@ function gump:NewSplitBar (parent, container, name, member, w, h)
|
||||
SplitBarObject.statusbar:SetScript ("OnShow", OnShow)
|
||||
SplitBarObject.statusbar:SetScript ("OnMouseDown", OnMouseDown)
|
||||
SplitBarObject.statusbar:SetScript ("OnMouseUp", OnMouseUp)
|
||||
SplitBarObject.statusbar:SetScript ("OnSizeChanged", OnSizeChanged)
|
||||
|
||||
_setmetatable (SplitBarObject, SplitBarMetaFunctions)
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
g:NewLabel (window, _, "$parentTitle", "title", "Options for Details!")
|
||||
window.title:SetPoint (10, -10)
|
||||
|
||||
local close = g:NewLabel (window, _, "$parentRightMouseClose", nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:20:20:0:1:512:512:8:70:328:409|t right click to close this panel")
|
||||
close:SetPoint ("bottomleft", window, "bottomleft", 5, 5)
|
||||
local c = window:CreateRightClickLabel ("medium")
|
||||
c:SetPoint ("bottomleft", window, "bottomleft", 5, 5)
|
||||
|
||||
--------------- Max Segments
|
||||
g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", "max segments")
|
||||
|
||||
@@ -1707,6 +1707,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
BaseFrame.resize_direita:SetPoint ("BOTTOMRIGHT", BaseFrame, "BOTTOMRIGHT", 0, 0)
|
||||
BaseFrame.resize_direita:EnableMouse (true)
|
||||
BaseFrame.resize_direita:SetFrameLevel (BaseFrame:GetFrameLevel() + 6)
|
||||
BaseFrame.resize_direita:SetFrameStrata ("HIGH")
|
||||
|
||||
--> lock window button
|
||||
BaseFrame.lock_button = _CreateFrame ("Button", "Details_Lock_Button"..ID, BaseFrame)
|
||||
@@ -1744,6 +1745,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
BaseFrame.resize_esquerda:SetPoint ("BOTTOMLEFT", BaseFrame, "BOTTOMLEFT", 0, 0)
|
||||
BaseFrame.resize_esquerda:EnableMouse (true)
|
||||
BaseFrame.resize_esquerda:SetFrameLevel (BaseFrame:GetFrameLevel() + 6)
|
||||
BaseFrame.resize_esquerda:SetFrameStrata ("HIGH")
|
||||
|
||||
gump:Fade (BaseFrame.resize_esquerda, "in", 3.0)
|
||||
gump:Fade (BaseFrame.resize_direita, "in", 3.0)
|
||||
@@ -2857,6 +2859,8 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
instancia = _detalhes:GetInstance (instancia)
|
||||
end
|
||||
|
||||
--print (instancia.baseframe, instancia.baseframe:GetObjectType())
|
||||
|
||||
if (instancia.baseframe:GetWidth() < 215) then
|
||||
_detalhes.ResetButtonMode = 2
|
||||
else
|
||||
|
||||
@@ -10,6 +10,10 @@ if not Loc then return end
|
||||
Loc ["STRING_CENTER"] = "center"
|
||||
Loc ["STRING_RIGHT"] = "right"
|
||||
Loc ["STRING_TOOOLD"] = "could not be installed because your Details! version is too old."
|
||||
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Right click to close."
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"] = "Use right click to close this window."
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"] = "Click with right mouse button to close this window."
|
||||
|
||||
--> Slash
|
||||
Loc ["STRING_COMMAND_LIST"] = "command list"
|
||||
|
||||
@@ -11,6 +11,10 @@ if not Loc then return end
|
||||
Loc ["STRING_RIGHT"] = "direita"
|
||||
Loc ["STRING_TOOOLD"] = "nao pode ser instalado pois sua versao do Details! e muito antiga."
|
||||
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"] = "Botao direito para fechar."
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"] = "Use o botao direito para fechar esta janela."
|
||||
Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"] = "Clique com o botao direito do mouse para fechar esta janela."
|
||||
|
||||
--> Slash
|
||||
Loc ["STRING_COMMAND_LIST"] = "lista de comandos"
|
||||
|
||||
|
||||
@@ -166,7 +166,8 @@
|
||||
bg.type:SetFrameLevel (2, bg)
|
||||
bg.type.lastValue = 1
|
||||
|
||||
|
||||
local c = bg:CreateRightClickLabel ("medium")
|
||||
c:SetPoint ("bottomright", bg, "bottomright", -3, 1)
|
||||
|
||||
--send button
|
||||
local sendFunc = function()
|
||||
|
||||
@@ -65,15 +65,25 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
player = UnitName ("player")
|
||||
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 0)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 0)
|
||||
|
||||
|
||||
elseif (event == "REFRESH") then --> requested a refresh window
|
||||
-->
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
|
||||
--print ("ENTER COMBAT - nova tabela")
|
||||
if (IsInGroup() or IsInRaid()) then
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 1)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 1)
|
||||
end
|
||||
ThreatMeter:Start()
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then --> combat ended
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleIcon, 0)
|
||||
DetailsFrameWork:Fade (ThreatMeterFrame.titleText, 0)
|
||||
ThreatMeter:End()
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDRESIZE" or event == "DETAILS_INSTANCE_SIZECHANGED") then
|
||||
@@ -95,8 +105,18 @@ local function CreatePluginFrames (data)
|
||||
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)
|
||||
|
||||
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)
|
||||
|
||||
@@ -146,6 +146,11 @@ local function CreatePluginFrames (data)
|
||||
|
||||
local w, h = instancia:GetSize()
|
||||
VanguardFrame:SetHeight (h)
|
||||
Vanguard:OnResizeDamageLabels()
|
||||
Vanguard:OnResizeTankBoxes()
|
||||
|
||||
Vanguard.DamageVsHeal.width = w - 6
|
||||
Vanguard.TookVsAvoid.width = w - 6
|
||||
|
||||
if (h >= 95) then
|
||||
--> show two bars
|
||||
@@ -155,8 +160,8 @@ local function CreatePluginFrames (data)
|
||||
Vanguard.LastHitsBackground:Show()
|
||||
Vanguard.LastHitsBackground:SetPoint ("topleft", VanguardFrame, 2, -35)
|
||||
--> show tank boxes
|
||||
for i = 1, 3 do
|
||||
Vanguard.TankFrames [i].Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*98), 0)
|
||||
for i = 1, Vanguard.TankFrames.Spots do
|
||||
Vanguard.TankFrames [i].Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*95), 0)
|
||||
end
|
||||
|
||||
return
|
||||
@@ -170,8 +175,8 @@ local function CreatePluginFrames (data)
|
||||
Vanguard.LastHitsBackground:Show()
|
||||
Vanguard.LastHitsBackground:SetPoint (3, -3)
|
||||
--> move up the 3 tank boxes
|
||||
for i = 1, 3 do
|
||||
Vanguard.TankFrames [i].Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*98), 0)
|
||||
for i = 1, Vanguard.TankFrames.Spots do
|
||||
Vanguard.TankFrames [i].Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*95), 0)
|
||||
end
|
||||
|
||||
return
|
||||
@@ -184,8 +189,8 @@ local function CreatePluginFrames (data)
|
||||
--> hide last hit box
|
||||
Vanguard.LastHitsBackground:Hide()
|
||||
--> move up the 3 tank boxes
|
||||
for i = 1, 3 do
|
||||
Vanguard.TankFrames [i].Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*98), 0)
|
||||
for i = 1, Vanguard.TankFrames.Spots do
|
||||
Vanguard.TankFrames [i].Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*95), 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -219,13 +224,13 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = tankName
|
||||
Vanguard.TankListHash ["raid"..i] = #Vanguard.TankList
|
||||
if (#Vanguard.TankList == 3) then
|
||||
if (#Vanguard.TankList == 5) then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (#Vanguard.TankList < 3 and playerName ~= "SELFISTANK") then
|
||||
if (#Vanguard.TankList < 5 and playerName ~= "SELFISTANK") then
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = _UnitName ("player")
|
||||
Vanguard.TankListHash ["player"] = #Vanguard.TankList
|
||||
end
|
||||
@@ -243,13 +248,13 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = tankName
|
||||
Vanguard.TankListHash ["party"..i] = #Vanguard.TankList
|
||||
if (#Vanguard.TankList == 3) then
|
||||
if (#Vanguard.TankList == 5) then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (#Vanguard.TankList < 3 and playerName ~= "SELFISTANK") then
|
||||
if (#Vanguard.TankList < 5 and playerName ~= "SELFISTANK") then
|
||||
Vanguard.TankList [#Vanguard.TankList+1] = _UnitName ("player")
|
||||
Vanguard.TankListHash ["player"] =#Vanguard.TankList
|
||||
end
|
||||
@@ -263,7 +268,7 @@ local function CreatePluginFrames (data)
|
||||
Vanguard.TankFrames [index]:SetTank (tankname)
|
||||
end
|
||||
|
||||
for i = #Vanguard.TankList+1, 3 do
|
||||
for i = #Vanguard.TankList+1, 5 do
|
||||
Vanguard.TankFrames [i]:SetTank (nil, i)
|
||||
end
|
||||
|
||||
@@ -274,11 +279,13 @@ local function CreatePluginFrames (data)
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> Vanguard frame attributes
|
||||
--[[
|
||||
VanguardFrame:SetBackdrop ({
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
tile = true, tileSize = 16,
|
||||
insets = {left = 1, right = 1, top = 0, bottom = 1},})
|
||||
VanguardFrame:SetBackdropColor (.3, .3, .3, .3)
|
||||
--]]
|
||||
|
||||
VanguardFrame:SetWidth (300)
|
||||
VanguardFrame:SetHeight (100)
|
||||
@@ -297,6 +304,27 @@ local function CreatePluginFrames (data)
|
||||
infoFrame:SetBackdropColor ("black")
|
||||
infoFrame:SetGradient ("OnEnter", "black")
|
||||
|
||||
local c = infoFrame:CreateRightClickLabel()
|
||||
c:SetPoint ("bottomright", infoFrame, "bottomright", -3, 1)
|
||||
|
||||
--> report button
|
||||
local reportFunc = function (IsCurrent, IsReverse, AmtLines)
|
||||
local lines = { Loc ["STRING_REPORT"]..": " .. Loc ["STRING_REPORT_AVOIDANCE"] .. ": " .. MyName,
|
||||
Loc ["STRING_HITS"] .. ": " .. infoFrame ["hitsReceivedAmount"].text,
|
||||
Loc ["STRING_DODGE"] .. ": " .. infoFrame ["dodgeAmount"].text,
|
||||
Loc ["STRING_PARRY"] .. ": " .. infoFrame ["parryAmount"].text,
|
||||
Loc ["STRING_DAMAGETAKEN"] .. ": " .. infoFrame ["damageTakenAmount"].text,
|
||||
Loc ["STRING_DTPS"] .. ": " .. infoFrame ["damageTakenSecAmount"].text
|
||||
}
|
||||
Vanguard:SendReportLines (lines)
|
||||
end
|
||||
|
||||
--[1] fucntion wich will build report lines after click on 'Send Button' [2] enable current button [3] enable reverse button
|
||||
local ReportButton = DetailsFrameWork:NewButton (infoFrame, nil, "DetailsVanguardAvoidanceReportButton", "ReportButton", 20, 20, function() Vanguard:SendReportWindow (reportFunc) end)
|
||||
ReportButton.texture = "Interface\\COMMON\\VOICECHAT-ON"
|
||||
ReportButton:SetPoint ("topright", infoFrame, "topright", -5, -1)
|
||||
ReportButton.tooltip = Loc ["STRING_REPORT_AVOIDANCE_TOOLTIP"]
|
||||
|
||||
infoFrame:SetHook ("OnMouseUp", function (_, button)
|
||||
if (string.lower (button):find ("right")) then
|
||||
VanguardFrame.InfoShown = false
|
||||
@@ -311,6 +339,9 @@ local function CreatePluginFrames (data)
|
||||
local funcInfo = function()
|
||||
VanguardFrame.InfoShown = true
|
||||
Vanguard:VanguardRefreshInfoFrame()
|
||||
local w, h = instancia:GetSize()
|
||||
infoFrame.width = w
|
||||
infoFrame.height = h
|
||||
infoFrame:Show()
|
||||
infoFrame.refreshTick = Vanguard:ScheduleRepeatingTimer ("VanguardRefreshInfoFrame", 1)
|
||||
end
|
||||
@@ -368,30 +399,29 @@ local function CreatePluginFrames (data)
|
||||
|
||||
local hitsReceived = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHitsReceived", nil, Loc ["STRING_HITS"], "GameFontHighlightSmall", 9.5)
|
||||
hitsReceived:SetPoint (150, -5)
|
||||
local hitsReceivedAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHitsReceivedAmount", nil, "0", "GameFontHighlightSmall", 9.5)
|
||||
local hitsReceivedAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoHitsReceivedAmount", "hitsReceivedAmount", "0", "GameFontHighlightSmall", 9.5)
|
||||
hitsReceivedAmount:SetPoint ("left", hitsReceived, "right", 2)
|
||||
|
||||
local dodge = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDodge", nil, Loc ["STRING_DODGE"], "GameFontHighlightSmall", 9.5)
|
||||
dodge:SetPoint (150, -20)
|
||||
local dodgeAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDodgeAmount", nil, "0", "GameFontHighlightSmall", 9.5)
|
||||
local dodgeAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDodgeAmount", "dodgeAmount", "0", "GameFontHighlightSmall", 9.5)
|
||||
dodgeAmount:SetPoint ("left", dodge, "right", 2)
|
||||
|
||||
local parry = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoParry", nil, Loc ["STRING_PARRY"], "GameFontHighlightSmall", 9.5)
|
||||
parry:SetPoint (150, -35)
|
||||
local parryAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoParryAmount", nil, "0", "GameFontHighlightSmall", 9.5)
|
||||
local parryAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoParryAmount", "parryAmount", "0", "GameFontHighlightSmall", 9.5)
|
||||
parryAmount:SetPoint ("left", parry, "right", 2)
|
||||
|
||||
local damageTaken = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDamageTaken", nil, Loc ["STRING_DAMAGETAKEN"], "GameFontHighlightSmall", 9.5)
|
||||
damageTaken:SetPoint (150, -50)
|
||||
local damageTakenAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDamageTakenAmount", nil, "0", "GameFontHighlightSmall", 9.5)
|
||||
local damageTakenAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDamageTakenAmount", "damageTakenAmount", "0", "GameFontHighlightSmall", 9.5)
|
||||
damageTakenAmount:SetPoint ("left", damageTaken, "right", 2)
|
||||
|
||||
local damageTakenSec = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDamageSec", nil, Loc ["STRING_DTPS"], "GameFontHighlightSmall", 9.5)
|
||||
damageTakenSec:SetPoint (150, -65)
|
||||
local damageTakenSecAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDamageTakenSecAmount", nil, "0", "GameFontHighlightSmall", 9.5)
|
||||
local damageTakenSecAmount = DetailsFrameWork:NewLabel (infoFrame, nil, "VanguardInfoDamageTakenSecAmount", "damageTakenSecAmount", "0", "GameFontHighlightSmall", 9.5)
|
||||
damageTakenSecAmount:SetPoint ("left", damageTakenSec, "right", 2)
|
||||
----------
|
||||
|
||||
--> need to be a member of _detalhes bacause we want to use a schedule timer
|
||||
--> once a member of _detalhes we can call through plugin object like Vanguard:VanguardRefreshInfoFrame()
|
||||
_detalhes.VanguardRefreshInfoFrame = function()
|
||||
@@ -477,12 +507,14 @@ local function CreatePluginFrames (data)
|
||||
|
||||
end
|
||||
|
||||
local DamageVsHeal = DetailsFrameWork:NewSplitBar (VanguardFrame, VanguardFrame, "VanguardDamageVsHealBar", _, 294, 14)
|
||||
local DamageVsHeal = DetailsFrameWork:NewSplitBar (VanguardFrame, VanguardFrame, "VanguardDamageVsHealBar", "DamageVsHealBar", 294, 14)
|
||||
|
||||
DamageVsHeal:SetPoint (3, -3)
|
||||
|
||||
DamageVsHeal.fontsize = 10
|
||||
DamageVsHeal.lefticon = "Interface\\ICONS\\misc_arrowright"
|
||||
DamageVsHeal.righticon = "Interface\\ICONS\\misc_arrowleft"
|
||||
DamageVsHeal.tooltip = Loc ["STRING_MOREINFORMATION"]
|
||||
DamageVsHeal.tooltip = Loc ["STRING_HEALVSDAMAGETOOLTIP"]
|
||||
DamageVsHeal:SetHook ("OnMouseUp", funcInfo)
|
||||
|
||||
DamageVsHeal.iconleft:SetVertexColor (.5, 1, .5, 1)
|
||||
@@ -491,11 +523,11 @@ local function CreatePluginFrames (data)
|
||||
Vanguard.DamageVsHeal = DamageVsHeal
|
||||
|
||||
--> Hits vs Avoidance bar
|
||||
local TookVsAvoid = DetailsFrameWork:NewSplitBar (VanguardFrame, VanguardFrame, "VanguardTookVsAvoidBar", _, 294, 14)
|
||||
local TookVsAvoid = DetailsFrameWork:NewSplitBar (VanguardFrame, VanguardFrame, "VanguardTookVsAvoidBar", "TookVsAvoidBar", 294, 14)
|
||||
TookVsAvoid:SetPoint ("topleft", VanguardFrame, 3, -18)
|
||||
TookVsAvoid.lefticon = "Interface\\TIMEMANAGER\\RWButton"
|
||||
TookVsAvoid.righticon = "Interface\\TIMEMANAGER\\FFButton"
|
||||
TookVsAvoid.tooltip = Loc ["STRING_MOREINFORMATION"]
|
||||
TookVsAvoid.tooltip = Loc ["STRING_AVOIDVSHITSTOOLTIP"]
|
||||
TookVsAvoid:SetHook ("OnMouseUp", funcInfo)
|
||||
|
||||
TookVsAvoid.iconleft:SetWidth (18)
|
||||
@@ -523,11 +555,12 @@ local function CreatePluginFrames (data)
|
||||
DamageVsHeal:SetRightColor (.9, .1, .1, 1)
|
||||
end
|
||||
|
||||
---------> build 6 damage text entries ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
---------> build damage text entries ---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> entry functions
|
||||
Vanguard.DamageLabels = {}
|
||||
|
||||
Vanguard.DamageLabels.Spots = 6
|
||||
|
||||
function Vanguard:InsertDamage (damage, index, hp)
|
||||
Vanguard.DamageLabels [index]:SetText (_detalhes:ToK (damage))
|
||||
local percent = damage / hp
|
||||
@@ -535,34 +568,48 @@ local function CreatePluginFrames (data)
|
||||
Vanguard.DamageLabels [index]:SetTextColor (1, abs, abs, 1)
|
||||
end
|
||||
|
||||
function Vanguard:NewDamage (damage)
|
||||
local hp = _UnitHealthMax (_track_player_name) / 3
|
||||
for i = 6, 2 do
|
||||
Vanguard.DamageLabels [i]:SetText (Vanguard.DamageLabels [i-1]:GetText())
|
||||
Vanguard.DamageLabels [i]:SetTextColor (Vanguard.DamageLabels [i-1]:GetTextColor())
|
||||
end
|
||||
Vanguard.DamageLabels [1]:SetText (_detalhes:ToK (damage))
|
||||
Vanguard.DamageLabels [1]:SetTextColor (_math_min (damage/hp, 1), .1, .1, 1)
|
||||
end
|
||||
|
||||
function Vanguard:ResetDamage()
|
||||
for i = 1, 6 do
|
||||
for i = 1, Vanguard.DamageLabels.Spots do
|
||||
Vanguard.DamageLabels [i]:SetText ("0.0k")
|
||||
Vanguard.DamageLabels [i]:SetTextColor (1, 1, 1, 1)
|
||||
Vanguard.DamageLabels [i]:Show()
|
||||
end
|
||||
for i = Vanguard.DamageLabels.Spots + 1, #Vanguard.DamageLabels do
|
||||
Vanguard.DamageLabels [i]:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
--> bg frame
|
||||
local LastHitsBackground = DetailsFrameWork:NewPanel (VanguardFrame, _, "DetailsVanguardRowBackground", "DamageRowBackground", 296, 20)
|
||||
LastHitsBackground:SetPoint ("topleft", VanguardFrame, 2, -35)
|
||||
LastHitsBackground.tooltip = Loc ["STRING_DAMAGESCROLL"]
|
||||
Vanguard.LastHitsBackground = LastHitsBackground
|
||||
|
||||
--> labels
|
||||
for i = 1, 6 do
|
||||
|
||||
for i = 1, Vanguard.DamageLabels.Spots do
|
||||
local ThisLabel = DetailsFrameWork:NewLabel (LastHitsBackground, Vanguard, nil, "DamageLabel"..i, "0.0k", "GameFontHighlightSmall", 11, {1, 1, 1, 1})
|
||||
Vanguard.DamageLabels [i] = ThisLabel
|
||||
ThisLabel:SetPoint ("left", LastHitsBackground.frame, 9 + ((i-1)*50), 0)
|
||||
end
|
||||
|
||||
function Vanguard:OnResizeDamageLabels()
|
||||
local w, h = instancia:GetSize()
|
||||
LastHitsBackground.width = w - 6
|
||||
|
||||
local amt = math.floor (w / 50)
|
||||
|
||||
if (amt > Vanguard.DamageLabels.Spots) then
|
||||
for i = Vanguard.DamageLabels.Spots + 1, amt do
|
||||
local ThisLabel = DetailsFrameWork:NewLabel (LastHitsBackground, Vanguard, nil, "DamageLabel"..i, "0.0k", "GameFontHighlightSmall", 11, {1, 1, 1, 1})
|
||||
Vanguard.DamageLabels [i] = ThisLabel
|
||||
ThisLabel:SetPoint ("left", LastHitsBackground.frame, 9 + ((i-1)*50), 0)
|
||||
end
|
||||
end
|
||||
|
||||
Vanguard.DamageLabels.Spots = amt
|
||||
Vanguard:ResetDamage()
|
||||
end
|
||||
|
||||
|
||||
---------> build 3 tanks debuff frames -------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -570,6 +617,8 @@ local function CreatePluginFrames (data)
|
||||
local tankframemeta = {}
|
||||
tankframemeta.__index = tankframemeta
|
||||
|
||||
|
||||
|
||||
--> update tank information
|
||||
function tankframemeta:SetTank (name, index)
|
||||
if (not name) then
|
||||
@@ -666,8 +715,9 @@ local function CreatePluginFrames (data)
|
||||
Vanguard.TankFrames [index].Life (percent)
|
||||
end
|
||||
|
||||
--> build the 3 boxes
|
||||
--> build the boxes
|
||||
Vanguard.TankFrames = {}
|
||||
Vanguard.TankFrames.Spots = 5
|
||||
|
||||
local iconMouseOver = function (iconFrame)
|
||||
iconFrame.icon:SetBlendMode ("ADD")
|
||||
@@ -684,7 +734,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 3 do
|
||||
for i = 1, Vanguard.TankFrames.Spots do
|
||||
|
||||
local ThisBoxObject = {}
|
||||
setmetatable (ThisBoxObject, tankframemeta)
|
||||
@@ -694,12 +744,12 @@ local function CreatePluginFrames (data)
|
||||
ThisBoxObject.FreeSpots = {true, true, true}
|
||||
ThisBoxObject.InUse = 0
|
||||
|
||||
local Frame = DetailsFrameWork:NewPanel (VanguardFrame, nil, "DetailsVanguardFrameBox"..i, _, 98, 40)
|
||||
Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*98), 0)
|
||||
local Frame = DetailsFrameWork:NewPanel (VanguardFrame, nil, "DetailsVanguardFrameBox"..i, _, 95, 40)
|
||||
Frame:SetPoint ("bottomleft", VanguardFrame, 2 + ((i-1)*95), 0)
|
||||
Frame.color = {.1, .1, .1, 1}
|
||||
ThisBoxObject.Frame = Frame
|
||||
|
||||
local life = DetailsFrameWork:NewBar (Frame, Frame, "DetailsVanguardFrameBox"..i.."Life", nil, 94, 36, 100)
|
||||
local life = DetailsFrameWork:NewBar (Frame, Frame, "DetailsVanguardFrameBox"..i.."Life", nil, 91, 36, 100)
|
||||
life:SetPoint (Frame, 2, -2)
|
||||
life:SetFrameLevel (-1, Frame)
|
||||
ThisBoxObject.Life = life
|
||||
@@ -813,6 +863,22 @@ local function CreatePluginFrames (data)
|
||||
blackbg3:Hide()
|
||||
end
|
||||
|
||||
function Vanguard:OnResizeTankBoxes()
|
||||
local w, h = instancia:GetSize()
|
||||
local amt = math.floor (w / 95)
|
||||
|
||||
for i = 1, amt do
|
||||
Vanguard.TankFrames [i].Frame:Show()
|
||||
end
|
||||
|
||||
for i = amt+1, #Vanguard.TankFrames do
|
||||
Vanguard.TankFrames [i].Frame:Hide()
|
||||
end
|
||||
|
||||
Vanguard.TankFrames.Spots = amt
|
||||
|
||||
end
|
||||
|
||||
-------> Core function --------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> cancel function
|
||||
@@ -872,6 +938,11 @@ local function CreatePluginFrames (data)
|
||||
for TankIndex, TankName in _ipairs (Vanguard.TankList) do
|
||||
|
||||
local ThisTankFrame = Vanguard.TankFrames [TankIndex]
|
||||
|
||||
if (not ThisTankFrame) then
|
||||
break
|
||||
end
|
||||
|
||||
local updated = {false, false, false}
|
||||
|
||||
for i = 1, 41 do
|
||||
@@ -1044,7 +1115,7 @@ local function CreatePluginFrames (data)
|
||||
for _, tabela in _ipairs (_track_player_object.last_events_table) do
|
||||
if (tabela[1]) then
|
||||
Vanguard:InsertDamage (tabela[3], amt, hp)
|
||||
if (amt == 6) then
|
||||
if (amt == Vanguard.DamageLabels.Spots) then
|
||||
break
|
||||
end
|
||||
amt = amt+1
|
||||
|
||||
@@ -5,7 +5,12 @@ if (not Loc) then
|
||||
end
|
||||
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Vanguard"
|
||||
Loc ["STRING_MOREINFORMATION"] = "Click for more information"
|
||||
Loc ["STRING_HEALVSDAMAGETOOLTIP"] = "Incoming heal is the amount of healing expected for the next seconds.\nIncoming damage is calculated by Vanguard using the average damage\ntaken on the last seconds.\n\n|cff33CC00*Click for more information."
|
||||
Loc ["STRING_AVOIDVSHITSTOOLTIP"] = "This is the amount of dodge and parry against the\namount of successful hits received on the last few seconds.\n\n|cff33CC00*Click for more information."
|
||||
Loc ["STRING_DAMAGESCROLL"] = "Latest damage received amount."
|
||||
Loc ["STRING_REPORT"] = "Details Vanguard Report"
|
||||
Loc ["STRING_REPORT_AVOIDANCE"] = "Avoidance statistic for"
|
||||
Loc ["STRING_REPORT_AVOIDANCE_TOOLTIP"] = "Send avoidance report"
|
||||
|
||||
Loc ["STRING_HEALRECEIVED"] = "Heal Received"
|
||||
Loc ["STRING_HPS"] = "RHPS"
|
||||
|
||||
@@ -5,7 +5,12 @@ if (not Loc) then
|
||||
end
|
||||
|
||||
Loc ["STRING_PLUGIN_NAME"] = "Vanguard"
|
||||
Loc ["STRING_MOREINFORMATION"] = "Clique para mais informacoes"
|
||||
Loc ["STRING_HEALVSDAMAGETOOLTIP"] = "Previsao da quantidade de cura recebida nos proximos segundos.\nPrevisao de dano que sera recebido calculado pelo dano tomado nos ultimos segundos.\n\n|cff33CC00*Clique para mais informacoes."
|
||||
Loc ["STRING_AVOIDVSHITSTOOLTIP"] = "Quantidade de esquivas e bloqueios contra a\nquantidade de golpes recebidos nos ultimos segundos.\n\n|cff33CC00*Clique para mais informacoes."
|
||||
Loc ["STRING_DAMAGESCROLL"] = "Quantidade de dano dos ultimos golpes recebidos."
|
||||
Loc ["STRING_REPORT"] = "Details Vanguard Relatorio"
|
||||
Loc ["STRING_REPORT_AVOIDANCE"] = "Anulacao de dano para"
|
||||
Loc ["STRING_REPORT_AVOIDANCE_TOOLTIP"] = "Enviar relatorio da anulacao de dano"
|
||||
|
||||
Loc ["STRING_HEALRECEIVED"] = "Cura recebida"
|
||||
Loc ["STRING_HPS"] = "CRPS"
|
||||
|
||||
Reference in New Issue
Block a user