Skip to content

Commit

Permalink
feat: make inactive category buttons slightly darker to highlight the…
Browse files Browse the repository at this point in the history
… active one better
  • Loading branch information
klikli-dev committed Jun 27, 2024
1 parent 354781d commit e9df55f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ public void renderWidget(GuiGraphics guiGraphics, int pMouseX, int pMouseY, floa
if (BookGuiManager.get().openBookCategoryScreen != null && this.category == BookGuiManager.get().openBookCategoryScreen.getCategory()) {
renderX -= 3;
renderWidth += 3;
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
} else if (this.isHovered()) {
renderX -= 1;
renderWidth += 1;
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
} else {
RenderSystem.setShaderColor(0.8f, 0.8f, 0.8f, 1.0F);
}

//draw category button background
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
// RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
guiGraphics.blit(this.parent.getBookOverviewTexture(), renderX, this.getY(), texX, texY, renderWidth, this.height, 256, 256);

//then draw icon
Expand Down

0 comments on commit e9df55f

Please sign in to comment.