generated from MrSphay/codex-agent-repository-kit
This commit is contained in:
@@ -15,9 +15,9 @@ public class FirstTimeScreen extends Screen {
|
||||
private static final int BORDER = 0xFFFF7A70;
|
||||
private static final int BORDER_HOVER = 0xFFFF9B91;
|
||||
private static final Choice[] CHOICES = new Choice[] {
|
||||
new Choice("gui_screen_1.png", 7, 18, "REALISTIC", Config.Client.ParticleRenderMode.REALISTIC),
|
||||
new Choice("gui_screen_2.png", 7, 18, "VANILLA-LIKE", Config.Client.ParticleRenderMode.VANILA),
|
||||
new Choice("gui_screen_3.png", 20, 34, "REALISTIC 2", Config.Client.ParticleRenderMode.REALISTIC_2)
|
||||
new Choice("gui_screen_1.png", 10, 18, "REALISTIC", Config.Client.ParticleRenderMode.REALISTIC),
|
||||
new Choice("gui_screen_2.png", 8, 18, "VANILLA-LIKE", Config.Client.ParticleRenderMode.VANILA),
|
||||
new Choice("gui_screen_3.png", 28, 35, "REALISTIC 2", Config.Client.ParticleRenderMode.REALISTIC_2)
|
||||
};
|
||||
|
||||
private final Rect[] cardRects = new Rect[] { Rect.empty(), Rect.empty(), Rect.empty() };
|
||||
@@ -31,24 +31,24 @@ public class FirstTimeScreen extends Screen {
|
||||
graphics.fill(0, 0, this.width, this.height, 0xFF050506);
|
||||
this.drawAmbient(graphics);
|
||||
|
||||
int top = Math.max(24, this.height / 12);
|
||||
int top = Math.max(18, this.height / 14);
|
||||
graphics.drawCenteredString(this.font, Component.literal("Choose Your Explosion Style."), this.width / 2, top, 0xFFFF9900);
|
||||
graphics.drawCenteredString(this.font, Component.literal("You can change this anytime in the config"), this.width / 2, top + 25, 0xFFE5E5E5);
|
||||
graphics.drawCenteredString(this.font, Component.literal("The game may differ from the animations because compression has altered them."), this.width / 2, top + 48, 0xFF9C9C9C);
|
||||
|
||||
int availableCardH = Math.max(76, (this.height - top - 188) / 2);
|
||||
int cardW = Math.min(320, Math.max(150, (this.width - 190) / 2));
|
||||
int availableCardH = Math.max(54, (this.height - top - 150) / 2);
|
||||
int cardW = Math.min(300, Math.max(120, (this.width - 190) / 2));
|
||||
cardW = Math.min(cardW, availableCardH * FRAME_WIDTH / FRAME_HEIGHT);
|
||||
int cardH = cardW * FRAME_HEIGHT / FRAME_WIDTH;
|
||||
int gap = Math.max(34, this.width / 28);
|
||||
int firstX = this.width / 2 - cardW - gap / 2;
|
||||
int secondX = this.width / 2 + gap / 2;
|
||||
int firstRowY = top + 88;
|
||||
int secondRowY = firstRowY + cardH + 58;
|
||||
int firstRowY = top + 70;
|
||||
int secondRowY = firstRowY + cardH + 40;
|
||||
|
||||
this.cardRects[0] = new Rect(firstX, firstRowY, cardW, cardH + 58);
|
||||
this.cardRects[1] = new Rect(secondX, firstRowY, cardW, cardH + 58);
|
||||
this.cardRects[2] = new Rect((this.width - cardW) / 2, secondRowY, cardW, cardH + 58);
|
||||
this.cardRects[0] = new Rect(firstX, firstRowY, cardW, cardH + 34);
|
||||
this.cardRects[1] = new Rect(secondX, firstRowY, cardW, cardH + 34);
|
||||
this.cardRects[2] = new Rect((this.width - cardW) / 2, secondRowY, cardW, cardH + 34);
|
||||
|
||||
for (int i = 0; i < CHOICES.length; ++i) {
|
||||
this.drawChoice(graphics, CHOICES[i], this.cardRects[i], this.cardRects[i].contains(mouseX, mouseY));
|
||||
@@ -84,7 +84,7 @@ public class FirstTimeScreen extends Screen {
|
||||
int imageH = rect.w * FRAME_HEIGHT / FRAME_WIDTH;
|
||||
graphics.fill(imageX - 6, imageY - 6, imageX + imageW + 6, imageY + imageH + 6, hovered ? BORDER_HOVER : BORDER);
|
||||
this.drawSheetFrame(graphics, choice.texture, choice.currentFrame(65L), imageX, imageY, imageW, imageH);
|
||||
graphics.drawCenteredString(this.font, Component.literal(choice.label), imageX + imageW / 2, imageY + imageH + 28, 0xFFFFFFFF);
|
||||
graphics.drawCenteredString(this.font, Component.literal(choice.label), imageX + imageW / 2, imageY + imageH + 16, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
private void drawSheetFrame(GuiGraphics graphics, ResourceLocation texture, int frame, int x, int y, int width, int height) {
|
||||
|
||||
Reference in New Issue
Block a user