File tree 3 files changed +20
-7
lines changed
3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ globals = {
99
99
"UIParent",
100
100
"UISpecialFrames",
101
101
"Settings",
102
+ "SettingsPanel",
102
103
"PartyMemberFrame1",
103
104
-- FrameXML globals
104
105
Original file line number Diff line number Diff line change 537
537
" C_Timer" ,
538
538
" hooksecurefunc" ,
539
539
" GetTime" ,
540
- " AdvancedInterfaceOptionsSaved"
540
+ " AdvancedInterfaceOptionsSaved" ,
541
+ " SettingsPanel"
541
542
],
542
543
"diagnostics.disable" : [
543
544
" lowercase-global" ,
Original file line number Diff line number Diff line change @@ -129,14 +129,25 @@ function E:Init() -- Runs after our saved variables are loaded and cvars have be
129
129
end
130
130
SLASH_AIO1 = " /aio"
131
131
132
- -- TODO: Re-enable in 11.0.2 when subcategories are fixed
133
- --[[ SlashCmdList.CVAR = function()
134
- if not InCombatLockdown() then
135
- -- Does not work, opens to main category
136
- Settings.OpenToCategory(cVarCategoryID)
132
+ -- TODO: Adjust in 11.0.2 when subcategories are properly fixed
133
+ SlashCmdList .CVAR = function ()
134
+ if not InCombatLockdown () then
135
+ for _ , category in ipairs (SettingsPanel :GetCategoryList ().allCategories ) do
136
+ if category .ID == mainCategoryID and category .subcategories then
137
+ for _ , subCategory in ipairs (category .subcategories ) do
138
+ if subCategory .ID == cVarCategoryID then
139
+ SettingsPanel :Show ()
140
+ SettingsPanel :SelectCategory (subCategory )
141
+ break
142
+ end
143
+ end
137
144
end
145
+ end
146
+ else
147
+ DEFAULT_CHAT_FRAME :AddMessage (format (" %s: Can't modify interface options in combat" , addonName ))
138
148
end
139
- SLASH_CVAR1 = "/cvar"]]
149
+ end
150
+ SLASH_CVAR1 = " /cvar"
140
151
end
141
152
142
153
function addon :RecordCVar (cvar , value ) -- Save cvar to DB for loading later
You can’t perform that action at this time.
0 commit comments