Fix trim int Outfits Gui

This commit is contained in:
kirillsaint 2023-07-27 17:26:37 +06:00
parent 146eb502ca
commit 89d0d94416

View File

@ -44,9 +44,10 @@ public class OutfitsGui extends SilentScreen {
} else {
MenuBlurUtils.loadBlur();
}
int width = 250;
int x = this.width / 2 - 125;
int y = this.height / 2 - 100;
int width = 255;
int height = 200;
int x = this.width / 2 - (width / 2);
int y = this.height / 2 - (height / 2);
this.buttonList.add(new IconButton(0, x + width - 14 - 3, y + 3, 14, 14, 8, 8, new ResourceLocation("silentclient/icons/exit.png")));
}
@ -60,10 +61,10 @@ public class OutfitsGui extends SilentScreen {
} else {
MenuBlurUtils.renderBackground(this);
}
int width = 250;
int width = 255;
int height = 200;
int x = this.width / 2 - 125;
int y = this.height / 2 - 100;
int x = this.width / 2 - (width / 2);
int y = this.height / 2 - (height / 2);
RenderUtil.drawRoundedRect(x, y, width, height, 4, Theme.backgroundColor().getRGB());
Client.getInstance().getSilentFontRenderer().drawString(x + 3, y + 3, "Outfits", 14, SilentFontRenderer.FontType.TITLE);
super.drawScreen(mouseX, mouseY, partialTicks);
@ -72,7 +73,7 @@ public class OutfitsGui extends SilentScreen {
ScaledResolution r = new ScaledResolution(Minecraft.getMinecraft());
int s = r.getScaleFactor();
int listHeight = height - 20;
int translatedY = r.getScaledHeight() - 20 - 20 - listHeight;
int translatedY = r.getScaledHeight() - y - 20 - listHeight;
GL11.glScissor(0 * s, translatedY * s, this.width * s, listHeight * s);
int outfitX = x + 3;
float outfitY = (int) (y + 20 - scrollAnimation.getValue());
@ -205,10 +206,10 @@ public class OutfitsGui extends SilentScreen {
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
super.mouseClicked(mouseX, mouseY, mouseButton);
int width = 250;
int width = 255;
int height = 200;
int x = this.width / 2 - 125;
int y = this.height / 2 - 100;
int x = this.width / 2 - (width / 2);
int y = this.height / 2 - (height / 2);
int outfitX = x + 3;
float outfitY = (int) (y + 20 - scrollAnimation.getValue());
int outfitIndex = 0;