- Fixed Player Details! Breakdown window not opening for new installs.

This commit is contained in:
Tercioo
2019-01-25 16:00:17 -02:00
parent 2c71a6428c
commit 05cb5eeaf2
10 changed files with 190 additions and 48 deletions
+106 -1
View File
@@ -4866,6 +4866,7 @@ end
local detailsOnDeathMenu = CreateFrame ("frame", "DetailsOnDeathMenu", UIParent)
detailsOnDeathMenu:SetHeight (30)
detailsOnDeathMenu.Debug = false
detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED")
detailsOnDeathMenu:RegisterEvent ("ENCOUNTER_END")
DetailsFramework:ApplyStandardBackdrop (detailsOnDeathMenu)
@@ -4895,6 +4896,8 @@ function detailsOnDeathMenu.OpenEncounterBreakdown()
end
Details:OpenPlugin ("Encounter Breakdown")
GameCooltip2:Hide()
end
function detailsOnDeathMenu.OpenPlayerEndurance()
@@ -4911,6 +4914,8 @@ function detailsOnDeathMenu.OpenPlayerEndurance()
C_Timer.After (0, function()
local a = Details_DeathGraphsModeEnduranceButton and Details_DeathGraphsModeEnduranceButton.MyObject:Click()
end)
GameCooltip2:Hide()
end
function detailsOnDeathMenu.OpenPlayerSpells()
@@ -4954,7 +4959,8 @@ function detailsOnDeathMenu.OpenPlayerSpells()
Details:OpenPlayerDetails (1)
end
end
GameCooltip2:Hide()
end
--encounter breakdown button
@@ -4963,18 +4969,117 @@ detailsOnDeathMenu.breakdownButton:SetTemplate (_detalhes.gump:GetTemplate ("but
detailsOnDeathMenu.breakdownButton:SetPoint ("topleft", detailsOnDeathMenu, "topleft", 5, -5)
detailsOnDeathMenu.breakdownButton:Hide()
detailsOnDeathMenu.breakdownButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Show a panel with:")
GameCooltip2:AddLine ("- Player Damage Taken")
GameCooltip2:AddLine ("- Damage Taken by Spell")
GameCooltip2:AddLine ("- Enemy Damage Taken")
GameCooltip2:AddLine ("- Player Deaths")
GameCooltip2:AddLine ("- Interrupts and Dispells")
GameCooltip2:AddLine ("- Damage Done Chart")
GameCooltip2:AddLine ("- Damage Per Phase")
GameCooltip2:AddLine ("- Weakauras Tool")
if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")) then
GameCooltip2:AddLine ("Encounter Breakdown plugin is disabled in the Addon Control Panel.", "", 1, "red")
end
end, --> called when user mouse over the frame
OnEnterFunc = function (self)
detailsOnDeathMenu.button_mouse_over = true
end,
OnLeaveFunc = function (self)
detailsOnDeathMenu.button_mouse_over = false
end,
FixedValue = "none",
ShowSpeed = .5,
Options = function()
GameCooltip:SetOption ("MyAnchor", "top")
GameCooltip:SetOption ("RelativeAnchor", "bottom")
GameCooltip:SetOption ("WidthAnchorMod", 0)
GameCooltip:SetOption ("HeightAnchorMod", -13)
GameCooltip:SetOption ("TextSize", 10)
GameCooltip:SetOption ("FixedWidth", 220)
end
}
GameCooltip2:CoolTipInject (detailsOnDeathMenu.breakdownButton)
--player endurance button
detailsOnDeathMenu.enduranceButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerEndurance, 120, 20, "Player Endurance", "enduranceButton")
detailsOnDeathMenu.enduranceButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.enduranceButton:SetPoint ("topleft", detailsOnDeathMenu.breakdownButton, "topright", 2, 0)
detailsOnDeathMenu.enduranceButton:Hide()
detailsOnDeathMenu.enduranceButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Open Player Endurance Breakdown")
GameCooltip2:AddLine ("")
GameCooltip2:AddLine ("Player endurance is calculated using the amount of player deaths.")
GameCooltip2:AddLine ("By default the plugin register the three first player deaths on each encounter to calculate who is under performing.")
--GameCooltip2:AddLine (" ")
if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_DEATH_GRAPHICS")) then
GameCooltip2:AddLine ("Advanced Death Logs plugin is disabled or not installed, check the Addon Control Panel or download it from the Twitch APP.", "", 1, "red")
end
end, --> called when user mouse over the frame
OnEnterFunc = function (self)
detailsOnDeathMenu.button_mouse_over = true
end,
OnLeaveFunc = function (self)
detailsOnDeathMenu.button_mouse_over = false
end,
FixedValue = "none",
ShowSpeed = .5,
Options = function()
GameCooltip:SetOption ("MyAnchor", "top")
GameCooltip:SetOption ("RelativeAnchor", "bottom")
GameCooltip:SetOption ("WidthAnchorMod", 0)
GameCooltip:SetOption ("HeightAnchorMod", -13)
GameCooltip:SetOption ("TextSize", 10)
GameCooltip:SetOption ("FixedWidth", 220)
end
}
GameCooltip2:CoolTipInject (detailsOnDeathMenu.enduranceButton)
--spells
detailsOnDeathMenu.spellsButton = _detalhes.gump:CreateButton (detailsOnDeathMenu, detailsOnDeathMenu.OpenPlayerSpells, 48, 20, "Spells", "SpellsButton")
detailsOnDeathMenu.spellsButton:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE"))
detailsOnDeathMenu.spellsButton:SetPoint ("topleft", detailsOnDeathMenu.enduranceButton, "topright", 2, 0)
detailsOnDeathMenu.spellsButton:Hide()
detailsOnDeathMenu.spellsButton.CoolTip = {
Type = "tooltip",
BuildFunc = function()
GameCooltip2:Preset (2)
GameCooltip2:AddLine ("Open your player Details! breakdown.")
end, --> called when user mouse over the frame
OnEnterFunc = function (self)
detailsOnDeathMenu.button_mouse_over = true
end,
OnLeaveFunc = function (self)
detailsOnDeathMenu.button_mouse_over = false
end,
FixedValue = "none",
ShowSpeed = .5,
Options = function()
GameCooltip:SetOption ("MyAnchor", "top")
GameCooltip:SetOption ("RelativeAnchor", "bottom")
GameCooltip:SetOption ("WidthAnchorMod", 0)
GameCooltip:SetOption ("HeightAnchorMod", -13)
GameCooltip:SetOption ("TextSize", 10)
GameCooltip:SetOption ("FixedWidth", 220)
end
}
GameCooltip2:CoolTipInject (detailsOnDeathMenu.spellsButton)
function detailsOnDeathMenu.CanShowPanel()
if (StaticPopup_Visible ("DEATH")) then
if (not _detalhes.on_death_menu) then