General Updates
- Fixed an error while scrolling down target npcs in the breakdown window. - Fixed an error when clicking to open the Death Recap by Details!. - End of Mythic Run panel got updates. - Framework updated: new rounded tooltips.
This commit is contained in:
@@ -44,3 +44,4 @@ photoshop/ten_years_skin.tga
|
||||
*.yml
|
||||
plugins/Details_EncounterDetails/Libs/LibLuaServer/LuaServerDefinitions.lua
|
||||
plugins/Details_EncounterDetails/Definitions.lua
|
||||
*.afphoto~lock~
|
||||
|
||||
@@ -96,6 +96,7 @@ frames\window_breakdown\breakdown_spells_genericframes.lua
|
||||
frames\window_breakdown\breakdown_spells_spellframes.lua
|
||||
frames\window_breakdown\breakdown_spells_targetframes.lua
|
||||
frames\window_breakdown\breakdown_spells_phaseframes.lua
|
||||
frames\window_mythicplus\window_mythic_breakdown.lua
|
||||
frames\window_report.lua
|
||||
frames\window_main.lua
|
||||
frames\window_custom.lua
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
## Interface: 11404
|
||||
## Interface: 11500
|
||||
## Title: Details! Damage Meter
|
||||
## Notes: Essential tool to impress that chick in your raid.
|
||||
## SavedVariables: _detalhes_global, __details_backup
|
||||
@@ -91,6 +91,7 @@ frames\window_breakdown\breakdown_spells_genericframes.lua
|
||||
frames\window_breakdown\breakdown_spells_spellframes.lua
|
||||
frames\window_breakdown\breakdown_spells_targetframes.lua
|
||||
frames\window_breakdown\breakdown_spells_phaseframes.lua
|
||||
frames\window_mythicplus\window_mythic_breakdown.lua
|
||||
frames\window_report.lua
|
||||
frames\window_main.lua
|
||||
frames\window_custom.lua
|
||||
|
||||
@@ -91,6 +91,7 @@ frames\window_breakdown\breakdown_spells_genericframes.lua
|
||||
frames\window_breakdown\breakdown_spells_spellframes.lua
|
||||
frames\window_breakdown\breakdown_spells_targetframes.lua
|
||||
frames\window_breakdown\breakdown_spells_phaseframes.lua
|
||||
frames\window_mythicplus\window_mythic_breakdown.lua
|
||||
frames\window_report.lua
|
||||
frames\window_main.lua
|
||||
frames\window_custom.lua
|
||||
|
||||
+51
-1
@@ -15,7 +15,7 @@ local max = math.max
|
||||
|
||||
--api locals
|
||||
local PixelUtil = PixelUtil or DFPixelUtil
|
||||
local version = 18
|
||||
local version = 19
|
||||
|
||||
local CONST_MENU_TYPE_MAINMENU = "main"
|
||||
local CONST_MENU_TYPE_SUBMENU = "sub"
|
||||
@@ -227,10 +227,23 @@ function DF:CreateCoolTip()
|
||||
|
||||
gameCooltip.defaultFont = DF:GetBestFontForLanguage()
|
||||
|
||||
gameCooltip.RoundedFramePreset = {
|
||||
color = {.075, .075, .075, 1},
|
||||
border_color = {.2, .2, .2, 1},
|
||||
roundness = 8,
|
||||
}
|
||||
|
||||
--create frames, self is frame1 or frame2
|
||||
local createTooltipFrames = function(self)
|
||||
self:SetSize(500, 500)
|
||||
self:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
|
||||
|
||||
if (not self.HaveRoundedCorners) then
|
||||
DF:AddRoundedCornersToFrame(self, gameCooltip.RoundedFramePreset)
|
||||
self:DisableRoundedCorners()
|
||||
self.HaveRoundedCorners = true
|
||||
end
|
||||
|
||||
self:SetBackdrop(defaultBackdrop)
|
||||
self:SetBackdropColor(DF:ParseColors(defaultBackdropColor))
|
||||
self:SetBackdropBorderColor(DF:ParseColors(defaultBackdropBorderColor))
|
||||
@@ -348,6 +361,33 @@ function DF:CreateCoolTip()
|
||||
DF:CreateFlashAnimation(frame2)
|
||||
end
|
||||
|
||||
function GameCooltip:ShowRoundedCorner()
|
||||
if (not frame1.HaveRoundedCorners) then
|
||||
return
|
||||
end
|
||||
|
||||
frame1:EnableRoundedCorners()
|
||||
frame2:EnableRoundedCorners()
|
||||
|
||||
frame1:SetBackdrop(nil)
|
||||
frame2:SetBackdrop(nil)
|
||||
|
||||
frame1.frameBackgroundTexture:Hide()
|
||||
frame2.frameBackgroundTexture:Hide()
|
||||
end
|
||||
|
||||
function GameCooltip:HideRoundedCorner()
|
||||
if (not frame1.HaveRoundedCorners) then
|
||||
return
|
||||
end
|
||||
|
||||
frame1:DisableRoundedCorners()
|
||||
frame2:DisableRoundedCorners()
|
||||
|
||||
frame1.frameBackgroundTexture:Show()
|
||||
frame2.frameBackgroundTexture:Show()
|
||||
end
|
||||
|
||||
gameCooltip.frame1 = frame1
|
||||
gameCooltip.frame2 = frame2
|
||||
DF:FadeFrame(frame1, 0)
|
||||
@@ -1929,6 +1969,8 @@ function DF:CreateCoolTip()
|
||||
|
||||
--mana range
|
||||
--instant cooldown
|
||||
|
||||
gameCooltip:ShowRoundedCorner()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2628,6 +2670,10 @@ function DF:CreateCoolTip()
|
||||
gameCooltip:HideSelectedTexture(frame1)
|
||||
gameCooltip:HideSelectedTexture(frame2)
|
||||
|
||||
gameCooltip:HideRoundedCorner()
|
||||
GameCooltip.frame1:SetBorderCornerColor(unpack(gameCooltip.RoundedFramePreset.border_color))
|
||||
GameCooltip.frame2:SetBorderCornerColor(unpack(gameCooltip.RoundedFramePreset.border_color))
|
||||
|
||||
gameCooltip.FixedValue = nil
|
||||
gameCooltip.HaveSubMenu = false
|
||||
gameCooltip.SelectedIndexMain = nil
|
||||
@@ -2704,6 +2750,8 @@ function DF:CreateCoolTip()
|
||||
if (not fromPreset) then
|
||||
gameCooltip:Preset(3, true)
|
||||
end
|
||||
|
||||
GameCooltip:SetType("tooltip")
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------
|
||||
@@ -2712,6 +2760,8 @@ function DF:CreateCoolTip()
|
||||
function gameCooltip:AddMenu(menuType, func, param1, param2, param3, leftText, leftIcon, indexUp)
|
||||
menuType = gameCooltip:ParseMenuType(menuType)
|
||||
|
||||
gameCooltip:SetType("menu")
|
||||
|
||||
if (leftText and indexUp and (menuType == CONST_MENU_TYPE_MAINMENU)) then
|
||||
gameCooltip.Indexes = gameCooltip.Indexes + 1
|
||||
if (not gameCooltip.IndexesSub[gameCooltip.Indexes]) then
|
||||
|
||||
+2
-3
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 498
|
||||
local dversion = 502
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary(major, minor)
|
||||
|
||||
@@ -696,7 +696,7 @@ end
|
||||
function DF.table.duplicate(t1, t2)
|
||||
for key, value in pairs(t2) do
|
||||
if (key ~= "__index" and key ~= "__newindex") then
|
||||
--preserve a wowObject passing it to the new table with copying it
|
||||
--preserve a UIObject passing it to the new table with copying it
|
||||
if (type(value) == "table" and table.GetObjectType and table:GetObjectType()) then
|
||||
t1[key] = value
|
||||
|
||||
@@ -2799,7 +2799,6 @@ function DF:CreateAnimation(animation, animationType, order, duration, arg1, arg
|
||||
|
||||
elseif (animationType == "ROTATION") then
|
||||
anim:SetDegrees(arg1) --degree
|
||||
--print("SetOrigin", arg2, arg3, arg4)
|
||||
anim:SetOrigin(arg2 or "center", arg3 or 0, arg4 or 0) --point, x, y
|
||||
|
||||
elseif (animationType == "TRANSLATION") then
|
||||
|
||||
+1
-1
@@ -291,7 +291,7 @@ detailsFramework:Mixin(LabelMetaFunctions, detailsFramework.ScriptHookMixin)
|
||||
|
||||
---create a new label object
|
||||
---@param parent frame
|
||||
---@param text string
|
||||
---@param text string|table for used for localization, expects a locTable from the language system
|
||||
---@param size number|nil
|
||||
---@param color any|nil
|
||||
---@param font string|nil
|
||||
|
||||
+2
-1
@@ -60,9 +60,10 @@ detailsFramework.TooltipHandlerMixin = {
|
||||
end
|
||||
end
|
||||
|
||||
if (tooltipText) then
|
||||
if (tooltipText and tooltipText ~= "") then
|
||||
GameCooltip:Preset(2)
|
||||
GameCooltip:AddLine(tooltipText)
|
||||
GameCooltip:ShowRoundedCorner()
|
||||
GameCooltip:ShowCooltip(getFrame(self), "tooltip")
|
||||
end
|
||||
end,
|
||||
|
||||
+42
-4
@@ -4079,9 +4079,25 @@ detailsFramework.RadioGroupCoreFunctions = {
|
||||
local checkbox = detailsFramework:CreateSwitch(self, function()end, false)
|
||||
checkbox:SetTemplate(detailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
|
||||
checkbox:SetAsCheckBox()
|
||||
|
||||
if (self.options.rounded_corner_preset) then
|
||||
checkbox:SetBackdrop(nil)
|
||||
detailsFramework:AddRoundedCornersToFrame(checkbox, self.options.rounded_corner_preset)
|
||||
end
|
||||
|
||||
if (self.options.checked_texture) then
|
||||
checkbox:SetCheckedTexture(self.options.checked_texture, self.options.checked_texture_offset_x, self.options.checked_texture_offset_y)
|
||||
end
|
||||
|
||||
checkbox.Icon = detailsFramework:CreateImage(checkbox, "", 16, 16)
|
||||
checkbox.Label = detailsFramework:CreateLabel(checkbox, "")
|
||||
self.allCheckBoxes[#self.allCheckBoxes + 1] = checkbox
|
||||
|
||||
if (self.options.on_create_checkbox) then
|
||||
--use dispatch
|
||||
detailsFramework:QuickDispatch(self.options.on_create_checkbox, self, checkbox)
|
||||
end
|
||||
|
||||
return checkbox
|
||||
end,
|
||||
|
||||
@@ -4107,6 +4123,10 @@ detailsFramework.RadioGroupCoreFunctions = {
|
||||
if (checkbox._callback) then
|
||||
detailsFramework:QuickDispatch(checkbox._callback, fixedParam, checkbox._optionid)
|
||||
end
|
||||
|
||||
if (radioGroup.options.on_click_option) then
|
||||
detailsFramework:QuickDispatch(radioGroup.options.on_click_option, radioGroup, checkbox, fixedParam, checkbox._optionid)
|
||||
end
|
||||
end,
|
||||
|
||||
RefreshCheckbox = function(self, checkbox, optionTable, optionId)
|
||||
@@ -4123,8 +4143,8 @@ detailsFramework.RadioGroupCoreFunctions = {
|
||||
checkbox._optionid = optionId
|
||||
checkbox:SetFixedParameter(optionTable.param or optionId)
|
||||
|
||||
local isChecked = type(optionTable.get) == "function" and detailsFramework:Dispatch(optionTable.get) or false
|
||||
checkbox:SetValue(isChecked)
|
||||
local bIsChecked = type(optionTable.get) == "function" and detailsFramework:Dispatch(optionTable.get) or false
|
||||
checkbox:SetValue(bIsChecked)
|
||||
|
||||
checkbox.Label.text = optionTable.name
|
||||
checkbox.Label.textsize = optionTable.text_size or self.options.text_size
|
||||
@@ -4134,7 +4154,7 @@ detailsFramework.RadioGroupCoreFunctions = {
|
||||
if (optionTable.texture) then
|
||||
checkbox.Icon:SetTexture(optionTable.texture)
|
||||
checkbox.Icon:SetSize(width, height)
|
||||
checkbox.Icon:SetPoint("left", checkbox, "right", 2, 0)
|
||||
checkbox.Icon:SetPoint("left", checkbox, "right", self.AnchorOptions.icon_offset_x, 0)
|
||||
checkbox.Label:SetPoint("left", checkbox.Icon, "right", 2, 0)
|
||||
checkbox.tooltip = optionTable.tooltip
|
||||
|
||||
@@ -4143,6 +4163,12 @@ detailsFramework.RadioGroupCoreFunctions = {
|
||||
else
|
||||
checkbox.Icon:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
|
||||
if (optionTable.mask) then
|
||||
checkbox.Icon:SetMask(optionTable.mask)
|
||||
else
|
||||
checkbox.Icon:SetMask(nil)
|
||||
end
|
||||
else
|
||||
checkbox.Icon:SetTexture("")
|
||||
checkbox.Label:SetPoint("left", checkbox, "right", 2, 0)
|
||||
@@ -4177,7 +4203,19 @@ detailsFramework.RadioGroupCoreFunctions = {
|
||||
totalWidth = math.max(self.AnchorOptions.min_width * #radioOptions, totalWidth)
|
||||
end
|
||||
|
||||
self:SetSize(totalWidth, maxHeight)
|
||||
if (not self.AnchorOptions.width) then
|
||||
self:SetWidth(totalWidth)
|
||||
else
|
||||
self:SetWidth(self.AnchorOptions.width)
|
||||
end
|
||||
|
||||
if (not self.AnchorOptions.height) then
|
||||
self:SetHeight(maxHeight)
|
||||
else
|
||||
self:SetHeight(self.AnchorOptions.height)
|
||||
end
|
||||
|
||||
self.AnchorOptions.start_y = -5
|
||||
|
||||
--sending false to automatically use the radio group children
|
||||
self:ArrangeFrames(false, self.AnchorOptions)
|
||||
|
||||
@@ -74,6 +74,7 @@ local cornerNames = {"TopLeft", "TopRight", "BottomLeft", "BottomRight"}
|
||||
---@field GetMaxFrameLevel fun(self:df_roundedpanel) : number --return the max frame level of the frame and its children
|
||||
|
||||
---@class df_roundedpanel : frame, df_roundedcornermixin, df_optionsmixin, df_titlebar
|
||||
---@field disabled boolean
|
||||
---@field bHasBorder boolean
|
||||
---@field bHasTitleBar boolean
|
||||
---@field options df_roundedpanel_options
|
||||
@@ -286,6 +287,10 @@ detailsFramework.RoundedCornerPanelMixin = {
|
||||
---adjust the size of the corner textures and the border edge textures
|
||||
---@param self df_roundedpanel
|
||||
OnSizeChanged = function(self)
|
||||
if (self.disabled) then
|
||||
return
|
||||
end
|
||||
|
||||
--if the frame has a titlebar, need to adjust the size of the titlebar
|
||||
if (self.bHasTitleBar) then
|
||||
self.TitleBar:SetWidth(self:GetWidth() - 14)
|
||||
@@ -351,6 +356,44 @@ detailsFramework.RoundedCornerPanelMixin = {
|
||||
end
|
||||
end,
|
||||
|
||||
DisableRoundedCorners = function(self)
|
||||
self.TopLeft:Hide()
|
||||
self.TopRight:Hide()
|
||||
self.BottomLeft:Hide()
|
||||
self.BottomRight:Hide()
|
||||
self.CenterBlock:Hide()
|
||||
self.TopEdgeBorder:Hide()
|
||||
self.BottomEdgeBorder:Hide()
|
||||
self.LeftEdgeBorder:Hide()
|
||||
self.RightEdgeBorder:Hide()
|
||||
self.TopLeftBorder:Hide()
|
||||
self.TopRightBorder:Hide()
|
||||
self.BottomLeftBorder:Hide()
|
||||
self.BottomRightBorder:Hide()
|
||||
self.TopHorizontalEdge:Hide()
|
||||
self.BottomHorizontalEdge:Hide()
|
||||
self.disabled = true
|
||||
end,
|
||||
|
||||
EnableRoundedCorners = function(self)
|
||||
self.TopLeft:Show()
|
||||
self.TopRight:Show()
|
||||
self.BottomLeft:Show()
|
||||
self.BottomRight:Show()
|
||||
self.CenterBlock:Show()
|
||||
self.TopEdgeBorder:Show()
|
||||
self.BottomEdgeBorder:Show()
|
||||
self.LeftEdgeBorder:Show()
|
||||
self.RightEdgeBorder:Show()
|
||||
self.TopLeftBorder:Show()
|
||||
self.TopRightBorder:Show()
|
||||
self.BottomLeftBorder:Show()
|
||||
self.BottomRightBorder:Show()
|
||||
self.TopHorizontalEdge:Show()
|
||||
self.BottomHorizontalEdge:Show()
|
||||
self.disabled = false
|
||||
end,
|
||||
|
||||
---get the size of the edge texture
|
||||
---@param self df_roundedpanel
|
||||
---@param alignment "vertical"|"horizontal"
|
||||
|
||||
@@ -885,6 +885,15 @@ local get_switch_func = function(self)
|
||||
return self.OnSwitch
|
||||
end
|
||||
|
||||
local setCheckedTexture = function(self, texture, xOffSet, yOffSet)
|
||||
self.checked_texture:SetTexture(texture)
|
||||
if (xOffSet or yOffSet) then
|
||||
self.checked_texture:SetPoint("center", self.button, "center", xOffSet or -1, yOffSet or -1)
|
||||
else
|
||||
self.checked_texture:SetPoint("center", self.button, "center", -1, -1)
|
||||
end
|
||||
end
|
||||
|
||||
local set_as_checkbok = function(self)
|
||||
if self.is_checkbox and self.checked_texture then return end
|
||||
local checked = self:CreateTexture(self:GetName() .. "CheckTexture", "overlay")
|
||||
@@ -894,6 +903,8 @@ local set_as_checkbok = function(self)
|
||||
checked:SetSize(32 * size_pct, 32 * size_pct)
|
||||
self.checked_texture = checked
|
||||
|
||||
self.SetCheckedTexture = setCheckedTexture
|
||||
|
||||
self._thumb:Hide()
|
||||
self._text:Hide()
|
||||
self.is_checkbox = true
|
||||
@@ -928,6 +939,7 @@ end
|
||||
---@field GetSwitchFunction fun(self:df_button):function
|
||||
---@field SetSwitchFunction fun(self:df_button, newOnSwitchFunction: function)
|
||||
---@field GetCapsule fun(self:df_button):df_button capsule only exists in the actual frame of the encapsulated widget
|
||||
---@field SetCheckedTexture fun(self:df_button, texture:string)
|
||||
|
||||
|
||||
function DF:CreateSwitch(parent, onSwitch, defaultValue, width, height, leftText, rightText, member, name, colorInverted, switchFunc, returnFunc, withLabel, switch_template, label_template)
|
||||
|
||||
@@ -462,12 +462,14 @@ detailsFramework.TextEntryCounter = detailsFramework.TextEntryCounter or 1
|
||||
magnifyingGlassTexture:SetPoint("left", self.widget, "left", 4, 0)
|
||||
magnifyingGlassTexture:SetSize(self:GetHeight()-10, self:GetHeight()-10)
|
||||
magnifyingGlassTexture:SetAlpha(0.5)
|
||||
self.MagnifyingGlassTexture = magnifyingGlassTexture
|
||||
|
||||
local searchFontString = self:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
searchFontString:SetText("search")
|
||||
searchFontString:SetAlpha(0.3)
|
||||
searchFontString:SetPoint("left", magnifyingGlassTexture, "right", 2, 0)
|
||||
detailsFramework:SetFontSize(searchFontString, 10)
|
||||
self.SearchFontString = searchFontString
|
||||
|
||||
local clearSearchButton = CreateFrame("button", nil, self.widget, "UIPanelCloseButton")
|
||||
clearSearchButton:SetPoint("right", self.widget, "right", -3, 0)
|
||||
@@ -477,6 +479,7 @@ detailsFramework.TextEntryCounter = detailsFramework.TextEntryCounter or 1
|
||||
clearSearchButton:GetHighlightTexture():SetAtlas("common-search-clearbutton")
|
||||
clearSearchButton:GetPushedTexture():SetAtlas("common-search-clearbutton")
|
||||
clearSearchButton:Hide()
|
||||
self.ClearSearchButton = clearSearchButton
|
||||
|
||||
clearSearchButton:SetScript("OnClick", function()
|
||||
self:SetText("")
|
||||
@@ -767,6 +770,9 @@ local AutoComplete_OnTextChanged = function(editboxWidget, byUser, capsule)
|
||||
editboxWidget.ignore_textchange = nil
|
||||
end
|
||||
capsule.characters_count = chars_now
|
||||
|
||||
--call the other hooks for the widget
|
||||
capsule:RunHooksForWidget("OnTextChanged", editboxWidget, byUser, capsule)
|
||||
end
|
||||
|
||||
local AutoComplete_OnSpacePressed = function(editboxWidget, capsule)
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
Details222.Instances = {}
|
||||
Details222.Combat = {}
|
||||
Details222.MythicPlus = {}
|
||||
Details222.MythicPlusBreakdown = {}
|
||||
Details222.EJCache = {}
|
||||
Details222.Segments = {}
|
||||
Details222.Tables = {}
|
||||
|
||||
@@ -1342,6 +1342,8 @@
|
||||
evokerActor.total_extra = evokerActor.total_extra + predictedAmount
|
||||
augmentedSpell.total = augmentedSpell.total + predictedAmount
|
||||
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + predictedAmount
|
||||
|
||||
--DetailsParserDebugFrame:BlinkIcon(extraSpellId, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1380,6 +1382,8 @@
|
||||
|
||||
augmentedSpell.total = augmentedSpell.total + predictedAmount
|
||||
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + predictedAmount
|
||||
|
||||
--DetailsParserDebugFrame:BlinkIcon(extraSpellId, 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1415,6 +1419,8 @@
|
||||
|
||||
augmentedSpell.total = augmentedSpell.total + damageSplitted
|
||||
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + damageSplitted
|
||||
|
||||
--DetailsParserDebugFrame:BlinkIcon(extraSpellId, 3)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1450,6 +1456,8 @@
|
||||
|
||||
augmentedSpell.total = augmentedSpell.total + fateMirror_plus_Prescience
|
||||
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + fateMirror_plus_Prescience
|
||||
|
||||
--DetailsParserDebugFrame:BlinkIcon(extraSpellId, 4)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1483,6 +1491,8 @@
|
||||
|
||||
augmentedSpell.total = augmentedSpell.total + amount
|
||||
augmentedSpell.targets[sourceName] = (augmentedSpell.targets[sourceName] or 0) + amount
|
||||
|
||||
--DetailsParserDebugFrame:BlinkIcon(extraSpellId, 5)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -87,7 +87,7 @@ local updateTargetBar = function(targetBar, index, combatObject, scrollFrame, he
|
||||
targetBar.statusBar:SetStatusBarColor(1, 1, 1, 1)
|
||||
|
||||
local platerNameplates = _G.Plater
|
||||
if (platerNameplates) then
|
||||
if (platerNameplates and targetActorObject) then
|
||||
local npcId = tonumber(targetActorObject.aID)
|
||||
if (npcId) then
|
||||
local platerProfile = platerNameplates.db.profile
|
||||
|
||||
@@ -105,6 +105,9 @@ local PLAYER_DETAILS_WINDOW_HEIGHT = 620
|
||||
local PLAYER_DETAILS_STATUSBAR_HEIGHT = 20
|
||||
local PLAYER_DETAILS_STATUSBAR_ALPHA = 1
|
||||
|
||||
Details222.BreakdownWindow.width = PLAYER_DETAILS_WINDOW_WIDTH
|
||||
Details222.BreakdownWindow.height = PLAYER_DETAILS_WINDOW_HEIGHT
|
||||
|
||||
---@type button[]
|
||||
Details.player_details_tabs = {}
|
||||
---@type button[]
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
local Details = _G.Details
|
||||
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
local SharedMedia = _G.LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
local UIParent = UIParent
|
||||
local addonName, Details222 = ...
|
||||
local detailsFramework = DetailsFramework
|
||||
local _
|
||||
|
||||
local mPlus = Details222.MythicPlusBreakdown
|
||||
|
||||
function mPlus.ShowSummary()
|
||||
if (not mPlus.MainFrame) then
|
||||
mPlus.CreateMainFrame()
|
||||
end
|
||||
end
|
||||
|
||||
function mPlus.CreateMainFrame()
|
||||
local mPlusFrame = CreateFrame("frame", "DetailsMythicPlusBreakdownFrame", UIParent, "BackdropTemplate")
|
||||
detailsFramework:AddRoundedCornersToFrame(mPlusFrame, Details.PlayerBreakdown.RoundedCornerPreset)
|
||||
mPlus.MainFrame = mPlusFrame
|
||||
|
||||
PixelUtil.SetPoint(mPlusFrame, "center", UIParent, "center", 0, 0)
|
||||
PixelUtil.SetSize(mPlusFrame, Details222.BreakdownWindow.width, Details222.BreakdownWindow.height)
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -634,7 +634,7 @@ hooksecurefunc (_G, "DeathRecap_LoadUI", function()
|
||||
local format = Details:GetCurrentToKFunction()
|
||||
|
||||
if (Details.death_recap.enabled) then
|
||||
if (Details:GetZoneType() == "party" or Details:GetZoneType() == "raid") then
|
||||
if (Details:GetZoneType() == "party" or Details:GetZoneType() == "raid" and texture) then
|
||||
local msgText = "|cFFAAAAFFDeath Recap (Blizzard):"
|
||||
print(msgText, "|T" .. texture .. ":16:16:0:0:64:64:5:59:5:59|t", GetSpellLink(spellId) or spellName, format(_, amountDamage or 0))
|
||||
end
|
||||
|
||||
+145
-19
@@ -5,7 +5,7 @@ local debugmode = false --print debug lines
|
||||
local verbosemode = false --auto open the chart panel
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
local mPlus = Details222.MythicPlusBreakdown
|
||||
local detailsFramework = DetailsFramework
|
||||
|
||||
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
@@ -318,12 +318,100 @@ local createPlayerBanner = function(parent, name)
|
||||
dungeonBorderTexture:SetAlpha(1)
|
||||
playerFrame.DungeonBorderTexture = dungeonBorderTexture
|
||||
|
||||
local levelFontString = playerFrame:CreateFontString("$parentLVLText", "artwork", "GameFontNormal")
|
||||
--load this addon, required to have access to the garrison templates
|
||||
if (not C_AddOns.IsAddOnLoaded("Blizzard_GarrisonTemplates")) then
|
||||
C_AddOns.LoadAddOn("Blizzard_GarrisonTemplates")
|
||||
end
|
||||
|
||||
--animation for the key leveling up
|
||||
local levelUpFrame = CreateFrame("frame", "$LevelUpFrame", playerFrame, "GarrisonFollowerLevelUpTemplate")
|
||||
levelUpFrame:SetPoint("top", dungeonTexture, "bottom", 0, 44)
|
||||
levelUpFrame:SetScale(0.9)
|
||||
levelUpFrame.Text:SetText("")
|
||||
playerFrame.LevelUpFrame = levelUpFrame
|
||||
levelUpFrame:SetFrameLevel(playerFrame:GetFrameLevel()+1)
|
||||
|
||||
local levelUpTextFrame = CreateFrame("frame", "$LevelUpTextFrame", playerFrame)
|
||||
levelUpTextFrame:SetPoint("top", dungeonTexture, "bottom", -1, -14)
|
||||
levelUpTextFrame:SetFrameLevel(playerFrame:GetFrameLevel()+2)
|
||||
levelUpTextFrame:SetSize(1, 1)
|
||||
playerFrame.LevelUpTextFrame = levelUpTextFrame
|
||||
--scaleX, scaleY, fadeInTime, fadeOutTime
|
||||
local shakeAnimation = detailsFramework:CreateFrameShake(levelUpTextFrame, 0.8, 2, 200, false, false, 0, 1, 0.5, 0.15)
|
||||
local shakeAnimation2 = detailsFramework:CreateFrameShake(levelUpTextFrame, 0.5, 1, 200, false, false, 0, 1, 0, 0)
|
||||
|
||||
local levelFontString = levelUpTextFrame:CreateFontString("$parentLVLText", "artwork", "GameFontNormal")
|
||||
levelFontString:SetTextColor(1, 1, 1)
|
||||
levelFontString:SetPoint("top", dungeonTexture, "bottom", -1, -7)
|
||||
levelFontString:SetPoint("center", levelUpTextFrame, "center", 0, 0)
|
||||
DetailsFramework:SetFontSize(levelFontString, 20)
|
||||
levelFontString:SetText("")
|
||||
playerFrame.LevelFontString = levelFontString
|
||||
|
||||
--> animations for levelFontString
|
||||
local animationGroup = levelFontString:CreateAnimationGroup("DetailsMythicLevelTextAnimationGroup")
|
||||
animationGroup:SetLooping("NONE")
|
||||
levelFontString.AnimationGroup = animationGroup
|
||||
|
||||
do
|
||||
levelFontString.translation = animationGroup:CreateAnimation("TRANSLATION")
|
||||
levelFontString.translation:SetTarget(levelFontString)
|
||||
levelFontString.translation:SetOrder(1)
|
||||
levelFontString.translation:SetDuration(0.096000000834465)
|
||||
levelFontString.translation:SetOffset(0, -4)
|
||||
levelFontString.translation = animationGroup:CreateAnimation("TRANSLATION")
|
||||
levelFontString.translation:SetTarget(levelFontString)
|
||||
levelFontString.translation:SetOrder(2)
|
||||
levelFontString.translation:SetDuration(0.11599999666214)
|
||||
levelFontString.translation:SetOffset(0, 16)
|
||||
levelFontString.rotation = animationGroup:CreateAnimation("ROTATION")
|
||||
levelFontString.rotation:SetTarget(levelFontString)
|
||||
levelFontString.rotation:SetOrder(3)
|
||||
levelFontString.rotation:SetDuration(0.096000000834465)
|
||||
levelFontString.rotation:SetDegrees(20)
|
||||
levelFontString.rotation:SetOrigin("center", 0, 0)
|
||||
levelFontString.rotation = animationGroup:CreateAnimation("ROTATION")
|
||||
levelFontString.rotation:SetTarget(levelFontString)
|
||||
levelFontString.rotation:SetOrder(4)
|
||||
levelFontString.rotation:SetDuration(0.096000000834465)
|
||||
levelFontString.rotation:SetDegrees(-20)
|
||||
levelFontString.rotation:SetOrigin("center", 0, 0)
|
||||
levelFontString.rotation = animationGroup:CreateAnimation("ROTATION")
|
||||
levelFontString.rotation:SetTarget(levelFontString)
|
||||
levelFontString.rotation:SetOrder(5)
|
||||
levelFontString.rotation:SetDuration(0.195999994874)
|
||||
levelFontString.rotation:SetDegrees(360)
|
||||
levelFontString.rotation:SetOrigin("center", 0, 0)
|
||||
levelFontString.translation = animationGroup:CreateAnimation("TRANSLATION")
|
||||
levelFontString.translation:SetTarget(levelFontString)
|
||||
levelFontString.translation:SetOrder(6)
|
||||
levelFontString.translation:SetDuration(0.21599999070168)
|
||||
levelFontString.translation:SetOffset(0, 9)
|
||||
levelFontString.translation = animationGroup:CreateAnimation("TRANSLATION")
|
||||
levelFontString.translation:SetTarget(levelFontString)
|
||||
levelFontString.translation:SetOrder(7)
|
||||
levelFontString.translation:SetDuration(0.046000000089407)
|
||||
levelFontString.translation:SetOffset(0, -24)
|
||||
end
|
||||
|
||||
function levelUpTextFrame.PlayAnimations(newLevel)
|
||||
levelUpTextFrame:PlayFrameShake(shakeAnimation)
|
||||
|
||||
C_Timer.After(0.7, function()
|
||||
playerFrame.LevelUpFrame:Show()
|
||||
playerFrame.LevelUpFrame:SetAlpha(1)
|
||||
playerFrame.LevelUpFrame.Anim:Play()
|
||||
animationGroup:Play()
|
||||
end)
|
||||
|
||||
C_Timer.After(0.7 + 0.5, function()
|
||||
levelFontString:SetText(newLevel or "")
|
||||
end)
|
||||
|
||||
C_Timer.After(1.65, function()
|
||||
levelUpTextFrame:PlayFrameShake(shakeAnimation2)
|
||||
end)
|
||||
end
|
||||
|
||||
local flashTexture = playerFrame:CreateTexture("$parentFlashTexture", "overlay", nil, 6)
|
||||
flashTexture:SetAtlas("UI-Achievement-Guild-Flag-Outline")
|
||||
flashTexture:SetSize(63, 129)
|
||||
@@ -419,7 +507,6 @@ local updatPlayerBanner = function(unitId, bannerIndex)
|
||||
playerBanner.DungeonTexture:SetTexture([[Interface\ICONS\INV_Misc_QuestionMark]])
|
||||
playerBanner.LevelFontString:SetText("")
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -444,12 +531,20 @@ local updateKeysStoneLevel = function()
|
||||
unitBanner.DungeonTexture:SetTexture(thisInstanceInfo.iconLore)
|
||||
end
|
||||
|
||||
unitBanner.LevelFontString:SetText(unitKeystoneInfo.level)
|
||||
--unitBanner.LevelFontString:SetText(unitKeystoneInfo.level)
|
||||
--print("setting player", unitBanner.unitName, "keystone level to", unitKeystoneInfo.level)
|
||||
|
||||
local oldKeystoneLevel = Details.KeystoneLevels[Details:GetFullName(unitId)]
|
||||
if (oldKeystoneLevel and oldKeystoneLevel >= 2) then
|
||||
if (unitKeystoneInfo.level > oldKeystoneLevel) then
|
||||
--unitBanner.LevelUpFrame.Text:SetText("")
|
||||
--unitBanner.LevelUpFrame:SetAlpha(1)
|
||||
--unitBanner.LevelUpFrame.Anim:Play()
|
||||
|
||||
C_Timer.After(0.5, function()
|
||||
unitBanner.LevelUpTextFrame.PlayAnimations(unitKeystoneInfo.level)
|
||||
end)
|
||||
|
||||
--this character had its keystone upgraded
|
||||
--unitBanner.flashTexture:Flash()
|
||||
--print("keystone upgraded for", Details:GetFullName(unitId), unitKeystoneInfo.level, "old was:", oldKeystoneLevel)
|
||||
@@ -467,6 +562,7 @@ local updateKeysStoneLevel = function()
|
||||
end
|
||||
end
|
||||
|
||||
--SetPortraitTexture(texture, unitId)
|
||||
-- /run _G.DetailsMythicDungeonChartHandler.ShowChart(); DetailsMythicDungeonChartFrame.ShowChartFrame()
|
||||
-- /run _G.DetailsMythicDungeonChartHandler.ShowReadyPanel()
|
||||
|
||||
@@ -482,7 +578,7 @@ function mythicDungeonCharts.ShowReadyPanel(bIsDebug)
|
||||
end
|
||||
|
||||
--feature under development
|
||||
if (Details222.MythicPlus.Level < 28 and not Details.user_is_patreon_supporter) then
|
||||
if (Details222.MythicPlus.Level and Details222.MythicPlus.Level < 28 and not Details.user_is_patreon_supporter) then
|
||||
--create the panel
|
||||
if (not mythicDungeonCharts.ReadyFrame) then
|
||||
mythicDungeonCharts.ReadyFrame = CreateFrame("frame", "DetailsMythicDungeonReadyFrame", UIParent, "BackdropTemplate")
|
||||
@@ -527,16 +623,16 @@ function mythicDungeonCharts.ShowReadyPanel(bIsDebug)
|
||||
|
||||
--show button
|
||||
---@type df_button
|
||||
readyFrame.ShowButton = DetailsFramework:CreateButton(readyFrame, function() mythicDungeonCharts.ShowChart(); readyFrame:Hide() end, 80, 20, "Show Damage Graphic")
|
||||
readyFrame.ShowButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
readyFrame.ShowButton:SetPoint("topleft", readyFrame, "topleft", 5, -30)
|
||||
readyFrame.ShowButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0)
|
||||
readyFrame.ShowButton.textcolor = textColor
|
||||
readyFrame.ShowChartButton = DetailsFramework:CreateButton(readyFrame, function() mythicDungeonCharts.ShowChart(); readyFrame:Hide() end, 80, 20, "Show Damage Graphic")
|
||||
readyFrame.ShowChartButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
readyFrame.ShowChartButton:SetPoint("topleft", readyFrame, "topleft", 5, -30)
|
||||
readyFrame.ShowChartButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0)
|
||||
readyFrame.ShowChartButton.textcolor = textColor
|
||||
|
||||
--discart button
|
||||
--readyFrame.DiscartButton = DetailsFramework:CreateButton(readyFrame, function() readyFrame:Hide() end, 80, 20, Loc ["STRING_DISCARD"])
|
||||
--readyFrame.DiscartButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
--readyFrame.DiscartButton:SetPoint("right", readyFrame.ShowButton, "left", -5, 0)
|
||||
--readyFrame.DiscartButton:SetPoint("right", readyFrame.ShowChartButton, "left", -5, 0)
|
||||
|
||||
--disable feature check box (dont show this again)
|
||||
local on_switch_enable = function(self, _, value)
|
||||
@@ -624,13 +720,43 @@ function mythicDungeonCharts.ShowReadyPanel(bIsDebug)
|
||||
local warningFooter = DetailsFramework:CreateLabel(readyFrame, "You are seeing this because it's a 28 or above. Under development.", 9, "yellow")
|
||||
warningFooter:SetPoint("bottom", readyFrame, "bottom", 0, 20)
|
||||
|
||||
--show button
|
||||
local roundedCornerPreset = {
|
||||
color = {.075, .075, .075, 1},
|
||||
border_color = {.2, .2, .2, 1},
|
||||
roundness = 8,
|
||||
}
|
||||
|
||||
local leftAnchor
|
||||
|
||||
--show m+ run breakdown
|
||||
local showBreakdownFunc = function()
|
||||
mPlus.ShowSummary()
|
||||
end
|
||||
---@type df_button
|
||||
readyFrame.ShowButton = DetailsFramework:CreateButton(readyFrame, function() mythicDungeonCharts.ShowChart(); readyFrame:Hide() end, 80, 20, "Show Damage Graphic")
|
||||
readyFrame.ShowButton:SetTemplate(DetailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
|
||||
readyFrame.ShowButton:SetPoint("topleft", readyFrame, "topleft", 5, -30)
|
||||
readyFrame.ShowButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0)
|
||||
readyFrame.ShowButton.textcolor = textColor
|
||||
readyFrame.ShowBreakdownButton = DetailsFramework:CreateButton(readyFrame, showBreakdownFunc, 145, 30, "Show Breakdown")
|
||||
PixelUtil.SetPoint(readyFrame.ShowBreakdownButton, "topleft", readyFrame, "topleft", 5, -30)
|
||||
PixelUtil.SetSize(readyFrame.ShowBreakdownButton, 145, 32)
|
||||
readyFrame.ShowBreakdownButton:SetBackdrop(nil)
|
||||
readyFrame.ShowBreakdownButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {84/512, 120/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0)
|
||||
readyFrame.ShowBreakdownButton.textcolor = textColor
|
||||
detailsFramework:AddRoundedCornersToFrame(readyFrame.ShowBreakdownButton.widget, roundedCornerPreset)
|
||||
leftAnchor = readyFrame.ShowBreakdownButton
|
||||
readyFrame.ShowBreakdownButton:Disable()
|
||||
|
||||
--show graphic button
|
||||
local showChartFunc = function(self)
|
||||
mythicDungeonCharts.ShowChart()
|
||||
readyFrame:Hide()
|
||||
end
|
||||
---@type df_button
|
||||
readyFrame.ShowChartButton = DetailsFramework:CreateButton(readyFrame, showChartFunc, 145, 30, "Show Damage Graphic")
|
||||
PixelUtil.SetPoint(readyFrame.ShowChartButton, "left", readyFrame.ShowBreakdownButton, "right", 5, 0)
|
||||
PixelUtil.SetSize(readyFrame.ShowChartButton, 145, 32)
|
||||
readyFrame.ShowChartButton:SetBackdrop(nil)
|
||||
readyFrame.ShowChartButton:SetIcon([[Interface\AddOns\Details\images\icons2.png]], 16, 16, "overlay", {42/512, 75/512, 153/512, 187/512}, {.7, .7, .7, 1}, nil, 0, 0)
|
||||
readyFrame.ShowChartButton.textcolor = textColor
|
||||
detailsFramework:AddRoundedCornersToFrame(readyFrame.ShowChartButton.widget, roundedCornerPreset)
|
||||
|
||||
|
||||
--disable feature check box (dont show this again)
|
||||
local on_switch_enable = function(self, _, value)
|
||||
@@ -638,7 +764,7 @@ function mythicDungeonCharts.ShowReadyPanel(bIsDebug)
|
||||
end
|
||||
|
||||
local elapsedTimeLabel = DetailsFramework:CreateLabel(readyFrame, "Run Time:", textSize, textColor)
|
||||
elapsedTimeLabel:SetPoint("topleft", readyFrame.ShowButton, "bottomleft", 0, -8)
|
||||
elapsedTimeLabel:SetPoint("topleft", leftAnchor, "bottomleft", 0, -8)
|
||||
local elapsedTimeAmount = DetailsFramework:CreateLabel(readyFrame, "00:00", textSize, textColor)
|
||||
elapsedTimeAmount:SetPoint("left", elapsedTimeLabel, "left", 130, 0)
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user