From a094f4364504ece809234e21ce85240115b70415 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 28 Dec 2023 19:36:31 -0300 Subject: [PATCH] Plugin Updates --- boot.lua | 4 +- plugins/Details_EncounterDetails/frames.lua | 47 ++++++++++--------- .../Details_EncounterDetails/frames_auras.lua | 2 - .../Details_RaidCheck/Details_RaidCheck.lua | 5 +- .../Details_TinyThreat/Details_TinyThreat.lua | 14 +++++- 5 files changed, 41 insertions(+), 31 deletions(-) diff --git a/boot.lua b/boot.lua index 42d7ad8c..610cd20c 100644 --- a/boot.lua +++ b/boot.lua @@ -13,8 +13,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - Details.build_counter = 12188 - Details.alpha_build_counter = 12188 --if this is higher than the regular counter, use it instead + Details.build_counter = 12190 + Details.alpha_build_counter = 12190 --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_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index 14101be8..74740b2a 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -463,34 +463,35 @@ do end --segment selection - local buildSegmentosMenu = function(self) - local segmentList = Details:GetCombatSegments() - local resultTable = {} + C_Timer.After(1, 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) - 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} + 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) + 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 + + return resultTable end - return resultTable - end + --space between the 4 tab buttons and the segments and macro frames + local xSpacement = 20 + --~dropdown + local segmentDropdown = detailsFramework:NewDropDown(edFrame, _, "$parentSegmentsDropdown", "segmentsDropdown", 218, 20, buildSegmentosMenu, nil) + segmentDropdown:SetPoint("left", edFrame.buttonSwitchPhases, "right", xSpacement, 0) + segmentDropdown:SetTemplate(detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) - --space between the 4 tab buttons and the segments and macro frames - local xSpacement = 20 - - --~dropdown - local segmentDropdown = detailsFramework:NewDropDown(edFrame, _, "$parentSegmentsDropdown", "segmentsDropdown", 218, 20, buildSegmentosMenu, nil) - segmentDropdown:SetPoint("left", edFrame.buttonSwitchPhases, "right", xSpacement, 0) - segmentDropdown:SetTemplate(detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) - - --options button - local optionsButton = detailsFramework:NewButton(edFrame, nil, "$parentOptionsButton", "OptionsButton", 120, 20, encounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") - optionsButton:SetPoint("left", segmentDropdown, "right", 10, 0) - optionsButton:SetTemplate(detailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE")) - optionsButton:SetIcon([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) + --options button + local optionsButton = detailsFramework:NewButton(edFrame, nil, "$parentOptionsButton", "OptionsButton", 120, 20, encounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") + optionsButton:SetPoint("left", segmentDropdown, "right", 10, 0) + optionsButton:SetTemplate(detailsFramework:GetTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE")) + optionsButton:SetIcon([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) + end) --macro box edFrame.MacroEditBox = detailsFramework:CreateTextEntry(edFrame, function()end, 300, 20) diff --git a/plugins/Details_EncounterDetails/frames_auras.lua b/plugins/Details_EncounterDetails/frames_auras.lua index ecb7ff05..6f1396f8 100644 --- a/plugins/Details_EncounterDetails/frames_auras.lua +++ b/plugins/Details_EncounterDetails/frames_auras.lua @@ -272,9 +272,7 @@ local refresh_bossmods_timers = function(self) if (spell > 40000) then local spellname, _, spellicon = _GetSpellInfo(spell) table.insert(timersToAdd, {label = spellname, value = {timerTable[2], spellname, spellIcon or spellicon, timerTable.id, timerTable[7]}, icon = spellIcon or spellicon}) - else - --local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo(spell) local sectionInfo = C_EncounterJournal.GetSectionInfo(spell) table.insert(timersToAdd, {label = sectionInfo.title, value = {timerTable[2], sectionInfo.title, spellIcon or sectionInfo.abilityIcon, timerTable.id, timerTable[7]}, icon = spellIcon or sectionInfo.abilityIcon}) end diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.lua b/plugins/Details_RaidCheck/Details_RaidCheck.lua index bf0cc15f..e2dd6805 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.lua +++ b/plugins/Details_RaidCheck/Details_RaidCheck.lua @@ -674,8 +674,9 @@ local CreatePluginFrames = function() local mythicPlusProfile = rioProfile.mythicKeystoneProfile local previousScore = mythicPlusProfile.previousScore or 0 local currentScore = mythicPlusProfile.currentScore or 0 - mythicPlusScore = previousScore and previousScore > currentScore and previousScore or currentScore - mythicPlusScore = mythicPlusScore or currentScore + --mythicPlusScore = previousScore and previousScore > currentScore and previousScore or currentScore + --mythicPlusScore = mythicPlusScore or currentScore + mythicPlusScore = currentScore end end diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua index 55b39498..6092f54f 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.lua +++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua @@ -1,5 +1,6 @@ local AceLocale = LibStub ("AceLocale-3.0") local Loc = AceLocale:GetLocale ("Details_Threat") +local detailsFramework = _G.DetailsFramework local _GetNumSubgroupMembers = GetNumSubgroupMembers --> wow api local _GetNumGroupMembers = GetNumGroupMembers --> wow api @@ -33,7 +34,7 @@ local _ local UnitDetailedThreatSituation = UnitDetailedThreatSituation local _UnitDetailedThreatSituation -if (DetailsFramework.IsTimewalkWoW()) then +if (detailsFramework.IsTimewalkWoW()) then _UnitDetailedThreatSituation = function(source, target) local isTanking, status, threatpct, rawthreatpct, threatvalue = UnitDetailedThreatSituation(source, target) @@ -733,6 +734,7 @@ local build_options_panel = function() local options_frame = ThreatMeter:CreatePluginOptionsFrame ("ThreatMeterOptionsWindow", "Tiny Threat Options", 1) local menu = { + --[=[]] { type = "range", get = function() return ThreatMeter.saveddata.updatespeed end, @@ -744,6 +746,7 @@ local build_options_panel = function() name = "Update Speed", usedecimals = true, }, + --]=] { type = "toggle", get = function() return ThreatMeter.saveddata.useplayercolor end, @@ -814,7 +817,14 @@ local build_options_panel = function() } - Details.gump:BuildMenu (options_frame, menu, 15, -35, 160) + 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") + menu.always_boxfirst = true + + detailsFramework:BuildMenu (options_frame, menu, 15, -35, 160, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) options_frame:SetHeight(160) end