- testing the mercurial repo packpager.

This commit is contained in:
Tercio
2017-09-19 12:56:32 -03:00
parent 1b07ba9276
commit 7df507bd46
48 changed files with 2860 additions and 532 deletions
+115 -16
View File
@@ -1504,6 +1504,42 @@ function gump:CriaJanelaInfo()
este_gump.apoio_icone_direito:SetHeight (13)
este_gump.topright_text1 = este_gump:CreateFontString (nil, "overlay", "GameFontNormal")
este_gump.topright_text1:SetPoint ("bottomright", este_gump, "topright", -18 - (94 * (1-1)), -36)
este_gump.topright_text1:SetJustifyH ("right")
_detalhes.gump:SetFontSize (este_gump.topright_text1, 10)
este_gump.topright_text2 = este_gump:CreateFontString (nil, "overlay", "GameFontNormal")
este_gump.topright_text2:SetPoint ("bottomright", este_gump, "topright", -18 - (94 * (1-1)), -48)
este_gump.topright_text2:SetJustifyH ("right")
_detalhes.gump:SetFontSize (este_gump.topright_text2, 10)
function este_gump:SetTopRightTexts (text1, text2, size, color, font)
if (text1) then
este_gump.topright_text1:SetText (text1)
else
este_gump.topright_text1:SetText ("")
end
if (text2) then
este_gump.topright_text2:SetText (text2)
else
este_gump.topright_text2:SetText ("")
end
if (size and type (size) == "number") then
_detalhes.gump:SetFontSize (este_gump.topright_text1, size)
_detalhes.gump:SetFontSize (este_gump.topright_text2, size)
end
if (color) then
_detalhes.gump:SetFontColor (este_gump.topright_text1, color)
_detalhes.gump:SetFontColor (este_gump.topright_text2, color)
end
if (font) then
_detalhes.gump:SetFontFace (este_gump.topright_text1, font)
_detalhes.gump:SetFontFace (este_gump.topright_text2, font)
end
end
-------------------------------------------------
@@ -2365,6 +2401,11 @@ function gump:CriaJanelaInfo()
--icon - name - applications - refreshes - uptime
--
local wa_button = function (self, mouseButton, spellID, auraType)
local spellName, _, spellIcon = GetSpellInfo (spellID)
_detalhes:OpenAuraPanel (spellID, spellName, spellIcon, nil, auraType == "BUFF" and 4 or 2, 1)
end
local scroll_createline = function (self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self)
line:SetPoint ("topleft", self, "topleft", 0, -((index-1)*(scroll_line_height+1)))
@@ -2382,6 +2423,10 @@ function gump:CriaJanelaInfo()
local uptime = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
local apply = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
local refresh = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
local waButton = DF:CreateButton (line, wa_button, 18, 18)
waButton:SetIcon ([[Interface\AddOns\WeakAuras\Media\Textures\icon]])
DF:SetFontSize (name, text_size)
DF:SetFontSize (uptime, text_size)
DF:SetFontSize (apply, text_size)
@@ -2391,18 +2436,23 @@ function gump:CriaJanelaInfo()
name:SetPoint ("left", icon, "right", 2, 0)
uptime:SetPoint ("left", line, "left", 186, 0)
apply:SetPoint ("left", line, "left", 260, 0)
refresh:SetPoint ("left", line, "left", 310, 0)
refresh:SetPoint ("left", line, "left", 290, 0)
waButton:SetPoint ("left", line, "left", 322, 0)
line.Icon = icon
line.Name = name
line.Uptime = uptime
line.Apply = apply
line.Refresh = refresh
line.WaButton = waButton
name:SetJustifyH ("left")
uptime:SetJustifyH ("left")
apply:SetJustifyH ("left")
refresh:SetJustifyH ("left")
apply:SetJustifyH ("center")
refresh:SetJustifyH ("center")
apply:SetWidth (20)
refresh:SetWidth (20)
return line
end
@@ -2410,6 +2460,9 @@ function gump:CriaJanelaInfo()
local line_bg_color = {{1, 1, 1, .1}, {1, 1, 1, 0}}
local scroll_buff_refresh = function (self, data, offset, total_lines)
local haveWA = _G.WeakAuras
for i = 1, total_lines do
local index = i + offset
local aura = data [index]
@@ -2423,6 +2476,12 @@ function gump:CriaJanelaInfo()
line.Apply:SetText (aura [4])
line.Refresh:SetText (aura [5])
if (haveWA) then
line.WaButton:SetClickFunction (wa_button, aura.spellID, line.AuraType)
else
line.WaButton:Disable()
end
if (i%2 == 0) then
line:SetBackdropColor (unpack (line_bg_color [1]))
line.BackgroundColor = line_bg_color [1]
@@ -2434,19 +2493,43 @@ function gump:CriaJanelaInfo()
end
end
local create_titledesc_frame = function (anchorWidget, desc)
local f = CreateFrame ("frame", nil, frame)
f:SetSize (40, 20)
f:SetPoint ("center", anchorWidget, "center")
f:SetScript ("OnEnter", function()
GameTooltip:SetOwner (f, "ANCHOR_TOPRIGHT")
GameTooltip:AddLine (desc)
GameTooltip:Show()
end)
f:SetScript ("OnLeave", function()
GameTooltip:Hide()
end)
return f
end
local buffLabel = DF:CreateLabel (frame, "Buff Name")
buffLabel:SetPoint (6, -10)
local uptimeLabel = DF:CreateLabel (frame, "Uptime")
uptimeLabel:SetPoint (200, -10)
local appliedLabel = DF:CreateLabel (frame, "Applied")
appliedLabel:SetPoint (250, -10)
local refreshedLabel = DF:CreateLabel (frame, "Refreshed")
refreshedLabel:SetPoint (300, -10)
local appliedLabel = DF:CreateLabel (frame, "A")
appliedLabel:SetPoint (270, -10)
create_titledesc_frame (appliedLabel.widget, "applications")
local refreshedLabel = DF:CreateLabel (frame, "R")
refreshedLabel:SetPoint (301, -10)
create_titledesc_frame (refreshedLabel.widget, "refreshes")
local waLabel = DF:CreateLabel (frame, "WA")
waLabel:SetPoint (330, -10)
create_titledesc_frame (waLabel.widget, "create weak aura")
local buffScroll = DF:CreateScrollBox (frame, "$parentBuffUptimeScroll", scroll_buff_refresh, {}, scroll_width, 340, scroll_line_amount, scroll_line_height)
buffScroll:SetPoint ("topleft", frame, "topleft", 5, -30)
for i = 1, scroll_line_amount do
buffScroll:CreateLine (scroll_createline)
local line = buffScroll:CreateLine (scroll_createline)
line.AuraType = "BUFF"
end
buffScroll:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
buffScroll:SetBackdropColor (0, 0, 0, .4)
@@ -2460,15 +2543,25 @@ function gump:CriaJanelaInfo()
debuffLabel:SetPoint (406, -10)
local uptimeLabel2 = DF:CreateLabel (frame, "Uptime")
uptimeLabel2:SetPoint (600, -10)
local appliedLabel2 = DF:CreateLabel (frame, "Applied")
appliedLabel2:SetPoint (650, -10)
local refreshedLabel2 = DF:CreateLabel (frame, "Refreshed")
refreshedLabel2:SetPoint (700, -10)
local appliedLabel2 = DF:CreateLabel (frame, "A")
appliedLabel2:SetPoint (668, -10)
create_titledesc_frame (appliedLabel2.widget, "applications")
local refreshedLabel2 = DF:CreateLabel (frame, "R")
refreshedLabel2:SetPoint (699, -10)
create_titledesc_frame (refreshedLabel2.widget, "refreshes")
local waLabel2 = DF:CreateLabel (frame, "WA")
waLabel2:SetPoint (728, -10)
create_titledesc_frame (waLabel2.widget, "create weak aura")
local debuffScroll = DF:CreateScrollBox (frame, "$parentDebuffUptimeScroll", scroll_buff_refresh, {}, scroll_width, 340, scroll_line_amount, scroll_line_height)
debuffScroll:SetPoint ("topleft", frame, "topleft", 405, -30)
for i = 1, scroll_line_amount do
debuffScroll:CreateLine (scroll_createline)
local line = debuffScroll:CreateLine (scroll_createline)
line.AuraType = "DEBUFF"
end
debuffScroll:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
debuffScroll:SetBackdropColor (0, 0, 0, .4)
@@ -4502,7 +4595,11 @@ function gump:CriaJanelaInfo()
tab:Show()
amt_positive = amt_positive + 1
tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 490 - (94 * (amt_positive-1)), 1)
--tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 490 - (94 * (amt_positive-1)), 1) --left to right
tab:ClearAllPoints()
tab:SetPoint ("bottomright", info, "topright", -17 - (94 * (amt_positive-1)), -74) --right to left
tab:SetAlpha (0.8)
else
tab.frame:Hide()
@@ -4551,6 +4648,8 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
newtab:SetWidth (100)
newtab.middleTexture:SetWidth (70)
newtab:SetText (localized_name)
_G ["DetailsInfoWindowTab" .. index .. "Text"]:SetWidth (70)
@@ -4606,7 +4705,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
--f:Set
newtab.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 0)
newtab.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 2)
newtab.frame:SetPoint ("bottomright", info, "bottomright", -3, 3)
--newtab.frame:SetPoint ("TOPLEFT", info, "TOPLEFT", 19, -76)
newtab.frame:SetSize (569, 274)
+62 -28
View File
@@ -4,7 +4,7 @@
search for "~number" without the quotes to quick access the page:
1 - general
2 - combat
2 - combat / pvp pve
3 - skin
4 - row settings
5 - row texts
@@ -4306,10 +4306,49 @@ function window:CreateFrame2()
window:CreateLineBackground2 (frame2, "DeathLogLimitDropdown", "DeathLogLimitLabel", Loc ["STRING_OPTIONS_DEATHLIMIT_DESC"])
--> damage taken always on everything
g:NewLabel (frame2, _, "$parentDamageTakenEverythingLabel", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"], "GameFontHighlightLeft")
g:NewSwitch (frame2, _, "$parentDamageTakenEverythingSlider", "DamageTakenEverythingSlider", 60, 20, _, _, _detalhes.damage_taken_everything, nil, nil, nil, nil, options_switch_template)
frame2.DamageTakenEverythingSlider:SetPoint ("left", frame2.DamageTakenEverythingLabel, "right", 2)
frame2.DamageTakenEverythingSlider:SetAsCheckBox()
frame2.DamageTakenEverythingSlider.OnSwitch = function (_, _, value)
_detalhes.damage_taken_everything = value
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame2, "DamageTakenEverythingSlider", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING_DESC"])
--> deathlog healing done threshold
g:NewLabel (frame2, _, "$parentDeathLogHealingThresholdLabel", "DeathLogHealingThresholdLabel", Loc ["STRING_OPTIONS_DEATHLOG_MINHEALING"], "GameFontHighlightLeft")
local s = g:NewSlider (frame2, _, "$parentDeathLogHealingThresholdSlider", "DeathLogHealingThresholdSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 100000, 1, _detalhes.deathlog_healingdone_min, nil, nil, nil, options_slider_template)
frame2.DeathLogHealingThresholdSlider:SetPoint ("left", frame2.DeathLogHealingThresholdLabel, "right", 2, -1)
frame2.DeathLogHealingThresholdSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
_detalhes.deathlog_healingdone_min = amount
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end)
window:CreateLineBackground2 (frame2, "DeathLogHealingThresholdSlider", "DeathLogHealingThresholdLabel", Loc ["STRING_OPTIONS_DEATHLOG_MINHEALING_DESC"])
--> always show players
g:NewLabel (frame2, _, "$parentAlwaysShowPlayersLabel", "AlwaysShowPlayersLabel", Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentAlwaysShowPlayersSlider", "AlwaysShowPlayersSlider", 60, 20, _, _, _detalhes.all_players_are_group, nil, nil, nil, nil, options_switch_template)
frame2.AlwaysShowPlayersSlider:SetPoint ("left", frame2.AlwaysShowPlayersLabel, "right", 2, 0)
frame2.AlwaysShowPlayersSlider:SetAsCheckBox()
frame2.AlwaysShowPlayersSlider.OnSwitch = function (self, _, amount) --> slider, fixedValue, sliderValue
_detalhes.all_players_are_group = amount
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame2, "AlwaysShowPlayersSlider", "AlwaysShowPlayersLabel", Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS_DESC"])
--> Overall Data
g:NewLabel (frame2, _, "$parentOverallDataAnchor", "OverallDataLabel", Loc ["STRING_OPTIONS_OVERALL_ANCHOR"], "GameFontNormal")
--raid boss
--raid boss
g:NewLabel (frame2, _, "$parentOverallDataRaidBossLabel", "OverallDataRaidBossLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDBOSS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataRaidBossSlider", "OverallDataRaidBossSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
@@ -4327,7 +4366,7 @@ function window:CreateFrame2()
--
window:CreateLineBackground2 (frame2, "OverallDataRaidBossSlider", "OverallDataRaidBossLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDBOSS_DESC"])
--raid cleanup
--raid cleanup
g:NewLabel (frame2, _, "$parentOverallDataRaidCleaupLabel", "OverallDataRaidCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDCLEAN"], "GameFontHighlightLeft")
--
local raid_cleanup = g:NewSwitch (frame2, _, "$parentOverallDataRaidCleaupSlider", "OverallDataRaidCleaupSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
@@ -4345,7 +4384,7 @@ function window:CreateFrame2()
--
window:CreateLineBackground2 (frame2, "OverallDataRaidCleaupSlider", "OverallDataRaidCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_RAIDCLEAN_DESC"])
--dungeon boss
--dungeon boss
g:NewLabel (frame2, _, "$parentOverallDataDungeonBossLabel", "OverallDataDungeonBossLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONBOSS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataDungeonBossSlider", "OverallDataDungeonBossSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
@@ -4363,7 +4402,7 @@ function window:CreateFrame2()
--
window:CreateLineBackground2 (frame2, "OverallDataDungeonBossSlider", "OverallDataDungeonBossLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONBOSS_DESC"])
--dungeon cleanup
--dungeon cleanup
g:NewLabel (frame2, _, "$parentOverallDataDungeonCleaupLabel", "OverallDataDungeonCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONCLEAN"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataDungeonCleaupSlider", "OverallDataDungeonCleaupSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
@@ -4381,7 +4420,7 @@ function window:CreateFrame2()
--
window:CreateLineBackground2 (frame2, "OverallDataDungeonCleaupSlider", "OverallDataDungeonCleaupLabel", Loc ["STRING_OPTIONS_OVERALL_DUNGEONCLEAN_DESC"])
--everything
--everything
g:NewLabel (frame2, _, "$parentOverallDataAllLabel", "OverallDataAllLabel", Loc ["STRING_OPTIONS_OVERALL_ALL"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallDataAllSlider", "OverallDataAllSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
@@ -4420,7 +4459,7 @@ function window:CreateFrame2()
--
window:CreateLineBackground2 (frame2, "OverallDataAllSlider", "OverallDataAllLabel", Loc ["STRING_OPTIONS_OVERALL_ALL_DESC"])
--erase on new boss
--erase on new boss
g:NewLabel (frame2, _, "$parentOverallNewBossLabel", "OverallNewBossLabel", Loc ["STRING_OPTIONS_OVERALL_NEWBOSS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallNewBossSlider", "OverallNewBossSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
@@ -4434,8 +4473,8 @@ function window:CreateFrame2()
--
window:CreateLineBackground2 (frame2, "OverallNewBossSlider", "OverallNewBossLabel", Loc ["STRING_OPTIONS_OVERALL_NEWBOSS_DESC"])
--erase on challenge mode
g:NewLabel (frame2, _, "$parentOverallNewChallengeLabel", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE"], "GameFontHighlightLeft")
--erase on new mythic+ dungeon
g:NewLabel (frame2, _, "$parentOverallNewChallengeLabel", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_MYTHICPLUS"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallNewChallengeSlider", "OverallNewChallengeSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
frame2.OverallNewChallengeSlider:SetPoint ("left", frame2.OverallNewChallengeLabel, "right", 2, 0)
@@ -4446,9 +4485,9 @@ function window:CreateFrame2()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
--
window:CreateLineBackground2 (frame2, "OverallNewChallengeSlider", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_CHALLENGE_DESC"])
window:CreateLineBackground2 (frame2, "OverallNewChallengeSlider", "OverallNewChallengeLabel", Loc ["STRING_OPTIONS_OVERALL_MYTHICPLUS_DESC"])
--erase on logout overall_clear_logout
--erase on logout overall_clear_logout
g:NewLabel (frame2, _, "$parentOverallOnLogoutLabel", "OverallOnLogoutLabel", Loc ["STRING_OPTIONS_OVERALL_LOGOFF"], "GameFontHighlightLeft")
--
g:NewSwitch (frame2, _, "$parentOverallOnLogoutSlider", "OverallOnLogoutSlider", 60, 20, _, _, false, nil, nil, nil, nil, options_switch_template)
@@ -4474,7 +4513,7 @@ function window:CreateFrame2()
end
window:CreateLineBackground2 (frame2, "RemoteParserSlider", "RemoteParserLabel", Loc ["STRING_OPTIONS_BG_REMOTE_PARSER_DESC"])
--> show all
--> show all
g:NewLabel (frame2, _, "$parentShowAllLabel", "ShowAllLabel", Loc ["STRING_OPTIONS_BG_ALL_ALLY"], "GameFontHighlightLeft")
g:NewSwitch (frame2, _, "$parentShowAllSlider", "ShowAllSlider", 60, 20, _, _, _detalhes.pvp_as_group, nil, nil, nil, nil, options_switch_template)
frame2.ShowAllSlider:SetPoint ("left", frame2.ShowAllLabel, "right", 2)
@@ -4486,18 +4525,7 @@ function window:CreateFrame2()
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> damage taken always on everything
g:NewLabel (frame2, _, "$parentDamageTakenEverythingLabel", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"], "GameFontHighlightLeft")
g:NewSwitch (frame2, _, "$parentDamageTakenEverythingSlider", "DamageTakenEverythingSlider", 60, 20, _, _, _detalhes.damage_taken_everything, nil, nil, nil, nil, options_switch_template)
frame2.DamageTakenEverythingSlider:SetPoint ("left", frame2.DamageTakenEverythingLabel, "right", 2)
frame2.DamageTakenEverythingSlider:SetAsCheckBox()
frame2.DamageTakenEverythingSlider.OnSwitch = function (_, _, value)
_detalhes.damage_taken_everything = value
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
window:CreateLineBackground2 (frame2, "DamageTakenEverythingSlider", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING_DESC"])
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -4516,11 +4544,11 @@ function window:CreateFrame2()
local left_side = {
{"GeneralAnchorLabel", 1, true},
{"fragsPvpLabel", 2},
--{"EraseChartDataLabel", 3},
--{"timetypeLabel", 4, true},
{"DeathLogLimitLabel", 5, },
{"DamageTakenEverythingLabel", 6, true},
{"fragsPvpLabel"},
{"DeathLogLimitLabel"},
{"DeathLogHealingThresholdLabel"},
{"DamageTakenEverythingLabel"},
{"AlwaysShowPlayersLabel"},
{"BattlegroundAnchorLabel", 10, true},
{"RemoteParserLabel", 11},
@@ -10989,6 +11017,12 @@ end --> if not window
--damage taken advanced
_G.DetailsOptionsWindow2DamageTakenEverythingSlider.MyObject:SetValue (_detalhes.damage_taken_everything)
--healing done mim on death log
_G.DetailsOptionsWindow2DeathLogHealingThresholdSlider.MyObject:SetValue (_detalhes.deathlog_healingdone_min)
--always show all players (consider they as in group)
_G.DetailsOptionsWindow2AlwaysShowPlayersSlider.MyObject:SetValue (_detalhes.all_players_are_group)
--> window 3
local skin = editing_instance.skin
+348 -77
View File
@@ -2121,6 +2121,7 @@ local set_bar_value = function (self, value)
end
end
-- ~talent ~icon
local icon_frame_on_enter = function (self)
local actor = self.row.minha_tabela
@@ -2145,6 +2146,8 @@ local icon_frame_on_enter = function (self)
else
--> is a normal actor
local serial = actor.serial
local name = actor:name()
local class = actor:class()
@@ -2178,7 +2181,7 @@ local icon_frame_on_enter = function (self)
else
GameCooltip:AddIcon ([[Interface\GossipFrame\IncompleteQuestIcon]], 1, 2, icon_size, icon_size)
end
_detalhes:AddTooltipHeaderStatusbar (r, g, b, 0.6)
_detalhes:AddTooltipHeaderStatusbar()
local talent_string = ""
if (talents) then
@@ -2200,40 +2203,55 @@ local icon_frame_on_enter = function (self)
_detalhes:AddTooltipBackgroundStatusbar()
got_info = true
elseif (got_info) then
GameCooltip:AddLine (TALENTS .. ":", Loc ["STRING_QUERY_INSPECT_TALENTS"]) --> Loc from GlobalStrings.lua
GameCooltip:AddLine (TALENTS .. ":", Loc ["STRING_QUERY_INSPECT_REFRESH"]) --> Loc from GlobalStrings.lua
_detalhes:AddTooltipBackgroundStatusbar()
end
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_skyline]])
GameCooltip:SetOption ("MinButtonHeight", 15)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
local height = 52
if (not got_info) then
--GameCooltip:AddLine (" ")
--GameCooltip:AddLine ("Click to retrive item level and talents.", nil, 1, "orange")
GameCooltip:AddLine (Loc ["STRING_QUERY_INSPECT"], nil, 1, "orange")
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, icon_size, 8/512, 70/512, 224/512, 306/512)
GameCooltip:SetOption ("FixedHeight", 42)
else
GameCooltip:SetOption ("FixedHeight", 52)
height = 42
end
local combat = instance:GetShowingCombat()
local diff = combat:GetDifficulty()
local attribute, subattribute = instance:GetDisplay()
--> check if is a raid encounter and if is heroic or mythic
if (diff and (diff == 15 or diff == 16) and (attribute == 1 or attribute == 2)) then
local db = _detalhes.OpenStorage()
if (db) then
local bestRank, encounterTable = _detalhes.storage:GetBestFromPlayer (diff, combat:GetBossInfo().id, attribute == 1 and "damage" or "healing", name, true)
if (bestRank) then
--GameCooltip:AddLine ("")
--> discover which are the player position in the guild rank
local playerTable, onEncounter, rankPosition = _detalhes.storage:GetPlayerGuildRank (diff, combat:GetBossInfo().id, attribute == 1 and "damage" or "healing", name, true)
--" .. floor (bestRank[2] or 0) .. " ilvl" .. " |
GameCooltip:AddLine ("Best Score:", _detalhes:ToK2 ((bestRank[1] or 0) / encounterTable.elapsed) .. " [|cFFFFFF00Rank: " .. (rankPosition or "#") .. "|r]", 1, "white")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddLine ("|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:14:12:0:1:512:512:8:70:224:306|t Open Rank", "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:14:12:0:1:512:512:8:70:328:409|t Refresh Talents", 1, "white", "white")
_detalhes:AddTooltipBackgroundStatusbar()
--GameCooltip:AddLine ("On: " .. (encounterTable.date:gsub (".*%s", "")), , 1, "orange")
--_detalhes:AddTooltipHeaderStatusbar()
if (not got_info) then
height = height + 25
else
height = height + 31
end
end
end
end
--GameCooltip:AddLine ("Class:", LOCALIZED_CLASS_NAMES_MALE [class])
--_detalhes:AddTooltipBackgroundStatusbar()
local damage = instance.showing (1, name)
local healing = instance.showing (2, name)
--GameCooltip:AddLine ("Damage:", _detalhes:ToK2 (damage and damage.total or 0))
--_detalhes:AddTooltipBackgroundStatusbar()
--GameCooltip:AddLine ("Healing:", _detalhes:ToK2 (healing and healing.total or 0))
--_detalhes:AddTooltipBackgroundStatusbar()
--
--GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, icon_size, 8/512, 70/512, 224/512, 306/512)
--_detalhes:AddTooltipBackgroundStatusbar()
--GameCooltip:SetOption ("FixedHeight", 114)
GameCooltip:SetOption ("FixedHeight", height)
GameCooltip:ShowCooltip()
@@ -2345,10 +2363,32 @@ local icon_frame_on_click_down = function (self)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left", 1, -1)
end
local icon_frame_on_click_up = function (self)
local icon_frame_on_click_up = function (self, button)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left")
if (button == "LeftButton") then
--> open the rank panel
local instance = _detalhes:GetInstance (self.row.instance_id)
if (instance) then
local attribute, subattribute = instance:GetDisplay()
local combat = instance:GetShowingCombat()
local diff = combat:GetDifficulty()
local bossInfo = combat:GetBossInfo()
if (attribute == 1 or attribute == 2 and bossInfo) then --if bossInfo is nil, means the combat isn't a boss
local db = _detalhes.OpenStorage()
if (db and bossInfo.id) then
local haveData = _detalhes.storage:HaveDataForEncounter (diff, bossInfo.id, true) --attempt to index local 'bossInfo' (a nil value)
if (haveData) then
_detalhes:OpenRaidHistoryWindow (bossInfo.zone, bossInfo.id, diff, attribute == 1 and "damage" or "healing", true, 1, false, 2)
end
end
end
end
return
end
if (_detalhes.in_combat) then
_detalhes:Msg (Loc ["STRING_QUERY_INSPECT_FAIL1"])
return
@@ -4446,11 +4486,11 @@ end
-- search key: ~row
function _detalhes:InstanceRefreshRows (instancia)
if (instancia) then
self = instancia
end
if (not self.barras or not self.barras[1]) then
return
end
@@ -4651,7 +4691,7 @@ function _detalhes:InstanceRefreshRows (instancia)
if (is_mirror) then
row.right_to_left_texture:Show()
else
else
row.right_to_left_texture:Hide()
end
@@ -4660,8 +4700,10 @@ function _detalhes:InstanceRefreshRows (instancia)
row.textura:SetVertexColor (texture_r, texture_g, texture_b, alpha)
row.right_to_left_texture:SetVertexColor (texture_r, texture_g, texture_b, alpha)
else
--automatically color the bar by the actor class
--forcing alpha 1 instead of use the alpha from the fixed color
local r, g, b = row.textura:GetVertexColor()
row.textura:SetVertexColor (r, g, b, alpha)
row.textura:SetVertexColor (r, g, b, 1) --alpha
end
--> text class color: if true color changes on the fly through class refresh
@@ -5832,6 +5874,10 @@ local segments_common_tex, segments_common_color = {0.5078125, 0.1171875, 0.0175
local unknown_boss_tex, unknown_boss_color = {0.14453125, 0.9296875, 0.2625, 0.6546875}, {1, 1, 1, 0.5}
local party_line_color = {170/255, 167/255, 255/255, 1}
local party_line_color_trash = {130/255, 130/255, 155/255, 1}
local party_line_color2 = {210/255, 200/255, 255/255, 1}
local party_line_color2_trash = {110/255, 110/255, 155/255, 1}
local party_wallpaper_tex, party_wallpaper_color, raid_wallpaper_tex = {0.09, 0.698125, 0, 0.833984375}, {1, 1, 1, 0.5}, {33/512, 361/512, 45/512, 295/512}
local segments_wallpaper_color = {1, 1, 1, 0.5}
@@ -5925,6 +5971,10 @@ function _detalhes:GetSegmentInfo (index)
end
function _detalhes:UnpackMythicDungeonInfo (t)
return t.OverallSegment, t.SegmentID, t.Level, t.EJID, t.MapID, t.ZoneName, t.EncounterID, t.EncounterName, t.StartedAt, t.EndedAt, t.RunID
end
local segments_used = 0
local segments_filled = 0
@@ -5946,7 +5996,7 @@ local build_segment_list = function (self, elapsed)
CoolTip:SetFixedParameter (instancia)
CoolTip:SetColor ("main", "transparent")
CoolTip:SetOption ("FixedWidthSub", 175)
CoolTip:SetOption ("FixedWidthSub", 195)
CoolTip:SetOption ("RightTextWidth", 105)
CoolTip:SetOption ("RightTextHeight", 12)
@@ -5970,6 +6020,11 @@ local build_segment_list = function (self, elapsed)
segments_used = 0
segments_filled = fill
local dungeon_color = party_line_color
local dungeon_color_trash = party_line_color_trash
local dungeon_run_id = false
--> history table (segments container)
for i = _detalhes.segments_amount, 1, -1 do
if (i <= fill) then
@@ -5977,17 +6032,122 @@ local build_segment_list = function (self, elapsed)
local thisCombat = _detalhes.tabela_historico.tabelas [i]
if (thisCombat) then
local enemy = thisCombat.is_boss and thisCombat.is_boss.name
local segment_info_added = false
segments_used = segments_used + 1
--print (thisCombat.is_boss.name, thisCombat.instance_type, _detalhes:GetRaidIcon (thisCombat.is_boss.mapid), thisCombat.is_boss.ej_instance_id)
if (thisCombat.is_mythic_dungeon_segment) then
if (thisCombat.is_boss and thisCombat.is_boss.name) then
local mythicDungeonInfo = thisCombat:GetMythicDungeonInfo()
if (mythicDungeonInfo) then
--> is a boss, trash overall or run overall segment
local bossInfo = thisCombat.is_boss
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = _detalhes:UnpackMythicDungeonInfo (mythicDungeonInfo)
local combat_time = thisCombat:GetCombatTime()
if (not dungeon_run_id) then
dungeon_run_id = runID
else
if (dungeon_run_id ~= runID) then
dungeon_color = dungeon_color == party_line_color and party_line_color2 or party_line_color
dungeon_color_trash = dungeon_color_trash == party_line_color_trash and party_line_color2_trash or party_line_color_trash
dungeon_run_id = runID
end
end
--> is mythic overall
if (isMythicOverallSegment) then
--mostrar o tempo da dungeon
local totalTime = combat_time
--CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (overall)", _detalhes.gump:IntegerToTimer (totalTime), 1, dungeon_color)
CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color)
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")", nil, 2, "white", "white")
else
if (segmentID == "trashoverall") then
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color, "gray")
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", nil, 2, "white", "white")
else
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
CoolTip:AddLine ((encounterName or Loc ["STRING_UNKNOW"]) .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", nil, 2, "white", "white")
end
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
end
local portrait = (thisCombat.is_boss and thisCombat.is_boss.bossimage) or _detalhes:GetBossPortrait (nil, nil, encounterName, EJID)
if (portrait) then
CoolTip:AddIcon (portrait, 2, "top", 128, 64, 0, 1, 0, 0.96)
end
local backgroundImage = _detalhes:GetRaidIcon (mapID, EJID, "party")
if (backgroundImage) then
CoolTip:SetWallpaper (2, backgroundImage, {0.070, 0.695, 0.087, 0.566}, {1, 1, 1, 0.5}, true) -- party_wallpaper_tex -- {0.09, 0.698125, .17, 0.833984375}
end
--> sub menu
local decorrido = thisCombat:GetCombatTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
--CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
if (segmentID == "trashoverall") then
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
local totalRealTime = endedAt - startedAt
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (endedAt - startedAt) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
elseif (isMythicOverallSegment) then
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
local totalRealTime = endedAt - startedAt
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (totalRealTime) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
else
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
end
if (thisCombat.is_boss) then
CoolTip:AddLine ("", "", 2, "white", "white")
end
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
else
--> the combat has mythic dungeon tag but doesn't have a mythic dungeon table information
--> so this is a trash cleanup segment
local trashInfo = thisCombat:GetMythicDungeonTrashInfo()
CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"] .. " (#" .. i .. ")", _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 1, dungeon_color_trash, "gray")
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.02734375, 0.11328125, 0.19140625, 0.3125, "red")
CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512, nil, nil, true)
--submenu
CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 2, "white", "white")
CoolTip:AddLine ("", "", 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
if (trashInfo) then
local backgroundImage = _detalhes:GetRaidIcon (trashInfo.MapID, trashInfo.EJID, "party")
if (backgroundImage) then
CoolTip:SetWallpaper (2, backgroundImage, party_wallpaper_tex, {1, 1, 1, 0.5}, true)
end
end
end
segment_info_added = true
elseif (thisCombat.is_boss and thisCombat.is_boss.name) then
local try_number = thisCombat.is_boss.try_number
local combat_time = thisCombat:GetCombatTime()
if (thisCombat.instance_type == "party") then
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, party_line_color)
CoolTip:AddLine (thisCombat.is_boss.name .." (#"..i..")", _, 1, dungeon_color)
elseif (thisCombat.is_boss.killed) then
if (try_number) then
local m, s = _math_floor (combat_time/60), _math_floor (combat_time%60)
@@ -6034,16 +6194,16 @@ local build_segment_list = function (self, elapsed)
if (_detalhes.tooltip.submenu_wallpaper) then
local background = _detalhes:GetRaidIcon (thisCombat.is_boss.mapid)
if (background) then
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color, true)
else
local ej_id = thisCombat.is_boss.ej_instance_id
if (ej_id and ej_id ~= 0) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
if (name) then
if (thisCombat.instance_type == "party") then
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color, true)
else
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color, true)
end
end
else
@@ -6063,7 +6223,7 @@ local build_segment_list = function (self, elapsed)
if (_detalhes.tooltip.submenu_wallpaper) then
local file, coords = _detalhes:GetBattlegroundInfo (thisCombat.is_pvp.mapid)
if (file) then
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color, true)
end
else
--> wallpaper = main window
@@ -6078,7 +6238,7 @@ local build_segment_list = function (self, elapsed)
if (_detalhes.tooltip.submenu_wallpaper) then
local file, coords = _detalhes:GetArenaInfo (thisCombat.is_arena.mapid)
if (file) then
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color, true)
end
else
--> wallpaper = main window
@@ -6099,7 +6259,7 @@ local build_segment_list = function (self, elapsed)
end
if (_detalhes.tooltip.submenu_wallpaper) then
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color, true)
else
--> wallpaper = main window
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
@@ -6109,14 +6269,15 @@ local build_segment_list = function (self, elapsed)
CoolTip:AddMenu (1, instancia.TrocaTabela, i)
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
local decorrido = thisCombat:GetCombatTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
if (not segment_info_added) then
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
local decorrido = thisCombat:GetCombatTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
end
fight_amount = fight_amount + 1
else
@@ -6143,14 +6304,123 @@ local build_segment_list = function (self, elapsed)
GameCooltip:AddLine ("$div", nil, nil, -5, -13)
----------- current
CoolTip:AddLine (segmentos.current_standard, _, 1, "white")
CoolTip:AddMenu (1, instancia.TrocaTabela, 0)
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange")
local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--"
local file, coords
if (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then
local thisCombat = _detalhes.tabela_vigente
local segment_info_added
--> add the new line
CoolTip:AddLine (segmentos.current_standard, _, 1, "white")
CoolTip:AddMenu (1, instancia.TrocaTabela, 0)
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange")
--
--> current segment is a dungeon mythic+?
if (thisCombat.is_mythic_dungeon_segment) then
local mythicDungeonInfo = thisCombat:GetMythicDungeonInfo()
if (mythicDungeonInfo) then
--> is a boss, trash overall or run overall segment
local bossInfo = thisCombat.is_boss
local isMythicOverallSegment, segmentID, mythicLevel, EJID, mapID, zoneName, encounterID, encounterName, startedAt, endedAt, runID = _detalhes:UnpackMythicDungeonInfo (mythicDungeonInfo)
local combat_time = thisCombat:GetCombatTime()
if (not dungeon_run_id) then
dungeon_run_id = runID
else
if (dungeon_run_id ~= runID) then
dungeon_color = dungeon_color == party_line_color and party_line_color2 or party_line_color
dungeon_color_trash = dungeon_color_trash == party_line_color_trash and party_line_color2_trash or party_line_color_trash
dungeon_run_id = runID
end
end
--> is mythic overall
if (isMythicOverallSegment) then
--mostrar o tempo da dungeon
local totalTime = combat_time
--CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (overall)", _detalhes.gump:IntegerToTimer (totalTime), 1, dungeon_color)
--CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (overall)", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color)
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
CoolTip:AddLine (zoneName .. " +" .. mythicLevel .. " (" .. Loc ["STRING_SEGMENTS_LIST_OVERALL"] .. ")", nil, 2, "white", "white")
else
if (segmentID == "trashoverall") then
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", _detalhes.gump:IntegerToTimer (endedAt - startedAt), 1, dungeon_color, "gray")
CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_TRASH"] .. ")", nil, 2, "white", "white")
else
--CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", _detalhes.gump:IntegerToTimer (combat_time), 1, dungeon_color, "gray")
CoolTip:AddLine (encounterName .. " (" .. Loc ["STRING_SEGMENTS_LIST_BOSS"] .. ")", nil, 2, "white", "white")
end
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512)
end
local portrait = (thisCombat.is_boss and thisCombat.is_boss.bossimage) or _detalhes:GetBossPortrait (nil, nil, encounterName, EJID)
if (portrait) then
CoolTip:AddIcon (portrait, 2, "top", 128, 64, 0, 1, 0, 0.96)
end
local backgroundImage = _detalhes:GetRaidIcon (mapID, EJID, "party")
if (backgroundImage) then
CoolTip:SetWallpaper (2, backgroundImage, {0.070, 0.695, 0.087, 0.566}, {1, 1, 1, 0.5}, true) -- party_wallpaper_tex -- {0.09, 0.698125, .17, 0.833984375}
end
--> sub menu
local decorrido = thisCombat:GetCombatTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
--CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
if (segmentID == "trashoverall") then
local totalRealTime = endedAt - startedAt
CoolTip:AddLine (Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (endedAt - startedAt) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
elseif (isMythicOverallSegment) then
CoolTip:AddLine (Loc["STRING_SEGMENTS_LIST_TIMEINCOMBAT"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
local totalRealTime = endedAt - startedAt
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_TOTALTIME"] .. ":", _detalhes.gump:IntegerToTimer (totalRealTime) .. " [|cFFFF3300" .. _detalhes.gump:IntegerToTimer (totalRealTime - decorrido) .. "|r]", 2, "white", "white")
else
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (decorrido), 2, "white", "white")
end
if (thisCombat.is_boss) then
CoolTip:AddLine ("", "", 2, "white", "white")
end
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
else
--> the combat has mythic dungeon tag but doesn't have a mythic dungeon table information
--> so this is a trash cleanup segment
local trashInfo = thisCombat:GetMythicDungeonTrashInfo()
--CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"], _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 1, dungeon_color_trash, "gray")
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.02734375, 0.11328125, 0.19140625, 0.3125, "red")
--CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 14, 10, 479/512, 510/512, 24/512, 51/512, nil, nil, true)
--submenu
CoolTip:AddLine (Loc ["STRING_SEGMENT_TRASH"], nil, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", _detalhes.gump:IntegerToTimer (thisCombat:GetCombatTime()), 2, "white", "white")
CoolTip:AddLine ("", "", 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", thisCombat.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", thisCombat.data_fim or "in progress", 2, "white", "white")
local backgroundImage = _detalhes:GetRaidIcon (trashInfo.MapID, trashInfo.EJID, "party")
if (backgroundImage) then
CoolTip:SetWallpaper (2, backgroundImage, party_wallpaper_tex, {1, 1, 1, 0.5}, true)
end
end
segment_info_added = true
elseif (_detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name) then
local portrait = _detalhes:GetBossPortrait (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) or _detalhes.tabela_vigente.is_boss.bossimage
if (portrait) then
CoolTip:AddIcon (portrait, 2, "top", 128, 64)
@@ -6173,16 +6443,16 @@ local build_segment_list = function (self, elapsed)
if (_detalhes.tooltip.submenu_wallpaper) then
local background = _detalhes:GetRaidIcon (_detalhes.tabela_vigente.is_boss.mapid)
if (background) then
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color)
CoolTip:SetWallpaper (2, background, nil, segments_wallpaper_color, true)
else
local ej_id = _detalhes.tabela_vigente.is_boss.ej_instance_id
if (ej_id and ej_id ~= 0) then
local name, description, bgImage, buttonImage, loreImage, dungeonAreaMapID, link = EJ_GetInstanceInfo (ej_id)
if (name) then
if (_detalhes.tabela_vigente.instance_type == "party") then
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color)
CoolTip:SetWallpaper (2, bgImage, party_wallpaper_tex, party_wallpaper_color, true)
else
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color)
CoolTip:SetWallpaper (2, loreImage, raid_wallpaper_tex, party_wallpaper_color, true)
end
end
end
@@ -6191,6 +6461,7 @@ local build_segment_list = function (self, elapsed)
--> wallpaper = main window
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
elseif (_detalhes.tabela_vigente.is_pvp) then
enemy = _detalhes.tabela_vigente.is_pvp.name
file, coords = _detalhes:GetBattlegroundInfo (_detalhes.tabela_vigente.is_pvp.mapid)
@@ -6199,41 +6470,43 @@ local build_segment_list = function (self, elapsed)
file, coords = _detalhes:GetArenaInfo (_detalhes.tabela_vigente.is_arena.mapid)
else
if (_detalhes.tooltip.submenu_wallpaper) then
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, {1, 1, 1, 0.5}, true)
else
--> wallpaper = main window
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
end
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
if (_detalhes.tooltip.submenu_wallpaper) then
if (file) then
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color)
CoolTip:SetWallpaper (2, "Interface\\Glues\\LOADINGSCREENS\\" .. file, coords, empty_segment_color, true)
end
else
--> wallpaper = main window
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
if (not _detalhes.tabela_vigente:GetEndTime()) then
if (_detalhes.in_combat) then
if (not segment_info_added) then
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy, 2, "white", "white")
if (not _detalhes.tabela_vigente:GetEndTime()) then
if (_detalhes.in_combat) then
local decorrido = _detalhes.tabela_vigente:GetCombatTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
else
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", "--x--x--", 2, "white", "white")
end
else
local decorrido = _detalhes.tabela_vigente:GetCombatTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
else
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", "--x--x--", 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
end
else
local decorrido = _detalhes.tabela_vigente:GetCombatTime()
local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60)
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
end
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white")
end
--> fill é a quantidade de menu que esta sendo mostrada
if (instancia.segmento == 0) then
if (fill - 2 == menuIndex) then
@@ -6260,12 +6533,10 @@ local build_segment_list = function (self, elapsed)
local combat_time = _detalhes.tabela_overall:GetCombatTime()
local minutos, segundos = _math_floor (combat_time / 60), _math_floor (combat_time % 60)
CoolTip:AddLine (Loc ["STRING_SEGMENT_TIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
--CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color)
--CoolTip:SetWallpaper (2, [[Interface\PetBattles\MountJournal-NoMounts]], {0, 403/512, 0, 294/512}, {.5, .5, .5, 0.9})
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
if (_detalhes.tooltip.submenu_wallpaper) then
CoolTip:SetWallpaper (2, [[Interface\PetPaperDollFrame\PetStatsBG-Hunter]], {321/512, 0, 0, 190/512}, {1, 1, 1, 0.9})
CoolTip:SetWallpaper (2, [[Interface\PetPaperDollFrame\PetStatsBG-Hunter]], {321/512, 0, 0, 190/512}, {1, 1, 1, 0.9}, true)
else
--> wallpaper = main window
CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)