From a24f581d2db52a0a7d396b512426f4b41c7abc60 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 19 Mar 2023 19:46:53 +0100 Subject: Fixed icons in gui elements gets moved to the right --- src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt index 7098150ea..480be51d8 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt @@ -514,13 +514,14 @@ object RenderUtils { renderString(any, offsetX, offsetY, center = false) val width = renderer.getStringWidth(any.removeColor()) offsetX += width - } - if (any is ItemStack) { - val isX = getAbsX(resolution, 0) + offsetX - val isY = getAbsY(resolution, 0) + offsetY + } else if (any is ItemStack) { + val isX = getAbsX(resolution, 200) + offsetX + val isY = getAbsY(resolution, 16) + offsetY any.renderOnScreen(isX.toFloat(), isY.toFloat(), itemScale) offsetX += 12 + } else { + println("unknown render object: $any") } } } -- cgit