@@ -94,6 +94,9 @@ public class SettingsGui extends SkyblockAddonsScreen {
9494 private int cachedTrackX ;
9595 private int cachedTrackHeight ;
9696
97+ private int lastEnchantX ;
98+ private double lastEnchantY ;
99+
97100 public SettingsGui (@ NonNull Feature feature , int page , int lastPage , EnumUtils .GuiTab lastTab , EnumUtils .GUIType lastGUI ) {
98101 super (Component .empty ());
99102 this .feature = feature ;
@@ -358,7 +361,7 @@ private void addButton(FeatureSetting setting, Object settingValue) {
358361 return ;
359362 }
360363
361- boxWidth = 31 ;
364+ boxWidth = ButtonSettingToggle . WIDTH ;
362365 x = halfWidth - (boxWidth / 2 );
363366 y = getRowHeightSetting (row );
364367 addRenderableWidget (new ButtonSettingToggle (x , y , Translations .getMessage ("settings.expandDeployableStatus" ), setting ));
@@ -436,7 +439,7 @@ private void addButton(FeatureSetting setting, Object settingValue) {
436439 break ;
437440
438441 case TREVOR_SHOW_QUEST_COOLDOWN :
439- boxWidth = 31 ; // Default size and stuff.
442+ boxWidth = ButtonSettingToggle . WIDTH ;
440443 x = halfWidth - (boxWidth / 2 );
441444 y = getRowHeightSetting (row );
442445 addRenderableWidget (new ButtonSettingToggle (x , y , setting .getMessage (), setting ));
@@ -447,7 +450,7 @@ private void addButton(FeatureSetting setting, Object settingValue) {
447450 break ;
448451
449452 case TREVOR_HIGHLIGHT_TRACKED_ENTITY :
450- boxWidth = 31 ; // Default size and stuff.
453+ boxWidth = ButtonSettingToggle . WIDTH ;
451454 x = halfWidth - (boxWidth / 2 );
452455 y = getRowHeightSetting (row );
453456 addRenderableWidget (new ButtonSettingToggle (x , y , setting .getMessage (), setting ));
@@ -458,7 +461,7 @@ private void addButton(FeatureSetting setting, Object settingValue) {
458461 break ;
459462
460463 case CLASS_COLORED_TEAMMATE :
461- boxWidth = 31 ; // Default size and stuff.
464+ boxWidth = ButtonSettingToggle . WIDTH ;
462465 x = halfWidth - (boxWidth / 2 );
463466 y = getRowHeightSetting (row );
464467 addRenderableWidget (new ButtonSettingToggle (x , y , setting .getMessage (), setting ));
@@ -487,10 +490,40 @@ private void addButton(FeatureSetting setting, Object settingValue) {
487490 case POOR_ENCHANT_COLOR :
488491 case COMMA_ENCHANT_COLOR :
489492 boxWidth = 100 ;
490- x = halfWidth - (boxWidth / 2 );
491- y = getRowHeightSetting (row );
493+ x = lastEnchantX = halfWidth - (boxWidth / 2 ) - ( ButtonSettingToggle . WIDTH * 4 / 2 ) - 45 ;
494+ y = lastEnchantY = getRowHeightSetting (row );
492495 addRenderableWidget (new ButtonOpenColorMenu (x , y , 100 , 20 , setting .getMessage (), setting ));
493- if (setting == FeatureSetting .COMMA_ENCHANT_COLOR ) row += 0.4F ; // Last spacing
496+ row --;
497+ break ;
498+
499+ case PERFECT_ENCHANT_BOLD :
500+ case GREAT_ENCHANT_BOLD :
501+ case GOOD_ENCHANT_BOLD :
502+ case POOR_ENCHANT_BOLD :
503+ case COMMA_ENCHANT_BOLD :
504+ lastEnchantX += 100 + 10 ;
505+ addRenderableWidget (new ButtonSettingToggle (lastEnchantX , lastEnchantY + 2.5 , setting .getMessage (), setting ));
506+ row --;
507+ break ;
508+ case PERFECT_ENCHANT_ITALIC :
509+ case GREAT_ENCHANT_ITALIC :
510+ case GOOD_ENCHANT_ITALIC :
511+ case POOR_ENCHANT_ITALIC :
512+ case COMMA_ENCHANT_ITALIC :
513+ case PERFECT_ENCHANT_UNDERLINED :
514+ case GREAT_ENCHANT_UNDERLINED :
515+ case GOOD_ENCHANT_UNDERLINED :
516+ case POOR_ENCHANT_UNDERLINED :
517+ case COMMA_ENCHANT_UNDERLINED :
518+ lastEnchantX -= 20 ;
519+ case PERFECT_ENCHANT_STRIKETHROUGH :
520+ case GREAT_ENCHANT_STRIKETHROUGH :
521+ case GOOD_ENCHANT_STRIKETHROUGH :
522+ case POOR_ENCHANT_STRIKETHROUGH :
523+ case COMMA_ENCHANT_STRIKETHROUGH :
524+ lastEnchantX += ButtonSettingToggle .WIDTH + 40 ;
525+ addRenderableWidget (new ButtonSettingToggle (lastEnchantX , lastEnchantY + 2.5 , setting .getMessage (), setting ));
526+ if (!setting .name ().endsWith ("_STRIKETHROUGH" )) row --; // Except last one
494527 break ;
495528
496529 case ENCHANT_LAYOUT :
@@ -558,7 +591,7 @@ private void addButton(FeatureSetting setting, Object settingValue) {
558591 default :
559592 if (setting .isUniversal ()) return ; // see addUniversalButton()
560593
561- boxWidth = 31 ; // Default size and stuff.
594+ boxWidth = ButtonSettingToggle . WIDTH ; // Default size and stuff.
562595 x = halfWidth - (boxWidth / 2 );
563596 y = getRowHeightSetting (row );
564597 addRenderableWidget (new ButtonSettingToggle (x , y , setting .getMessage (), setting ));
0 commit comments