Moving rank text to a new Statusbar in the Player Detail Window
Rank information was shown in the header above the tabs, now the player details window has a statusbar and the rank information is shown there.
This commit is contained in:
@@ -3994,7 +3994,6 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
end
|
||||
|
||||
--damage rank
|
||||
--este_gump:SetTopRightTexts (text1, text2, size, color, font)
|
||||
local combat = instancia:GetShowingCombat()
|
||||
local diff = combat:GetDifficulty()
|
||||
local attribute, subattribute = instancia:GetDisplay()
|
||||
@@ -4007,19 +4006,16 @@ function atributo_damage:MontaInfoDamageDone()
|
||||
if (bestRank) then
|
||||
--> discover which are the player position in the guild rank
|
||||
local playerTable, onEncounter, rankPosition = _detalhes.storage:GetPlayerGuildRank (diff, combat:GetBossInfo().id, "damage", self.nome, true)
|
||||
|
||||
local text1 = self.nome .. " on " .. combat:GetBossInfo().name .. ":"
|
||||
local text2 = "Guild Rank: " .. (rankPosition or "x") .. " Best Dps: " .. _detalhes:ToK2 ((bestRank[1] or 0) / encounterTable.elapsed) .. " (" .. encounterTable.date:gsub (".*%s", "") .. ")"
|
||||
|
||||
info:SetTopRightTexts (text1, text2, 9, "gray", font)
|
||||
local text1 = self.nome .. " Guild Rank on " .. (combat:GetBossInfo().name or "") .. ": |cFFFFFF00" .. (rankPosition or "x") .. "|r Best Dps: |cFFFFFF00" .. _detalhes:ToK2 ((bestRank[1] or 0) / encounterTable.elapsed) .. "|r (" .. encounterTable.date:gsub (".*%s", "") .. ")"
|
||||
info:SetStatusbarText (text1, 10, "gray")
|
||||
else
|
||||
info:SetTopRightTexts()
|
||||
info:SetStatusbarText()
|
||||
end
|
||||
else
|
||||
info:SetTopRightTexts()
|
||||
info:SetStatusbarText()
|
||||
end
|
||||
else
|
||||
info:SetTopRightTexts()
|
||||
info:SetStatusbarText()
|
||||
end
|
||||
|
||||
--> add pets
|
||||
|
||||
@@ -1867,6 +1867,8 @@ function atributo_heal:MontaInfoHealingDone()
|
||||
tabela.anti_heal,
|
||||
})
|
||||
end
|
||||
|
||||
info:SetStatusbarText()
|
||||
|
||||
--> add pets
|
||||
local ActorPets = self.pets
|
||||
|
||||
+36
-5
@@ -33,6 +33,12 @@ local IconTexCoord = {5/64, 59/64, 5/64, 59/64}
|
||||
local CONST_BAR_HEIGHT = 20
|
||||
local CONST_TARGET_HEIGHT = 18
|
||||
|
||||
local PLAYER_DETAILS_WINDOW_WIDTH = 790
|
||||
local PLAYER_DETAILS_WINDOW_HEIGHT = 474
|
||||
|
||||
local PLAYER_DETAILS_STATUSBAR_HEIGHT = 20
|
||||
local PLAYER_DETAILS_STATUSBAR_ALPHA = 1
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------
|
||||
--self = instancia
|
||||
--jogador = classe_damage ou classe_heal
|
||||
@@ -1231,7 +1237,7 @@ local elvui_skin = function()
|
||||
window.container_barras:SetSize (419, 195)
|
||||
window.container_barras:SetPoint ("TOPLEFT", window, "TOPLEFT", 2, -76)
|
||||
--target container
|
||||
window.container_alvos:SetPoint ("BOTTOMLEFT", window, "BOTTOMLEFT", 2, 6)
|
||||
window.container_alvos:SetPoint ("BOTTOMLEFT", window, "BOTTOMLEFT", 2, 6 + PLAYER_DETAILS_STATUSBAR_HEIGHT)
|
||||
window.container_alvos:SetSize (418, 150)
|
||||
|
||||
--texts
|
||||
@@ -1492,9 +1498,10 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
--> propriedades da janela
|
||||
este_gump:SetPoint ("CENTER", UIParent)
|
||||
--este_gump:SetWidth (640)
|
||||
este_gump:SetWidth (790)
|
||||
este_gump:SetHeight (454)
|
||||
|
||||
este_gump:SetWidth (PLAYER_DETAILS_WINDOW_WIDTH)
|
||||
este_gump:SetHeight (PLAYER_DETAILS_WINDOW_HEIGHT)
|
||||
|
||||
este_gump:EnableMouse (true)
|
||||
este_gump:SetResizable (false)
|
||||
este_gump:SetMovable (true)
|
||||
@@ -1800,6 +1807,30 @@ function gump:CriaJanelaInfo()
|
||||
este_gump.report_direita:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", -10, -70)
|
||||
este_gump.report_direita:Show()
|
||||
|
||||
--> statusbar
|
||||
local statusBar = CreateFrame ("frame", nil, este_gump)
|
||||
statusBar:SetPoint ("bottomleft", este_gump, "bottomleft")
|
||||
statusBar:SetPoint ("bottomright", este_gump, "bottomright")
|
||||
statusBar:SetHeight (PLAYER_DETAILS_STATUSBAR_HEIGHT)
|
||||
DetailsFramework:ApplyStandardBackdrop (statusBar)
|
||||
statusBar:SetAlpha (PLAYER_DETAILS_STATUSBAR_ALPHA)
|
||||
|
||||
statusBar.Text = DetailsFramework:CreateLabel (statusBar)
|
||||
statusBar.Text:SetPoint ("left", 2, 0)
|
||||
|
||||
function este_gump:SetStatusbarText (text, fontSize, fontColor)
|
||||
if (not text) then
|
||||
este_gump:SetStatusbarText ("Details! Damage Meter | Use '/details stats' for statistics", 10, "gray")
|
||||
return
|
||||
end
|
||||
statusBar.Text.text = text
|
||||
statusBar.Text.fontsize = fontSize
|
||||
statusBar.Text.fontcolor = fontColor
|
||||
end
|
||||
|
||||
--set default text
|
||||
este_gump:SetStatusbarText()
|
||||
|
||||
--> apply default skin
|
||||
_detalhes:ApplyPDWSkin()
|
||||
|
||||
@@ -1844,7 +1875,7 @@ function gump:CriaJanelaInfo()
|
||||
--> Percent Desc
|
||||
local percent_desc = frame:CreateFontString (nil, "artwork", "GameFontNormal")
|
||||
percent_desc:SetText ("Percent values are comparisons with the previous try.")
|
||||
percent_desc:SetPoint ("bottomleft", frame, "bottomleft", 13, 13)
|
||||
percent_desc:SetPoint ("bottomleft", frame, "bottomleft", 13, 13 + PLAYER_DETAILS_STATUSBAR_HEIGHT)
|
||||
percent_desc:SetTextColor (.5, .5, .5, 1)
|
||||
|
||||
--> SUMMARY
|
||||
|
||||
Reference in New Issue
Block a user