@@ -40,15 +40,62 @@ public String toString()
4040 }
4141 }
4242
43+ public enum IconLayout
44+ {
45+ HORIZONTAL ("Horizontal" ),
46+ VERTICAL ("Vertical" );
47+
48+ private final String label ;
49+
50+ IconLayout (String label )
51+ {
52+ this .label = label ;
53+ }
54+
55+ @ Override
56+ public String toString ()
57+ {
58+ return label ;
59+ }
60+ }
61+
62+ public enum VerticalInfoPosition
63+ {
64+ BELOW ("Below icon" ),
65+ SIDE ("To the side" );
66+
67+ private final String label ;
68+
69+ VerticalInfoPosition (String label )
70+ {
71+ this .label = label ;
72+ }
73+
74+ @ Override
75+ public String toString ()
76+ {
77+ return label ;
78+ }
79+ }
80+
4381 private final EnumSetting <DisplayMode > displayMode = new EnumSetting <>(
4482 "Display mode" , DisplayMode .values (), DisplayMode .BOTH );
83+ private final EnumSetting <IconLayout > iconLayout = new EnumSetting <>(
84+ "Icon layout" , IconLayout .values (), IconLayout .HORIZONTAL );
85+ private final EnumSetting <VerticalInfoPosition > verticalInfoPosition =
86+ new EnumSetting <>("Info position" , VerticalInfoPosition .values (),
87+ VerticalInfoPosition .BELOW );
4588 private final CheckboxSetting bossBarStyle =
4689 new CheckboxSetting ("Boss bar style" , false );
4790 private final CheckboxSetting showOffhand =
4891 new CheckboxSetting ("Show offhand" , true );
92+ private final CheckboxSetting showHotbarEnchantments = new CheckboxSetting (
93+ "Show hotbar enchantments" ,
94+ "Shows the selected item's enchantments under the item name while cycling the hotbar." ,
95+ false );
4996 private final CheckboxSetting avoidActionbarText = new CheckboxSetting (
50- "Avoid actionbar text" ,
51- "Moves the HUD up when Minecraft shows actionbar/overlay messages (e.g. sleeping )." ,
97+ "Avoid bottom text" ,
98+ "Moves the HUD up when Minecraft shows bottom-center text (actionbar, selected item name )." ,
5299 true );
53100 private final ColorSetting fontColor =
54101 new ColorSetting ("Font color" , new Color (0xFF , 0xFF , 0xFF , 0xFF ));
@@ -57,6 +104,8 @@ public String toString()
57104 "Override the font color with a green→yellow→red gradient." , false );
58105 private final SliderSetting iconSize = new SliderSetting ("Icon size" , 24.0 ,
59106 16.0 , 40.0 , 1.0 , ValueDisplay .INTEGER );
107+ private final SliderSetting iconSpacing = new SliderSetting ("Icon spacing" ,
108+ 6.0 , 0.0 , 20.0 , 0.5 , ValueDisplay .DECIMAL );
60109 private final SliderSetting fontScale = new SliderSetting ("Font scale" , 1.0 ,
61110 0.5 , 2.0 , 0.05 , ValueDisplay .DECIMAL );
62111
@@ -65,12 +114,16 @@ public DurabilityHudHack()
65114 super ("DurabilityHUD" );
66115 setCategory (Category .RENDER );
67116 addSetting (displayMode );
117+ addSetting (iconLayout );
118+ addSetting (verticalInfoPosition );
68119 addSetting (bossBarStyle );
69120 addSetting (showOffhand );
121+ addSetting (showHotbarEnchantments );
70122 addSetting (avoidActionbarText );
71123 addSetting (fontColor );
72124 addSetting (gradientFontColor );
73125 addSetting (iconSize );
126+ addSetting (iconSpacing );
74127 addSetting (fontScale );
75128 }
76129
@@ -84,11 +137,26 @@ public boolean isBossBarStyle()
84137 return bossBarStyle .isChecked ();
85138 }
86139
140+ public IconLayout getIconLayout ()
141+ {
142+ return iconLayout .getSelected ();
143+ }
144+
145+ public VerticalInfoPosition getVerticalInfoPosition ()
146+ {
147+ return verticalInfoPosition .getSelected ();
148+ }
149+
87150 public boolean isShowOffhand ()
88151 {
89152 return showOffhand .isChecked ();
90153 }
91154
155+ public boolean isShowHotbarEnchantments ()
156+ {
157+ return showHotbarEnchantments .isChecked ();
158+ }
159+
92160 public boolean avoidActionbarText ()
93161 {
94162 return avoidActionbarText .isChecked ();
@@ -109,6 +177,11 @@ public double getIconSize()
109177 return iconSize .getValue ();
110178 }
111179
180+ public double getIconSpacing ()
181+ {
182+ return iconSpacing .getValue ();
183+ }
184+
112185 public double getFontScale ()
113186 {
114187 return fontScale .getValue ();
0 commit comments