Skip to content

Commit

Permalink
Main menu news + addon list fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cvs0 committed Dec 14, 2024
1 parent 602d5d9 commit e31b858
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/main/java/net/aoba/gui/screens/MainMenuScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void render(DrawContext drawContext, int mouseX, int mouseY, float delta)
if (AobaClient.addons.isEmpty()) {
String noAddonsText = "No addons loaded";
int textWidth = this.textRenderer.getWidth(noAddonsText);
drawContext.drawTextWithShadow(this.textRenderer, noAddonsText, this.width - textWidth - 2, 10, 0xFFFFFF);
drawContext.drawTextWithShadow(this.textRenderer, noAddonsText, this.width - textWidth - 15, 10, 0xFFFFFF);
} else {
int yOffset = 10;
for (IAddon addon : AobaClient.addons) {
Expand All @@ -201,21 +201,26 @@ public void render(DrawContext drawContext, int mouseX, int mouseY, float delta)
drawContext.drawTextWithShadow(this.textRenderer, addonName,
this.width - addonNameWidth - byTextWidth - authorWidth - 2, yOffset, 0x50C878);

drawContext.drawTextWithShadow(this.textRenderer, byText, this.width - byTextWidth - authorWidth - 2,
drawContext.drawTextWithShadow(this.textRenderer, byText, this.width - byTextWidth - authorWidth - 15,
yOffset, 0xFFFFFF);

drawContext.drawTextWithShadow(this.textRenderer, author, this.width - authorWidth - 2, yOffset,
drawContext.drawTextWithShadow(this.textRenderer, author, this.width - authorWidth - 15, yOffset,
0xFF0000);

yOffset += 10;
}
}

// News Peek!
Render2D.drawOutlinedRoundedBox(drawContext.getMatrices().peek().getPositionMatrix(), width - 110, 30, 100, 30,
GuiManager.roundingRadius.getValue(), GuiManager.borderColor.getValue(),
GuiManager.backgroundColor.getValue());
drawContext.drawTextWithShadow(this.textRenderer, "News coming soon!", width - 105, 40, Colors.WHITE);
int newsTextHeight = this.textRenderer.fontHeight;
int newsBoxHeight = newsTextHeight + 20;
int newsTextWidth = this.textRenderer.getWidth("Aoba 1.4.4 released!") + 10;
Render2D.drawOutlinedRoundedBox(drawContext.getMatrices().peek().getPositionMatrix(), width - newsTextWidth - 15, 30, newsTextWidth, newsBoxHeight,
GuiManager.roundingRadius.getValue(),
GuiManager.borderColor.getValue(),
GuiManager.backgroundColor.getValue()
);
drawContext.drawTextWithShadow(this.textRenderer, "Aoba 1.4.4 released!", width - newsTextWidth - 9, 40, Colors.WHITE);


RenderSystem.enableCull();
}
Expand Down

0 comments on commit e31b858

Please sign in to comment.