From 6e43705daab012d1eec1241b3583f3fa21ff5e80 Mon Sep 17 00:00:00 2001 From: Continuity Date: Wed, 4 Sep 2024 21:57:46 +0200 Subject: [PATCH] - fix options load and search --- Plater_ChangeLog.lua | 1 + options/Plater_O_Advanced.lua | 3 +++ options/Plater_O_BossMod.lua | 5 ++++- options/Plater_O_CastBar.lua | 3 +++ options/Plater_O_Search.lua | 6 +++++- 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Plater_ChangeLog.lua b/Plater_ChangeLog.lua index a2f5a8f0..027dcf09 100644 --- a/Plater_ChangeLog.lua +++ b/Plater_ChangeLog.lua @@ -8,6 +8,7 @@ function Plater.GetChangelogTable() if (not Plater.ChangeLogTable) then Plater.ChangeLogTable = { + {1725050765, "Bug Fix", "Nov 4th, 2024", "Fixing issue with options tabs loading in twice sometimes.", "cont1nuity"}, {1725050765, "Backend Change", "Nov 4th, 2024", "Use reaction name coloring for 'name only' enemy NPCs instead of fixed color.", "cont1nuity"}, {1725050765, "Backend Change", "Aug 31st, 2024", "Glow API documentation.", "cont1nuity"}, {1725050765, "Bug Fix", "Aug 30th, 2024", "Fixing issue with unit trigger tooltips not showing on entries as name.", "cont1nuity"}, diff --git a/options/Plater_O_Advanced.lua b/options/Plater_O_Advanced.lua index 83bd45e8..6e690cc9 100644 --- a/options/Plater_O_Advanced.lua +++ b/options/Plater_O_Advanced.lua @@ -15,6 +15,8 @@ local on_select_blizzard_nameplate_large_font = function (_, _, value) end function platerInternal.CreateAdvancedOptions() + if platerInternal.LoadOnDemand_IsLoaded.AdvancedOptions then return end -- already loaded + --templates local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE") local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE") @@ -1226,4 +1228,5 @@ function platerInternal.CreateAdvancedOptions() platerInternal.LoadOnDemand_IsLoaded.AdvancedOptions = true ---@diagnostic disable-next-line: undefined-global table.insert(PlaterOptionsPanelFrame.AllSettingsTable, advanced_options) + platerInternal.CreateAdvancedOptions = function() end end \ No newline at end of file diff --git a/options/Plater_O_BossMod.lua b/options/Plater_O_BossMod.lua index e6d6d9cd..d7d30a2a 100644 --- a/options/Plater_O_BossMod.lua +++ b/options/Plater_O_BossMod.lua @@ -15,6 +15,8 @@ local on_select_blizzard_nameplate_large_font = function (_, _, value) end function platerInternal.CreateBossModOptions() + if platerInternal.LoadOnDemand_IsLoaded.BossModOptions then return end -- already loaded + --templates local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE") local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE") @@ -156,7 +158,7 @@ function platerInternal.CreateBossModOptions() --anchor { - type = "select", + type = "select", get = function() return Plater.db.profile.bossmod_icons_anchor.side end, values = function() return build_anchor_side_table (nil, "bossmod_icons_anchor") end, name = "OPTIONS_ANCHOR", @@ -294,4 +296,5 @@ function platerInternal.CreateBossModOptions() platerInternal.LoadOnDemand_IsLoaded.BossModOptions = true ---@diagnostic disable-next-line: undefined-global table.insert(PlaterOptionsPanelFrame.AllSettingsTable, bossmod_options) + platerInternal.CreateBossModOptions = function() end end \ No newline at end of file diff --git a/options/Plater_O_CastBar.lua b/options/Plater_O_CastBar.lua index 2c6f49f9..59c5df41 100644 --- a/options/Plater_O_CastBar.lua +++ b/options/Plater_O_CastBar.lua @@ -7,6 +7,8 @@ local DF = DetailsFramework local _ function platerInternal.CreateCastBarOptions() + if platerInternal.LoadOnDemand_IsLoaded.CastOptions then return end + local startX, startY, heightSize = 10, platerInternal.optionsYStart, 755 local highlightColorLastCombat = {1, 1, .2, .25} @@ -741,4 +743,5 @@ function platerInternal.CreateCastBarOptions() platerInternal.LoadOnDemand_IsLoaded.CastOptions = true table.insert(PlaterOptionsPanelFrame.AllSettingsTable, castBar_options) + platerInternal.CreateCastBarOptions = function() end end \ No newline at end of file diff --git a/options/Plater_O_Search.lua b/options/Plater_O_Search.lua index 269a401e..4f35cd49 100644 --- a/options/Plater_O_Search.lua +++ b/options/Plater_O_Search.lua @@ -117,7 +117,10 @@ function platerInternal.CreateSearchOptions() --22 profiles mainFrame.AllButtons [23].button.text:GetText(), -- advanced --mainFrame.AllButtons [24].button.text:GetText(), -- resources - --25 search + --25 wago imports + --26 search + --27 plugins + mainFrame.AllButtons [28].button.text:GetText(), -- bossmods } --this table will hold all options @@ -182,4 +185,5 @@ function platerInternal.CreateSearchOptions() end) platerInternal.LoadOnDemand_IsLoaded.SearchOptions = true + platerInternal.CreateSearchOptions = function() end end \ No newline at end of file