diff --git a/Libs/DF/LibDFramework-1.0.toc b/Libs/DF/LibDFramework-1.0.toc index 48ecdae37..c83d3f038 100644 --- a/Libs/DF/LibDFramework-1.0.toc +++ b/Libs/DF/LibDFramework-1.0.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Lib: LibDFramework-1.0 ## Notes: Base Framework for many Addons diff --git a/Libs/DF/button.lua b/Libs/DF/button.lua index 5adc8073b..848f81834 100644 --- a/Libs/DF/button.lua +++ b/Libs/DF/button.lua @@ -655,7 +655,7 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin) if (object.capsule_textalign) then if (object.icon) then - object.icon:SetPoint("left", button, "left", 5 + (object.icon.leftpadding or 0), -1) + object.icon:SetPoint("left", button, "left", 5 + (object.icon.leftPadding or 0), -1) elseif (object.capsule_textalign == "left") then button.text:SetPoint("left", button, "left", 3, -1) @@ -668,7 +668,7 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin) end else if (object.icon) then - object.icon:SetPoint("left", button, "left", 5 + (object.icon.leftpadding or 0), -1) + object.icon:SetPoint("left", button, "left", 5 + (object.icon.leftPadding or 0), -1) else button.text:SetPoint("center", button,"center", 1, -1) end @@ -729,7 +729,7 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin) if (object.capsule_textalign) then if (object.icon) then - object.icon:SetPoint("left", button, "left", 4 + (object.icon.leftpadding or 0), 0) + object.icon:SetPoint("left", button, "left", 4 + (object.icon.leftPadding or 0), 0) elseif (object.capsule_textalign == "left") then button.text:SetPoint("left", button, "left", 2, 0) @@ -742,7 +742,7 @@ detailsFramework:Mixin(ButtonMetaFunctions, detailsFramework.ScriptHookMixin) end else if (object.icon) then - object.icon:SetPoint("left", button, "left", 4 + (object.icon.leftpadding or 0), 0) + object.icon:SetPoint("left", button, "left", 4 + (object.icon.leftPadding or 0), 0) else button.text:SetPoint("center", button,"center", 0, 0) end @@ -828,7 +828,7 @@ function ButtonMetaFunctions:SetTemplate(template) if (template.icon) then local iconInfo = template.icon - self:SetIcon(iconInfo.texture, iconInfo.width, iconInfo.height, iconInfo.layout, iconInfo.texcoord, iconInfo.color, iconInfo.textdistance, iconInfo.leftpadding) + self:SetIcon(iconInfo.texture, iconInfo.width, iconInfo.height, iconInfo.layout, iconInfo.texcoord, iconInfo.color, iconInfo.textdistance, iconInfo.leftPadding) end if (template.textsize) then @@ -1543,4 +1543,4 @@ end local closeButton = detailsFramework:CreateCloseButton(frame, "$parentCloseButton") closeButton:SetPoint("topright", frame, "topright", 0, 0) ---]=] \ No newline at end of file +--]=] diff --git a/Libs/DF/charts.lua b/Libs/DF/charts.lua index 8acfa1fa9..117466f1f 100644 --- a/Libs/DF/charts.lua +++ b/Libs/DF/charts.lua @@ -1459,8 +1459,8 @@ detailsFramework.MultiChartFrameMixin = { biggestAverage[i] = {average = chartFrame.average, chartIndex = i} end - --sort the averages by the biggest average placing the biggest average in the first position - table.sort(biggestAverage, function(a, b) return a.average > b.average end) + -- sort the averages by the biggest average placing the biggest average in the first position + table.sort(biggestAverage, function(a, b) if not (a.average and b.average) then return a.average ~= nil end return a.average > b.average end) local minValue, multiChartMaxValue = multiChartFrame:GetMinMaxValues() local plotAreaWidth = multiChartFrame.plotFrame:GetWidth() --if there's no axis, the plotFrame has no width @@ -1518,4 +1518,4 @@ function detailsFramework:CreateGraphicMultiLineFrame(parent, name) createPlotFrame(chartFrame) --creates chartFrame.plotFrame return chartFrame -end \ No newline at end of file +end diff --git a/Libs/DF/definitions.lua b/Libs/DF/definitions.lua index 1bdf6e82b..c6ede453e 100644 --- a/Libs/DF/definitions.lua +++ b/Libs/DF/definitions.lua @@ -24,6 +24,8 @@ ---@field unpackhash fun(tbl:table) : table unpack a table packed with packhash() ---@field packhashsubtable fun(tbl:table) : string pack a hash table where the value of the key is a numerical table, example: {key1 = {1, 2, 3}, key2 = {4, 6}, key3 = {7}}, result: "key1,3,1,2,3,key2,2,4,6,key3,1,7" ---@field unpackhashsubtable fun(tbl:table) : table unpack a table packed with packhashsubtable() +---@field inserts fun(tbl:table, ...) : table receives an indexed table and N arguments, add all arguments passed into the table + ---@class df_language : table ---@field Register fun(addonId:any, languageId:string, gameLanguageOnly:boolean?) : table @@ -241,6 +243,7 @@ ---@field CreateFrameContainer fun(self:table, parent:frame, options:table?, frameName:string?) : df_framecontainer create a frame container, which is a frame that envelops another frame, and can be moved, resized, etc. ---@field CreateAnimationHub fun(self:table, parent:uiobject, onPlay:function?, onFinished:function?) : animationgroup ---@field CreateAnimation fun(self:table, animationGroup:animationgroup, animationType:animationtype, order:number, duration:number, arg1:any, arg2:any, arg3:any, arg4:any, arg5:any, arg6:any, arg7:any, arg8:any) : animation +---@field CreatePunchAnimation fun(self:table, frame:uiobject, scale:number?):animationgroup ---@field CreateTexture fun(self:table, parent:frame, texture:atlasname|texturepath|textureid|nil, width:number?, height:number?, layer:drawlayer?, coords:table?, member:string?, name:string?) : df_image ---@field CreateImage fun(self:table, parent:frame, texture:atlasname|texturepath|textureid|nil, width:number?, height:number?, layer:drawlayer?, coords:table?, member:string?, name:string?) : df_image ---@field CreateFrameShake fun(self:table, parent:uiobject, duration:number?, amplitude:number?, frequency:number?, absoluteSineX:boolean?, absoluteSineY:boolean?, scaleX:number?, scaleY:number?, fadeInTime:number?, fadeOutTime:number?, anchorPoints:table?) : df_frameshake diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index df26239bd..77f69bfc9 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 578 +local dversion = 579 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) @@ -937,6 +937,16 @@ function DF.table.append(t1, t2) return t1 end +---receive a table and N arguments, add each argument to the table +---@param t1 table +---@vararg any +function DF.table.inserts(t1, ...) + for i = 1, select("#", ...) do + t1[#t1+1] = select(i, ...) + end + return t1 +end + ---copy values that does exist on table2 but not on table1 ---@param t1 table ---@param t2 table @@ -2101,6 +2111,27 @@ function DF:CreateFlashAnimation(frame, onFinishFunc, onLoopFunc) return flashAnimation end +local onStartPunchAnimation = function(animationGroup) + local parent = animationGroup:GetParent() + animationGroup.parentWidth = parent:GetWidth() + animationGroup.parentHeight = parent:GetHeight() +end + +local onStopPunchAnimation = function(animationGroup) + local parent = animationGroup:GetParent() + parent:SetWidth(animationGroup.parentWidth) + parent:SetHeight(animationGroup.parentHeight) +end + +function DF:CreatePunchAnimation(frame, scale) + scale = scale or 1.1 + scale = math.min(scale, 1.9) + local animationHub = DF:CreateAnimationHub(frame, onStartPunchAnimation, onStopPunchAnimation) + local scaleUp = DF:CreateAnimation(animationHub, "scale", 1, 0.05, 1, 1, scale, scale, "center", 0, 0) + local scaleDown = DF:CreateAnimation(animationHub, "scale", 2, 0.05, 1, 1, 1-(scale - 1), 1-(scale - 1), "center", 0, 0) + return animationHub +end + ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --anchoring diff --git a/boot.lua b/boot.lua index bf14da92e..cbbbbd6eb 100644 --- a/boot.lua +++ b/boot.lua @@ -19,8 +19,8 @@ local addonName, Details222 = ... local version, build, date, tvs = GetBuildInfo() - Details.build_counter = 13132 - Details.alpha_build_counter = 13132 --if this is higher than the regular counter, use it instead + Details.build_counter = 13166 + Details.alpha_build_counter = 13166 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter diff --git a/plugins/Details_Compare2/Details_Compare2.toc b/plugins/Details_Compare2/Details_Compare2.toc index 9e749e8ad..6915abbbc 100644 --- a/plugins/Details_Compare2/Details_Compare2.toc +++ b/plugins/Details_Compare2/Details_Compare2.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Details!: Compare 2.0 ## Notes: Replace the Compare tab in the player breakdown window. ## RequiredDeps: Details diff --git a/plugins/Details_DataStorage/Details_DataStorage.toc b/plugins/Details_DataStorage/Details_DataStorage.toc index b3216d941..2062ba0c3 100644 --- a/plugins/Details_DataStorage/Details_DataStorage.toc +++ b/plugins/Details_DataStorage/Details_DataStorage.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Details!: Storage ## Notes: Stores information for Details! Damage Meter ## DefaultState: Enabled diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc index 0373a4117..bc4881c07 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Details!: Encounter Breakdown (plugin) ## Notes: Show detailed information about a boss encounter. Also provide damage per phase, graphic charts, easy weakauras creation. ## RequiredDeps: Details diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.toc b/plugins/Details_RaidCheck/Details_RaidCheck.toc index d138d3da6..74a3deee7 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.toc +++ b/plugins/Details_RaidCheck/Details_RaidCheck.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Details!: Raid Check (plugin) ## Notes: Show talents and item level for all members in your group, also shows food and flask state. ## RequiredDeps: Details diff --git a/plugins/Details_Streamer/Details_Streamer.toc b/plugins/Details_Streamer/Details_Streamer.toc index f94c0119f..b2d915fbe 100644 --- a/plugins/Details_Streamer/Details_Streamer.toc +++ b/plugins/Details_Streamer/Details_Streamer.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Details!: Streamer (plugin) ## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps. ## RequiredDeps: Details diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.toc b/plugins/Details_TinyThreat/Details_TinyThreat.toc index 9d22a1dd5..89696a3c9 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.toc +++ b/plugins/Details_TinyThreat/Details_TinyThreat.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Details!: Tiny Threat (plugin) ## Notes: Threat meter plugin, show threat for group members in the window. Select it from the Plugin menu in the Orange Cogwheel. ## RequiredDeps: Details diff --git a/plugins/Details_Vanguard/Details_Vanguard.toc b/plugins/Details_Vanguard/Details_Vanguard.toc index e952057cc..cd015d4da 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.toc +++ b/plugins/Details_Vanguard/Details_Vanguard.toc @@ -1,4 +1,4 @@ -## Interface: 110002 +## Interface: 110005 ## Title: Details!: Vanguard (plugin) ## Notes: Show the health and debuffs for tanks in your group. ## SavedVariablesPerCharacter: _detalhes_databaseVanguard