@@ -259,6 +259,30 @@ public Collection<OptionButtonFactory> createOptionButtons() {
259
259
.setCategory ("speedrunigt.option.category.timer" )
260
260
);
261
261
262
+ factories .add (screen -> new OptionButtonFactory .Builder ()
263
+ .setButtonWidget (
264
+ new ButtonWidget (0 , 0 , 150 , 20 , new TranslatableText ("speedrunigt.option.practice_detect" ).append (" : " ).append (SpeedRunOption .getOption (SpeedRunOptions .ENABLE_PRACTICE_DETECT ) ? ScreenTexts .ON : ScreenTexts .OFF ),
265
+ (ButtonWidget button ) -> {
266
+ SpeedRunOption .setOption (SpeedRunOptions .ENABLE_PRACTICE_DETECT , !SpeedRunOption .getOption (SpeedRunOptions .ENABLE_PRACTICE_DETECT ));
267
+ button .setMessage (new TranslatableText ("speedrunigt.option.practice_detect" ).append (" : " ).append (SpeedRunOption .getOption (SpeedRunOptions .ENABLE_PRACTICE_DETECT ) ? ScreenTexts .ON : ScreenTexts .OFF ));
268
+ })
269
+ )
270
+ .setToolTip (() -> I18n .translate ("speedrunigt.option.practice_detect.description" ))
271
+ .setCategory ("speedrunigt.option.category.practice" )
272
+ );
273
+
274
+ factories .add (screen -> new OptionButtonFactory .Builder ()
275
+ .setButtonWidget (
276
+ new ButtonWidget (0 , 0 , 150 , 20 , new TranslatableText ("speedrunigt.option.teleport_to_practice" ).append (" : " ).append (SpeedRunOption .getOption (SpeedRunOptions .TELEPORT_TO_END_PRACTICE ) ? ScreenTexts .ON : ScreenTexts .OFF ),
277
+ (ButtonWidget button ) -> {
278
+ SpeedRunOption .setOption (SpeedRunOptions .TELEPORT_TO_END_PRACTICE , !SpeedRunOption .getOption (SpeedRunOptions .TELEPORT_TO_END_PRACTICE ));
279
+ button .setMessage (new TranslatableText ("speedrunigt.option.teleport_to_practice" ).append (" : " ).append (SpeedRunOption .getOption (SpeedRunOptions .TELEPORT_TO_END_PRACTICE ) ? ScreenTexts .ON : ScreenTexts .OFF ));
280
+ })
281
+ )
282
+ .setToolTip (() -> I18n .translate ("speedrunigt.option.teleport_to_practice.description" ))
283
+ .setCategory ("speedrunigt.option.category.practice" )
284
+ );
285
+
262
286
ButtonWidget alwaysAutoRetimeButton = new ButtonWidget (0 , 0 , 150 , 20 , new TranslatableText ("speedrunigt.option.always_use_auto_retime" ).append (" : " ).append (SpeedRunOption .getOption (SpeedRunOptions .ALWAYS_USE_AUTO_RETIME ) ? ScreenTexts .ON : ScreenTexts .OFF ),
263
287
(ButtonWidget button ) -> {
264
288
SpeedRunOption .setOption (SpeedRunOptions .ALWAYS_USE_AUTO_RETIME , !SpeedRunOption .getOption (SpeedRunOptions .ALWAYS_USE_AUTO_RETIME ));
0 commit comments