2
2
3
3
import net .minecraft .client .gui .DrawContext ;
4
4
import net .minecraft .client .gui .screen .Screen ;
5
- import net .minecraft .client .gui .widget .ButtonWidget ;
6
- import net .minecraft .client .util .math .MatrixStack ;
7
5
import net .minecraft .screen .ScreenTexts ;
8
6
import net .minecraft .text .Text ;
9
7
import se .icus .mag .modsettings .Main ;
@@ -34,10 +32,11 @@ protected void init() {
34
32
initIsProcessing = true ;
35
33
36
34
// Put list between 32 pixels from top and bottom
37
- this .list = new ModListWidget (this .client , this .width , this .height , 32 , this . height - 32 , 25 );
35
+ this .list = new ModListWidget (this .client , this .width , this .height - 64 , 32 , 25 );
38
36
this .list .addAll (getAllModConfigOptions ());
39
37
40
38
this .addSelectableChild (this .list );
39
+ this .addDrawableChild (this .list );
41
40
this .addDrawableChild (new Button (this .width / 2 - FULL_BUTTON_WIDTH / 2 , this .height - 27 ,
42
41
FULL_BUTTON_WIDTH , BUTTON_HEIGHT , ScreenTexts .DONE ,
43
42
button -> this .client .setScreen (this .previous )));
@@ -62,7 +61,6 @@ private ModSettingsOption[] getAllModConfigOptions() {
62
61
@ Override
63
62
public void render (DrawContext context , int mouseX , int mouseY , float delta ) {
64
63
super .render (context , mouseX , mouseY , delta );
65
- this .list .render (context , mouseX , mouseY , delta );
66
64
context .drawCenteredTextWithShadow (this .textRenderer , this .title , this .width / 2 , 5 , TITLE_COLOR );
67
65
}
68
66
0 commit comments