Skip to content

Commit

Permalink
- fix options load and search
Browse files Browse the repository at this point in the history
  • Loading branch information
cont1nuity committed Sep 4, 2024
1 parent ce335ff commit 6e43705
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions Plater_ChangeLog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
3 changes: 3 additions & 0 deletions options/Plater_O_Advanced.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
5 changes: 4 additions & 1 deletion options/Plater_O_BossMod.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
3 changes: 3 additions & 0 deletions options/Plater_O_CastBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -741,4 +743,5 @@ function platerInternal.CreateCastBarOptions()

platerInternal.LoadOnDemand_IsLoaded.CastOptions = true
table.insert(PlaterOptionsPanelFrame.AllSettingsTable, castBar_options)
platerInternal.CreateCastBarOptions = function() end
end
6 changes: 5 additions & 1 deletion options/Plater_O_Search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -182,4 +185,5 @@ function platerInternal.CreateSearchOptions()
end)

platerInternal.LoadOnDemand_IsLoaded.SearchOptions = true
platerInternal.CreateSearchOptions = function() end
end

0 comments on commit 6e43705

Please sign in to comment.