diff --git a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java index 0a0a0ee8a..3416c3df4 100644 --- a/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java +++ b/common/src/main/java/com/seibel/lod/common/wrappers/config/ConfigGui.java @@ -413,12 +413,12 @@ public abstract class ConfigGui if (!reload) loadFromFile(); - this.addWidget(new Button(this.width / 2 - 154, this.height - 28, 150, 20, CommonComponents.GUI_CANCEL, button -> { + this.addButton(new Button(this.width / 2 - 154, this.height - 28, 150, 20, CommonComponents.GUI_CANCEL, button -> { loadFromFile(); Objects.requireNonNull(minecraft).setScreen(parent); })); - Button done = this.addWidget(new Button(this.width / 2 + 4, this.height - 28, 150, 20, CommonComponents.GUI_DONE, (button) -> { + Button done = this.addButton(new Button(this.width / 2 + 4, this.height - 28, 150, 20, CommonComponents.GUI_DONE, (button) -> { saveToFile(); Objects.requireNonNull(minecraft).setScreen(parent); })); diff --git a/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinOptionsScreen.java b/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinOptionsScreen.java index ffb9e0848..1919facc0 100644 --- a/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinOptionsScreen.java +++ b/fabric/src/main/java/com/seibel/lod/fabric/mixins/MixinOptionsScreen.java @@ -33,7 +33,7 @@ public class MixinOptionsScreen extends Screen { @Inject(at = @At("HEAD"),method = "init") private void lodconfig$init(CallbackInfo ci) { if (Config.ShowButton) - this.addWidget(new TexturedButtonWidget( + this.addButton(new TexturedButtonWidget( // Where the button is on the screen this.width / 2 - 180, this.height / 6 - 12, // Width and height of the button diff --git a/forge/src/main/java/com/seibel/lod/forge/mixins/MixinOptionsScreen.java b/forge/src/main/java/com/seibel/lod/forge/mixins/MixinOptionsScreen.java index ca1a68ab8..74e04e41a 100644 --- a/forge/src/main/java/com/seibel/lod/forge/mixins/MixinOptionsScreen.java +++ b/forge/src/main/java/com/seibel/lod/forge/mixins/MixinOptionsScreen.java @@ -32,7 +32,7 @@ public class MixinOptionsScreen extends Screen { @Inject(at = @At("HEAD"),method = "init") private void lodconfig$init(CallbackInfo ci) { if (Config.ShowButton) - this.addWidget(new TexturedButtonWidget( + this.addButton(new TexturedButtonWidget( // Where the button is on the screen this.width / 2 - 180, this.height / 6 - 12, // Width and height of the button