@@ -24,22 +24,15 @@ public ModMenuScreen() {
2424 }
2525
2626 @ Override
27- protected void init () {
27+ protected void init () {
2828 super .init ();
2929
3030 container = new SpruceContainerWidget (Position .of (0 , 0 ), this .width , this .height );
3131 container .setBackground ((graphics , widget , vOffset , mouseX , mouseY , delta ) -> {
3232 int x = widget .getX ();
3333 int y = widget .getY ();
3434 int width = widget .getWidth ();
35-
3635 graphics .fill (x , y , x + width , y + widget .getHeight (), 0x88000000 );
37-
38- int lineColor = 0xFF444444 ;
39- int horizontalInset = 20 ;
40-
41- int bottomLineY = y + 140 + 16 + 14 * 4 + 25 ;
42- graphics .fill (x + horizontalInset , bottomLineY , x + width - horizontalInset , bottomLineY + 1 , lineColor );
4336 });
4437
4538 SpruceLabelWidget label = new SpruceLabelWidget (
@@ -86,29 +79,29 @@ protected void init() {
8679 TooltipData .builder ().text ("Toggle hiding F3 face info" ).build ()
8780 )
8881 );
89-
82+
9083 optionList .addOptionEntry (
91- new SpruceCheckboxBooleanOption (
92- "key.streamermodeplusplus.toggle_hide_F3_targeted_block_info_option" ,
93- () -> StreamerModePlusPlusClient .mixinHideTargetedBlockDebugHudEnabled ,
94- newValue -> StreamerModePlusPlusClient .mixinHideTargetedBlockDebugHudEnabled = newValue ,
95- TooltipData .builder ().text ("Toggle hiding F3 Targeted Block info" ).build ()
96- ),
97- new SpruceCheckboxBooleanOption (
98- "key.streamermodeplusplus.toggle_hide_F3_targeted_fluid_info_option" ,
99- () -> StreamerModePlusPlusClient .mixinHideTargetedFluidDebugHudEnabled ,
100- newValue -> StreamerModePlusPlusClient .mixinHideTargetedFluidDebugHudEnabled = newValue ,
101- TooltipData .builder ().text ("Toggle hiding F3 Targeted Fluid info" ).build ()
102- )
103- );
84+ new SpruceCheckboxBooleanOption (
85+ "key.streamermodeplusplus.toggle_hide_F3_targeted_block_info_option" ,
86+ () -> StreamerModePlusPlusClient .mixinHideTargetedBlockDebugHudEnabled ,
87+ newValue -> StreamerModePlusPlusClient .mixinHideTargetedBlockDebugHudEnabled = newValue ,
88+ TooltipData .builder ().text ("Toggle hiding F3 Targeted Block info" ).build ()
89+ ),
90+ new SpruceCheckboxBooleanOption (
91+ "key.streamermodeplusplus.toggle_hide_F3_targeted_fluid_info_option" ,
92+ () -> StreamerModePlusPlusClient .mixinHideTargetedFluidDebugHudEnabled ,
93+ newValue -> StreamerModePlusPlusClient .mixinHideTargetedFluidDebugHudEnabled = newValue ,
94+ TooltipData .builder ().text ("Toggle hiding F3 Targeted Fluid info" ).build ()
95+ )
96+ );
10497
10598 container .addChild (optionList );
10699
107100 int groupStartX = this .width / 2 - 90 ;
108- int groupStartY = 140 ;
101+ int groupStartY = 130 ;
109102 int fieldWidth = 180 ;
110- int fieldHeight = 12 ;
111- int fieldSpacing = 14 ;
103+ int fieldHeight = 12 ;
104+ int fieldSpacing = 13 ;
112105
113106 SpruceLabelWidget hiddenFieldsLabel = new SpruceLabelWidget (
114107 Position .of (groupStartX , groupStartY ),
@@ -120,53 +113,63 @@ protected void init() {
120113 container .addChild (hiddenFieldsLabel );
121114
122115 var client = StreamerModePlusPlusClient .getInstance ();
116+ int fieldX = groupStartX + 10 ;
117+ int baseY = groupStartY + 15 ;
123118
124119 SpruceTextFieldWidget coordField = SpruceTextFieldWidget .builder (
125- Position .of (groupStartX + 10 , groupStartY + 16 ),
120+ Position .of (fieldX , baseY ),
126121 fieldWidth - 20 , fieldHeight
127- ).title (Text .of ("Coord Text" ))
128- .placeholder (Text .of ("Coord Text" ))
129- .build ();
122+ ).title (Text .of ("Coord Text" )).placeholder (Text .of ("Coord Text" )).build ();
130123 coordField .setText (client .getHiddenCoordsMessage ());
131124 addDrawableChild (coordField );
132125
133126 SpruceTextFieldWidget blockField = SpruceTextFieldWidget .builder (
134- Position .of (groupStartX + 10 , groupStartY + 16 + fieldSpacing ),
127+ Position .of (fieldX , baseY + fieldSpacing * 1 ),
135128 fieldWidth - 20 , fieldHeight
136- ).title (Text .of ("Block Info Text" ))
137- .placeholder (Text .of ("Block Info Text" ))
138- .build ();
129+ ).title (Text .of ("Block Info Text" )).placeholder (Text .of ("Block Info Text" )).build ();
139130 blockField .setText (client .getHiddenBlockMessage ());
140131 addDrawableChild (blockField );
141132
142133 SpruceTextFieldWidget chunkField = SpruceTextFieldWidget .builder (
143- Position .of (groupStartX + 10 , groupStartY + 16 + fieldSpacing * 2 ),
134+ Position .of (fieldX , baseY + fieldSpacing * 2 ),
144135 fieldWidth - 20 , fieldHeight
145- ).title (Text .of ("Chunk Info Text" ))
146- .placeholder (Text .of ("Chunk Info Text" ))
147- .build ();
136+ ).title (Text .of ("Chunk Info Text" )).placeholder (Text .of ("Chunk Info Text" )).build ();
148137 chunkField .setText (client .getHiddenChunkMessage ());
149138 addDrawableChild (chunkField );
150139
151140 SpruceTextFieldWidget faceField = SpruceTextFieldWidget .builder (
152- Position .of (groupStartX + 10 , groupStartY + 16 + fieldSpacing * 3 ),
141+ Position .of (fieldX , baseY + fieldSpacing * 3 ),
153142 fieldWidth - 20 , fieldHeight
154- ).title (Text .of ("Facing Info Text" ))
155- .placeholder (Text .of ("Facing Info Text" ))
156- .build ();
143+ ).title (Text .of ("Facing Info Text" )).placeholder (Text .of ("Facing Info Text" )).build ();
157144 faceField .setText (client .getHiddenFaceMessage ());
158145 addDrawableChild (faceField );
159146
147+ SpruceTextFieldWidget targetedBlockField = SpruceTextFieldWidget .builder (
148+ Position .of (fieldX , baseY + fieldSpacing * 4 ),
149+ fieldWidth - 20 , fieldHeight
150+ ).title (Text .of ("Targeted Block Info Text" )).placeholder (Text .of ("Targeted Block Info Text" )).build ();
151+ targetedBlockField .setText (client .getHiddenTargetedBlockMessage ());
152+ addDrawableChild (targetedBlockField );
153+
154+ SpruceTextFieldWidget targetedFluidField = SpruceTextFieldWidget .builder (
155+ Position .of (fieldX , baseY + fieldSpacing * 5 ),
156+ fieldWidth - 20 , fieldHeight
157+ ).title (Text .of ("Targeted Fluid Info Text" )).placeholder (Text .of ("Targeted Fluid Info Text" )).build ();
158+ targetedFluidField .setText (client .getHiddenTargetedFluidMessage ());
159+ addDrawableChild (targetedFluidField );
160+
160161 this .addDrawableChild (new SpruceButtonWidget (
161- Position .of (groupStartX , groupStartY + 16 + fieldSpacing * 4 + 5 ),
162+ Position .of (groupStartX , baseY + fieldSpacing * 6 + 3 ),
162163 fieldWidth ,
163- 16 ,
164+ 16 ,
164165 Text .of ("Submit" ),
165166 btn -> {
166167 client .setHiddenCoordsMessage (coordField .getText ());
167168 client .setHiddenBlockMessage (blockField .getText ());
168169 client .setHiddenChunkMessage (chunkField .getText ());
169170 client .setHiddenFaceMessage (faceField .getText ());
171+ client .setHiddenTargetedBlockMessage (targetedBlockField .getText ());
172+ client .setHiddenTargetedFluidMessage (targetedFluidField .getText ());
170173 }
171174 ));
172175
0 commit comments