From df8663e5958fe43d0c68fde3f4d31e45b2f15da1 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 24 Dec 2022 03:48:50 +1100 Subject: Gui element scale (#485) --- .../moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java index 61ebf7b5..13179179 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -661,7 +661,7 @@ public class PetInfoOverlay extends TextOverlay { JsonObject petItem = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get("ROCK;0"); if (petItem != null) { - Vector2f position = getPosition(overlayWidth, overlayHeight); + Vector2f position = getPosition(overlayWidth, overlayHeight, false); int x = (int) position.x; int y = (int) position.y; @@ -700,16 +700,18 @@ public class PetInfoOverlay extends TextOverlay { } if (petItem != null) { - Vector2f position = getPosition(overlayWidth, overlayHeight); + Vector2f position = getPosition(overlayWidth, overlayHeight, true); int x = (int) position.x; int y = (int) position.y; ItemStack stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(petItem); GlStateManager.enableDepth(); GlStateManager.pushMatrix(); + Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.locationedit.guiScale); GlStateManager.translate(x - 2, y - 2, 0); GlStateManager.scale(2, 2, 1); Utils.drawItemStack(stack, 0, 0); + Utils.pushGuiScale(0); GlStateManager.popMatrix(); } @@ -718,7 +720,7 @@ public class PetInfoOverlay extends TextOverlay { JsonObject petItem2 = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get( currentPet2.skin != null ? currentPet2.skin : (currentPet2.petType + ";" + currentPet2.rarity.petId)); if (petItem2 != null) { - Vector2f position = getPosition(overlayWidth, overlayHeight); + Vector2f position = getPosition(overlayWidth, overlayHeight, false); int x = (int) position.x; int y = (int) position.y + NotEnoughUpdates.INSTANCE.config.petOverlay.petOverlayText.size() * 10 + 10; -- cgit