11package btw .lowercase .optiboxes .screen ;
22
3+ import btw .lowercase .optiboxes .screen .widget .SimpleButton ;
34import btw .lowercase .optiboxes .screen .widget .Text ;
45import btw .lowercase .optiboxes .skybox .OptiFineSkyLayer ;
5- import net .minecraft .client .gui .components .Button ;
66import net .minecraft .client .gui .screens .Screen ;
77import net .minecraft .network .chat .CommonComponents ;
88import net .minecraft .network .chat .Component ;
@@ -19,33 +19,36 @@ public SkyLayerInfoScreen(Screen parent, OptiFineSkyLayer skyLayer, int index) {
1919 protected void init () {
2020 super .init ();
2121
22- this .gidgets .add (new Text .Builder (this .font , this . title , this .width / 2 , 12 ).centered ().build ());
22+ this .gidgets .add (new Text .Builder (this .title , this .width / 2 , 12 ).centered ().build (this . font ));
2323
2424 int y = 12 + (this .font .lineHeight * 3 );
25- this .gidgets .add (new Text .Builder (this . font , " Rotate: " + this .skyLayer .rotate (), this .width / 2 , y ).centered ().build ());
25+ this .gidgets .add (new Text .Builder (" Rotate: " + this .skyLayer .rotate (), this .width / 2 , y ).centered ().build (this . font ));
2626 y += this .font .lineHeight + 2 ;
27- this .gidgets .add (new Text .Builder (this . font , " Axis: " + this .skyLayer .axis (), this .width / 2 , y ).centered ().build ());
27+ this .gidgets .add (new Text .Builder (" Axis: " + this .skyLayer .axis (), this .width / 2 , y ).centered ().build (this . font ));
2828 y += this .font .lineHeight + 2 ;
29- this .gidgets .add (new Text .Builder (this . font , " Blend: " + this .skyLayer .blend (), this .width / 2 , y ).centered ().build ());
29+ this .gidgets .add (new Text .Builder (" Blend: " + this .skyLayer .blend (), this .width / 2 , y ).centered ().build (this . font ));
3030 y += this .font .lineHeight + 2 ;
31- this .gidgets .add (new Text .Builder (this . font , " Speed: " + this .skyLayer .speed (), this .width / 2 , y ).centered ().build ());
31+ this .gidgets .add (new Text .Builder (" Speed: " + this .skyLayer .speed (), this .width / 2 , y ).centered ().build (this . font ));
3232 y += this .font .lineHeight + 2 ;
33- this .gidgets .add (new Text .Builder (this . font , " Transition: " + this .skyLayer .transition (), this .width / 2 , y ).centered ().build ());
33+ this .gidgets .add (new Text .Builder (" Transition: " + this .skyLayer .transition (), this .width / 2 , y ).centered ().build (this . font ));
3434 y += this .font .lineHeight + 2 ;
35- this .gidgets .add (new Text .Builder (this . font , " Fade: " + this .skyLayer .fade (), this .width / 2 , y ).centered ().build ());
35+ this .gidgets .add (new Text .Builder (" Fade: " + this .skyLayer .fade (), this .width / 2 , y ).centered ().build (this . font ));
3636 y += this .font .lineHeight + 2 ;
37- this .gidgets .add (new Text .Builder (this . font , " Loop: " + this .skyLayer .loop (), this .width / 2 , y ).centered ().build ());
37+ this .gidgets .add (new Text .Builder (" Loop: " + this .skyLayer .loop (), this .width / 2 , y ).centered ().build (this . font ));
3838 y += this .font .lineHeight + 2 ;
39- this .gidgets .add (new Text .Builder (this . font , " Include Biome: " + this .skyLayer .biomeInclusion (), this .width / 2 , y ).centered ().build ());
39+ this .gidgets .add (new Text .Builder (" Include Biome: " + this .skyLayer .biomeInclusion (), this .width / 2 , y ).centered ().build (this . font ));
4040 y += this .font .lineHeight + 2 ;
41- this .gidgets .add (new Text .Builder (this . font , " Biomes: " + this .skyLayer .biomes (), this .width / 2 , y ).centered ().build ());
41+ this .gidgets .add (new Text .Builder (" Biomes: " + this .skyLayer .biomes (), this .width / 2 , y ).centered ().build (this . font ));
4242 y += this .font .lineHeight + 2 ;
43- this .gidgets .add (new Text .Builder (this . font , " Heights: " + this .skyLayer .heights (), this .width / 2 , y ).centered ().build ());
43+ this .gidgets .add (new Text .Builder (" Heights: " + this .skyLayer .heights (), this .width / 2 , y ).centered ().build (this . font ));
4444 y += this .font .lineHeight + 2 ;
45- this .gidgets .add (new Text .Builder (this . font , " Weather Conditions: " + this .skyLayer .weatherConditions (), this .width / 2 , y ).centered ().build ());
45+ this .gidgets .add (new Text .Builder (" Weather Conditions: " + this .skyLayer .weatherConditions (), this .width / 2 , y ).centered ().build (this . font ));
4646
47- this .addRenderableWidget (Button .builder (CommonComponents .GUI_BACK , (button ) -> this .onClose ())
48- .pos ((this .width / 2 ) - (Button .DEFAULT_WIDTH / 2 ), this .height - Button .DEFAULT_HEIGHT - 4 )
49- .build ());
47+ this .gidgets .add (new SimpleButton (
48+ CommonComponents .GUI_BACK ,
49+ (this .width / 2 ) - (SimpleButton .DEFAULT_WIDTH / 2 ),
50+ this .height - SimpleButton .DEFAULT_HEIGHT - 4 ,
51+ (button ) -> this .onClose ()
52+ ));
5053 }
5154}
0 commit comments