Lazy load options panel

This commit is contained in:
Tercio Jose
2024-09-01 19:04:15 -03:00
committed by andrew6180
parent defce45d74
commit 7442336f74
+53 -27
View File
@@ -1776,7 +1776,10 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+40, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
C_Timer.After(0.2, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+40, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)
@@ -2163,24 +2166,26 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) C_Timer.After(0.15, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
local separatorOption = sectionFrame.widget_list[25] local separatorOption = sectionFrame.widget_list[25]
local bracketOption = sectionFrame.widget_list[26] local bracketOption = sectionFrame.widget_list[26]
local warningLabel = sectionFrame.widget_list[27] local warningLabel = sectionFrame.widget_list[27]
Details222.OptionsPanel.textSeparatorOption = separatorOption Details222.OptionsPanel.textSeparatorOption = separatorOption
Details222.OptionsPanel.textbracketOption = bracketOption Details222.OptionsPanel.textbracketOption = bracketOption
sectionFrame:SetScript("OnShow", function() sectionFrame:SetScript("OnShow", function()
if (currentInstance.use_multi_fontstrings) then if (currentInstance.use_multi_fontstrings) then
separatorOption:Disable() separatorOption:Disable()
bracketOption:Disable() bracketOption:Disable()
warningLabel:Show() warningLabel:Show()
else else
separatorOption:Enable() separatorOption:Enable()
bracketOption:Enable() bracketOption:Enable()
warningLabel:Hide() warningLabel:Hide()
end end
end)
end) end)
end end
@@ -2716,7 +2721,9 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) C_Timer.After(0.25, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)
@@ -3141,7 +3148,9 @@ do
} }
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) C_Timer.After(0.05, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)
@@ -3256,7 +3265,10 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
C_Timer.After(0.3, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
do --micro displays do --micro displays
@@ -3895,7 +3907,9 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) C_Timer.After(0.333, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)
@@ -4152,7 +4166,9 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) C_Timer.After(0.366, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)
@@ -4599,8 +4615,10 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) C_Timer.After(0.275, function()
refreshToggleAnchor() DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
refreshToggleAnchor()
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)
@@ -4748,7 +4766,10 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
C_Timer.After(0.4, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)
@@ -5168,7 +5189,10 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
C_Timer.After(0.433, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
sectionFrame:SetScript("OnShow", function() sectionFrame:SetScript("OnShow", function()
sectionFrame:UpdateWallpaperInfo() sectionFrame:UpdateWallpaperInfo()
@@ -6364,7 +6388,9 @@ do
sectionFrame.sectionOptions = sectionOptions sectionFrame.sectionOptions = sectionOptions
sectionOptions.always_boxfirst = true sectionOptions.always_boxfirst = true
DF:BuildMenu(sectionFrame, sectionOptions, startX + 350, startY - 20, heightSize + 300, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template) C_Timer.After(0.1, function()
DF:BuildMenu(sectionFrame, sectionOptions, startX + 350, startY - 20, heightSize + 300, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end)
end end
tinsert(Details.optionsSection, buildSection) tinsert(Details.optionsSection, buildSection)