@@ -180,131 +180,136 @@ function Module:BuildConfig(configBuilder, db)
180180 do
181181 local function isLoaded () return not not self .skyridingConfigID ; end ;
182182 local function isNotLoaded () return not isLoaded ; end ;
183- configBuilder :MakeHeader (GENERIC_TRAIT_FRAME_DRAGONRIDING_TITLE );
184- local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the Skyriding system on this character yet.' ]);
183+ local header = configBuilder :MakeHeader (GENERIC_TRAIT_FRAME_DRAGONRIDING_TITLE , nil , 2 );
184+ local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the Skyriding system on this character yet.' ], 2 );
185185 loading :AddShownPredicate (isNotLoaded );
186186 configBuilder :MakeCheckbox (
187187 ENABLE ,
188188 ' skyridingEnabled' ,
189189 L [' Automatically purchase %s talents when you have enough currency.' ]:format (GENERIC_TRAIT_FRAME_DRAGONRIDING_TITLE )
190- );
190+ ): SetParentInitializer ( header ) ;
191191 configBuilder :MakeButton (
192192 L [' Toggle UI' ],
193193 function () self :ToggleTreeUI (SKYRIDING_TREE_ID ); end ,
194194 L [' Toggle the %s UI to view and adjust talents.' ]:format (GENERIC_TRAIT_FRAME_DRAGONRIDING_TITLE )
195- ):AddModifyPredicate ( isLoaded );
195+ ):SetParentInitializer ( header , isLoaded );
196196 configBuilder :MakeDropdown (
197197 L [' Auto Ride Along' ],
198198 ' rideAlong' ,
199199 L [' Automatically enable/disable Ride Along the first time you log in on a character.' ],
200200 {
201- { value = CHOICE_NODE_OPTION_1 , text = L [' Enable Ride Along' ], },
202- { value = CHOICE_NODE_OPTION_2 , text = L [' Disable Ride Along' ], },
203- { value = CHOICE_NODE_NOT_SET , text = L [' Do Nothing' ], },
201+ { value = CHOICE_NODE_OPTION_1 , text = L [' Enable Ride Along' ] },
202+ { value = CHOICE_NODE_OPTION_2 , text = L [' Disable Ride Along' ] },
203+ { value = CHOICE_NODE_NOT_SET , text = L [' Do Nothing' ] },
204204 },
205205 setEnabledTreeIDs
206- );
206+ ): SetParentInitializer ( header ) ;
207207 configBuilder :MakeButton (
208208 L [' Reset Ride Along Cache' ],
209209 function ()
210210 self .db .rideAlongCache = {};
211211 self :DefferPurchase ();
212212 end ,
213213 L [' Reset the Ride Along cache, so all characters will match the current setting on login.' ]
214- );
214+ ): SetParentInitializer ( header ) ;
215215 configBuilder :MakeDropdown (
216216 L [' Auto Surge Choice' ],
217217 ' surge' ,
218218 L [' Automatically pick Whirling Surge/Lightning Surge the first time you log in on a character.' ],
219219 {
220- { value = CHOICE_NODE_OPTION_1 , text = StripHyperlinks (C_Spell .GetSpellLink (WHIRLING_SURGE_SPELL_ID )) or ' Whirling Surge' , },
221- { value = CHOICE_NODE_OPTION_2 , text = StripHyperlinks (C_Spell .GetSpellLink (LIGHTNING_SURGE_SPELL_ID )) or ' Lightning Surge' , },
222- { value = CHOICE_NODE_NOT_SET , text = L [' Do Nothing' ], },
220+ { value = CHOICE_NODE_OPTION_1 , text = StripHyperlinks (C_Spell .GetSpellLink (WHIRLING_SURGE_SPELL_ID )) or ' Whirling Surge' },
221+ { value = CHOICE_NODE_OPTION_2 , text = StripHyperlinks (C_Spell .GetSpellLink (LIGHTNING_SURGE_SPELL_ID )) or ' Lightning Surge' },
222+ { value = CHOICE_NODE_NOT_SET , text = L [' Do Nothing' ] },
223223 },
224224 setEnabledTreeIDs
225- );
225+ ): SetParentInitializer ( header ) ;
226226 configBuilder :MakeButton (
227227 L [' Reset Surge Cache' ],
228228 function ()
229229 self .db .surgeCache = {};
230230 self :DefferPurchase ();
231231 end ,
232232 L [' Reset the Surge cache, so all characters will match the current setting on login.' ]
233- );
233+ ): SetParentInitializer ( header ) ;
234234 end
235235 do
236236 local function isLoaded () return not not self :GetLemixConfigID (); end ;
237237 local function isNotLoaded () return not isLoaded (); end ;
238238 local function isLemix () return IS_LEMIX ; end ;
239- configBuilder :MakeHeader (L [' Legion Remix: Limits Unbound' ]):AddShownPredicate (isLemix );
240- local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked Legion Remix artifact traits yet.' ]);
239+ local header = configBuilder :MakeHeader (L [' Legion Remix: Limits Unbound' ], nil , 2 )
240+ header :AddShownPredicate (isLemix );
241+
242+ local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked Legion Remix artifact traits yet.' ], 2 );
241243 loading :AddShownPredicate (isNotLoaded );
242244 loading :AddShownPredicate (isLemix );
243245
244- configBuilder :MakeCheckbox (
246+ local enabled = configBuilder :MakeCheckbox (
245247 ENABLE ,
246248 ' lemixLimitsUnboundEnabled' ,
247249 L [' Automatically upgrade the final Limits Unbound talent when you have enough currency.' ]
248- ):AddShownPredicate (isLemix );
250+ );
251+ enabled :AddShownPredicate (isLemix );
252+ enabled :SetParentInitializer (header );
253+
249254 local openUI = configBuilder :MakeButton (
250255 L [' Open Artifact Traits UI' ],
251256 function () SocketInventoryItem (16 ); end ,
252257 L [' Open the Legion Remix Artifact traits UI to view and adjust talents.' ]
253258 );
254- openUI :AddModifyPredicate ( isLoaded )
259+ openUI :SetParentInitializer ( header , isLoaded )
255260 openUI :AddShownPredicate (isLemix );
256261 end
257262 do
258263 local function isLoaded () return not not self .reshiiWrapsConfigID ; end ;
259264 local function isNotLoaded () return not isLoaded (); end ;
260- configBuilder :MakeHeader (GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE );
261- local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the %s system on this character yet.' ]:format (GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE ));
265+ local header = configBuilder :MakeHeader (GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE , nil , 2 );
266+ local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the %s system on this character yet.' ]:format (GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE ), 2 );
262267 loading :AddShownPredicate (isNotLoaded );
263268 configBuilder :MakeCheckbox (
264269 ENABLE ,
265270 ' reshiiWrapsEnabled' ,
266271 L [' Automatically purchase %s talents when you have enough currency.' ]:format (GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE )
267- );
272+ ): SetParentInitializer ( header ) ;
268273 configBuilder :MakeButton (
269274 L [' Toggle UI' ],
270275 function () self :ToggleTreeUI (RESHII_WRAPS_TREE_ID ); end ,
271276 L [' Toggle the %s UI to view and adjust talents.' ]:format (GENERIC_TRAIT_FRAME_RESHII_WRAPS_TITLE )
272- ):AddModifyPredicate ( isLoaded );
277+ ):SetParentInitializer ( header , isLoaded );
273278 end
274279 do
275280 local HORRIFIC_VISIONS_TITLE = SPLASH_BATTLEFORAZEROTH_8_3_0_FEATURE1_TITLE or L [' Horrific Visions' ];
276281 local function isLoaded () return not not self .horrificVisionsConfigID ; end ;
277282 local function isNotLoaded () return not isLoaded (); end ;
278- configBuilder :MakeHeader (HORRIFIC_VISIONS_TITLE );
279- local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the Horrific Visions system on this character yet.' ]);
283+ local header = configBuilder :MakeHeader (HORRIFIC_VISIONS_TITLE , nil , 2 );
284+ local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the Horrific Visions system on this character yet.' ], 2 );
280285 loading :AddShownPredicate (isNotLoaded );
281286 configBuilder :MakeCheckbox (
282287 ENABLE ,
283288 ' horrificVisionsEnabled' ,
284289 L [' Automatically purchase Horrific Visions talents when you have enough currency.' ]
285- );
290+ ): SetParentInitializer ( header ) ;
286291 configBuilder :MakeButton (
287292 L [' Toggle UI' ],
288293 function () self :ToggleTreeUI (HORRIFIC_VISIONS_TREE_ID ); end ,
289294 L [' Toggle the %s UI to view and adjust talents.' ]:format (HORRIFIC_VISIONS_TITLE )
290- ):AddModifyPredicate ( isLoaded );
295+ ):SetParentInitializer ( header , isLoaded );
291296 end
292297 do
293298 local function isLoaded () return not not self .overchargedTitanConsoleConfigID ; end ;
294299 local function isNotLoaded () return not isLoaded (); end ;
295- configBuilder :MakeHeader (GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE );
296- local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the %s system on this character yet.' ]:format (GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE ));
300+ local header = configBuilder :MakeHeader (GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE , nil , 2 );
301+ local loading = configBuilder :MakeText (L [' Loading...' ] .. ' \n ' .. L [' You have not unlocked the %s system on this character yet.' ]:format (GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE ), 2 );
297302 loading :AddShownPredicate (isNotLoaded );
298303 configBuilder :MakeCheckbox (
299304 ENABLE ,
300305 ' overchargedTitanConsoleEnabled' ,
301306 L [' Automatically purchase %s talents when you have enough currency.' ]:format (GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE )
302- );
307+ ): SetParentInitializer ( header ) ;
303308 configBuilder :MakeButton (
304309 L [' Toggle UI' ],
305310 function () self :ToggleTreeUI (OVERCHARGED_TITAN_CONSOLE_TREE_ID ); end ,
306311 L [' Toggle the %s UI to view and adjust talents.' ]:format (GENERIC_TRAIT_FRAME_TITAN_CONSOLE_TITLE )
307- ):AddModifyPredicate ( isLoaded );
312+ ):SetParentInitializer ( header , isLoaded );
308313 end
309314end
310315
0 commit comments