diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-19 19:46:53 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-19 19:46:53 +0100 |
commit | a24f581d2db52a0a7d396b512426f4b41c7abc60 (patch) | |
tree | 343e8e6d6061187292008d3c6e276c5c50a0837d /src | |
parent | 7e6a4047e4cd7ac168289e6aa2dc1237ec07bcec (diff) | |
download | skyhanni-a24f581d2db52a0a7d396b512426f4b41c7abc60.tar.gz skyhanni-a24f581d2db52a0a7d396b512426f4b41c7abc60.tar.bz2 skyhanni-a24f581d2db52a0a7d396b512426f4b41c7abc60.zip |
Fixed icons in gui elements gets moved to the right
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | 9 |
1 files changed, 5 insertions, 4 deletions
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") } } } |