Skip to content

Commit

Permalink
[1.21] fix button locations (1.21+ only)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam committed Jul 19, 2024
1 parent aa67ac6 commit 852f35b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public void render(@NotNull GuiGraphics context, int mouseX, int mouseY, float d
protected void init() {
super.init();
this.addWidget(this.contentsList = new ContentsList(this, this.minecraft));
this.addRenderableWidget(doneButton = Compat.createButton(CommonComponents.GUI_DONE, this::onClose, 150, 20, this.width / 2 - 155 + 160, this.height - 29));
this.addRenderableWidget(resetButton = Compat.createButton(Component.translatable("controls.reset"), this::reset, 150, 20, this.width / 2 - 155, this.height - 29));
this.addRenderableWidget(doneButton = Compat.createButton(CommonComponents.GUI_DONE, this::onClose, 150, 20, this.width / 2 + 4, this.height - 26));
this.addRenderableWidget(resetButton = Compat.createButton(Component.translatable("controls.reset"), this::reset, 150, 20, this.width / 2 + 4-160+2, this.height - 26));
updateDoneButton();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ protected void init() {

hideSyncSpecButtons();

addRenderableWidget(Compat.createButton(CommonComponents.GUI_DONE, this::onClose, 150, 20, this.width / 2 + 4, this.height - 48));
addRenderableWidget(Compat.createButton(CommonComponents.GUI_DONE, this::onClose, 150, 20, this.width / 2 + 4, this.height - 20 - 6));
addRenderableWidget(contentsButton = Compat.createButton(Component.translatable("dynamicpack.screen.pack.dynamic.contents"), () -> {
Minecraft.getInstance().setScreen(new ContentsScreen(this, pack));
}, 150, 20, this.width / 2 + 4-160, this.height - 48));
}, 150, 20, this.width / 2 + 4-160+2, this.height - 20 - 6));
contentsButton.visible = pack.getRemote() instanceof DynamicRepoRemote;
}

Expand Down

0 comments on commit 852f35b

Please sign in to comment.