Changelogs

This commit is contained in:
Tercio Jose
2024-03-13 13:47:15 -03:00
parent f9d2e81564
commit b6280c1a0b
8 changed files with 86 additions and 142 deletions
+45 -5
View File
@@ -14,6 +14,8 @@ do
--'another player' is a terms used to refer to the other players being compared to the main player
--the scrollboxes for the main player being compared are created in the compare frame, the scrollboxes for the other players are created in the compareplayerframe
--search ~start to go to the start of the main code
local weakTable = {__mode = "v"}
---@class compare : frame
@@ -50,6 +52,7 @@ do
---@field mainPlayer actor
---@field mainSpellTable spelltable
---@field mainTargetTable comparetargettable
---@field combatTimeLabel df_label
---@class comparespelltable : spelltable
---@field spellId number?
@@ -1126,6 +1129,8 @@ do
comparePlugin.mainSpellTable = mainPlayerSpellTable
comparePlugin.mainTargetTable = mainPlayerTargetTable
comparePlugin.combatTimeLabel.text = detailsFramework:CreateAtlasString(Details:GetTextureAtlas("small-clock"), 10, 10) .. " " .. detailsFramework:IntegerToTimer(combat:GetCombatTime())
--depending on what data the user wants to compare, the data captue is different
--perform a search on the same combat when comparing the main player with other players using the same specialization.
--perform a seach on the next segments when comparing the main player against itself.
@@ -1138,6 +1143,8 @@ do
local maxCompares = compareTwo.db.max_compares
--~start
if (compareTwo.db.compare_type == CONST_COMPARETYPE_SEGMENT) then
--get the segmentId from the combat
local segmentId = combat:GetSegmentSlotId()
@@ -1176,7 +1183,11 @@ do
for _, actorObject in actorContainer:ListActors() do
if (actorObject:IsPlayer() and actorObject:IsGroupPlayer() and actorObject.spec == playerActorObject.spec and actorObject.serial ~= playerActorObject.serial) then
---@type compareactortable
local actorCompareTable = {actor = actorObject, total = actorObject.total, combat = combat}
local actorCompareTable = {
actor = actorObject,
total = actorObject.total,
combat = combat
}
actorObjectsToCompare[#actorObjectsToCompare + 1] = setmetatable(actorCompareTable, weakTable)
--stop the loop the the max amount of compares is reached
@@ -1185,10 +1196,10 @@ do
end
end
end
comparePlugin.mainPlayerName.text = playerActorObject:GetDisplayName()
end
table.sort(actorObjectsToCompare, sortByTotalKey)
comparePlugin.mainPlayerName.text = playerActorObject:GetDisplayName()
table.sort(actorObjectsToCompare, sortByTotalKey)
end
---hold the spell data for all other players which will be compared with the main player
---@type comparespelltable[]
@@ -1227,6 +1238,8 @@ do
--store the another player actorobject and name
comparisonFrame.playerObject = playerObject
comparisonFrame.combatTimeLabel.text = detailsFramework:CreateAtlasString(Details:GetTextureAtlas("small-clock"), 10, 10) .. " " .. detailsFramework:IntegerToTimer(combatObject:GetCombatTime())
--depending on the compare mode, the "player name" will be the segment name or the player name
if (compareTwo.db.compare_type == CONST_COMPARETYPE_SPEC) then
comparisonFrame.titleLabel.text = detailsFramework:RemoveRealmName(playerObject:Name())
@@ -1613,7 +1626,7 @@ do
end
end
--main player spells scroll
--main player spells scroll ~playerscroll
---@type comparescrollbox
local mainSpellsFrameScroll = detailsFramework:CreateScrollBox(comparePlugin, "$parentComparisonMainPlayerSpellsScroll", mainPlayerRefreshSpellScroll, {}, comparisonFrameSettings.mainScrollWidth, comparisonFrameSettings.spellScrollHeight, comparisonFrameSettings.spellLineAmount, comparisonFrameSettings.spellLineHeight)
mainSpellsFrameScroll:SetPoint("topleft", comparePlugin, "topleft", 5, -30)
@@ -1659,6 +1672,20 @@ do
comparePlugin.mainPlayerName:SetPoint("topleft", mainSpellsFrameScroll, "topleft", 2, comparisonFrameSettings.playerNameYOffset)
comparePlugin.mainPlayerName.fontsize = comparisonFrameSettings.playerNameSize
--gradient below the spellsScroll using the atlas "BossBanner-BgBanner-Top"
local gradientBottom = detailsFramework:CreateTexture(comparePlugin, "BossBanner-BgBanner-Top", 1, 20, "border")
gradientBottom:SetPoint("topleft", mainSpellsFrameScroll, "bottomleft", -12, 6)
gradientBottom:SetPoint("topright", mainSpellsFrameScroll, "bottomright", 12, 6)
comparePlugin.bottomGradient = gradientBottom
--combat time shown below the spellscroll ~time
---@type df_label
comparePlugin.combatTimeLabel = detailsFramework:CreateLabel(comparePlugin, "")
comparePlugin.combatTimeLabel:SetPoint("top", mainSpellsFrameScroll, "bottom", 0, -1)
comparePlugin.combatTimeLabel.fontsize = comparisonFrameSettings.playerNameSize - 1
comparePlugin.combatTimeLabel:SetAlpha(0.834)
--create the framework for the comparing players
local settings = {
--comparison frame
@@ -1900,6 +1927,19 @@ do
newComparisonFrame.spellsScroll = spellsScroll
--gradient below the spellsScroll using the atlas "BossBanner-BgBanner-Top"
local gradientBottom = detailsFramework:CreateTexture(newComparisonFrame, "BossBanner-BgBanner-Top", 1, 20, "border")
gradientBottom:SetPoint("topleft", spellsScroll, "bottomleft", -12, 6)
gradientBottom:SetPoint("topright", spellsScroll, "bottomright", 12, 6)
newComparisonFrame.bottomGradient = gradientBottom
--combat time shown below the spellscroll ~time
---@type df_label
newComparisonFrame.combatTimeLabel = detailsFramework:CreateLabel(newComparisonFrame, "")
newComparisonFrame.combatTimeLabel:SetPoint("top", spellsScroll, "bottom", 0, -1)
newComparisonFrame.combatTimeLabel.fontsize = comparisonFrameSettings.playerNameSize - 1
newComparisonFrame.combatTimeLabel:SetAlpha(0.834)
--targets scroll
---@type comparescrollbox
local targetsScroll = detailsFramework:CreateScrollBox(newComparisonFrame, "$parentComparisonPlayerTargetsScroll", comparisonPlayerRefreshTargetScroll, {}, comparisonFrameSettings.comparisonScrollWidth, comparisonFrameSettings.targetScrollHeight, comparisonFrameSettings.targetScrollLineAmount, comparisonFrameSettings.targetScrollLineHeight)
+12 -5
View File
@@ -43,7 +43,9 @@ do
end
local buildOptionsPanel = function()
local optionsFrame = encounterDetails:CreatePluginOptionsFrame("EncounterDetailsOptionsWindow", "Encounter Breakdown Options")
local pluginIcon = "Interface\\AddOns\\Details_EncounterDetails\\images\\icon"
local pluginIconCoords = {0.15, 0.85, 0.15, 0.85}
local optionsFrame = encounterDetails:CreatePluginOptionsFrame("EncounterDetailsOptionsWindow", "Encounter Breakdown Options", 3, pluginIcon, pluginIconCoords)
-- 1 = only when inside a raid map
-- 2 = only when in raid group
-- 3 = only after a boss encounter
@@ -131,7 +133,13 @@ do
}
detailsFramework:BuildMenu(optionsFrame, menu, 15, -75, 260)
local options_text_template = detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = detailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
detailsFramework:BuildMenu(optionsFrame, menu, 15, -75, 260, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
encounterDetails.OpenOptionsPanel = function()
@@ -463,15 +471,14 @@ do
end
--segment selection
C_Timer.After(1, function()
C_Timer.After(5, function()
local buildSegmentosMenu = function(self)
local segmentList = Details:GetCombatSegments()
local resultTable = {}
for index, combate in ipairs(segmentList) do
if (combate.is_boss and combate.is_boss.index) then
--local l, r, t, b, icon = Details:GetBossIcon(combate.is_boss.mapid, combate.is_boss.index)
local bossIcon = Details:GetBossEncounterTexture(combate.is_boss.name)
local bossIcon = Details:GetBossEncounterTexture(combate.is_boss.id or combate.is_boss.encounter or combate.is_boss.name)
resultTable[#resultTable+1] = {value = index, label = "#" .. index .. " " .. combate.is_boss.name, icon = bossIcon, iconsize = {32, 20}, texcoord = {0, 1, 0, 0.9}, onclick = encounterDetails.OpenAndRefresh}
end
end
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

+14 -16
View File
@@ -17,6 +17,9 @@ local DF = DetailsFramework
local UnitGroupRolesAssigned = DF.UnitGroupRolesAssigned
local version = "95"
---@type detailsframework
local detailsFramework = DetailsFramework
--build the list of buffs to track
local flaskList = LIB_OPEN_RAID_FLASK_BUFF
local runeIds = DF.RuneIDs
@@ -188,27 +191,19 @@ local CreatePluginFrames = function()
end
end
local raidCheckFrame = CreateFrame("frame", nil, UIParent, "BackdropTemplate")
local raidCheckFrame = CreateFrame("frame", "RaidCheckDetailsPlugin", UIParent, "BackdropTemplate")
raidCheckFrame:SetPoint("bottom", DetailsRaidCheck.ToolbarButton, "top", 0, 10)
raidCheckFrame:SetClampedToScreen(true)
raidCheckFrame:SetFrameStrata("TOOLTIP")
raidCheckFrame.background = raidCheckFrame:CreateTexture("DetailsAllAttributesFrameBackground111", "background")
raidCheckFrame.background:SetDrawLayer("background", 2)
raidCheckFrame.background:SetPoint("topleft", raidCheckFrame, "topleft", 4, -4)
raidCheckFrame.background:SetPoint("bottomright", raidCheckFrame, "bottomright", -4, 4)
detailsFramework:AddRoundedCornersToFrame(raidCheckFrame, Details.PlayerBreakdown.RoundedCornerPreset)
raidCheckFrame.wallpaper = raidCheckFrame:CreateTexture("DetailsAllAttributesFrameWallPaper111", "background")
raidCheckFrame.wallpaper:SetDrawLayer("background", 4)
raidCheckFrame.wallpaper:SetPoint("topleft", raidCheckFrame, "topleft", 4, -4)
raidCheckFrame.wallpaper:SetPoint("bottomright", raidCheckFrame, "bottomright", -4, 4)
raidCheckFrame:SetBackdrop(Details.menu_backdrop_config.menus_backdrop)
raidCheckFrame:SetBackdropColor(unpack(Details.menu_backdrop_config.menus_backdropcolor))
raidCheckFrame:SetBackdropBorderColor(unpack(Details.menu_backdrop_config.menus_bordercolor))
C_Timer.After(10, function()
Details:RegisterFrameToColor(raidCheckFrame)
end)
local reportString1 = raidCheckFrame:CreateFontString(nil, "overlay", "GameFontNormal")
reportString1:SetPoint("bottomleft", raidCheckFrame, "bottomleft", 10, 8)
reportString1:SetPoint("bottomleft", raidCheckFrame, "bottomleft", 10, 5)
reportString1:SetText("|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:225:307|t Report No Food/Flask |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:328:409|t Report No Pre-Pot |TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:12:12:0:1:512:512:8:70:126:204|t Report No Rune | |cFFFFFFFFShift+Click: Options|r")
DetailsRaidCheck:SetFontSize(reportString1, 10)
@@ -230,6 +225,7 @@ local CreatePluginFrames = function()
}
local headerOptions = {
padding = 2,
backdrop_color = {.2, .2, .2, 0.834}
}
DetailsRaidCheck.Header = DF:CreateHeader(raidCheckFrame, headerTable, headerOptions)
@@ -425,7 +421,7 @@ local CreatePluginFrames = function()
line.TalentsRow:ClearIcons()
if (playerTable.Talents) then
if (playerTable.Talents and type(playerTable.Talents) == "table") then
for i = 1, #playerTable.Talents do
local talent = playerTable.Talents[i]
local talentID, name, texture, selected, available = GetTalentInfoByID(talent)
@@ -493,6 +489,8 @@ local CreatePluginFrames = function()
mainScroll:SetPoint("bottomright", raidCheckFrame, "bottomright", -10, 20)
mainScroll:Refresh()
mainScroll:SetBackdrop(nil)
--create lines
for i = 1, scrollLinesAmount do
mainScroll:CreateLine(scrollCreateLine)
@@ -959,7 +957,7 @@ local CreatePluginFrames = function()
end
local buildOptionsPanel = function()
local optionsFrame = DetailsRaidCheck:CreatePluginOptionsFrame("DetailsRaidCheckOptionsWindow", "Details! Raid Check Options", 1)
local optionsFrame = DetailsRaidCheck:CreatePluginOptionsFrame("DetailsRaidCheckOptionsWindow", "Details! Raid Check Options")
local optionsTable = {
{type = "label", get = function() return "General Settings:" end, text_template = DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE")},
{
@@ -1,4 +1,4 @@
## Interface: 11500
## Interface: 11501
## 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