Skip to content

Commit

Permalink
[1.21] Sidebar Fixes (#112)
Browse files Browse the repository at this point in the history
* Don't render overlay in edit mode and making config button last

* Fixed formatting and make config last for sure
  • Loading branch information
UnRealDinnerbone authored Aug 13, 2024
1 parent b3d5b47 commit ce0be71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,19 @@ private void renderSidebarButtons(GuiGraphics graphics, int mx, int my) {
} else {
Icons.CANCEL.draw(graphics, button.x + 12, button.y, 4, 4);
}
} else {
graphics.pose().pushPose();
graphics.pose().translate(button.x, button.y, 0);
for (ButtonOverlayRender buttonOverlayRender : button.getSidebarButton().getExtraRenderers()) {
buttonOverlayRender.render(graphics, font, 16);
}
graphics.pose().popPose();
}

if (button == mouseOver) {
Color4I.WHITE.withAlpha(33).draw(graphics, button.x, button.y, 16, 16);
}

graphics.pose().pushPose();
graphics.pose().translate(button.x, button.y, 0);
for (ButtonOverlayRender buttonOverlayRender : button.getSidebarButton().getExtraRenderers()) {
buttonOverlayRender.render(graphics, font, 16);
}
graphics.pose().popPose();

}
if (!isEditMode && mouseOver == button) {
graphics.renderTooltip(font, button.getSidebarButton().getTooltip(Screen.hasShiftDown()), Optional.empty(), mx, Math.max(7, my - 9) + 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"icon": [
"ftblibrary:icons/settings"
],
"sort_index": 500,
"sort_index": 2147483647,
"click": ["command:/ftblibrary clientconfig"],
"required_mods": [
"ftblibrary"
Expand Down

0 comments on commit ce0be71

Please sign in to comment.