diff options
author | Walker Selby <git@walkerselby.com> | 2023-11-22 12:20:15 +0000 |
---|---|---|
committer | Walker Selby <git@walkerselby.com> | 2023-11-22 12:20:15 +0000 |
commit | 514d3f0ec1eb3a7900206ac0b0469d922828b506 (patch) | |
tree | 0a0dba7248bcb6acfa0f5fbb7526cc4ee0ea9bba /src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt | |
parent | bf225d26b399fcc3fd258d7acbdedb1e76154b8e (diff) | |
parent | a6de55740355b3bc4d7c869626d22da5b3854416 (diff) | |
download | skyhanni-514d3f0ec1eb3a7900206ac0b0469d922828b506.tar.gz skyhanni-514d3f0ec1eb3a7900206ac0b0469d922828b506.tar.bz2 skyhanni-514d3f0ec1eb3a7900206ac0b0469d922828b506.zip |
Merge branch 'beta' into https
# Conflicts:
# src/main/java/SkyHanniInstallerFrame.java
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt index 1269ec005..5e4a63452 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/GuiRenderUtils.kt @@ -164,9 +164,8 @@ object GuiRenderUtils { drawTooltip(textLines, mouseX, mouseY, screenHeight, Minecraft.getMinecraft().fontRendererObj) } - fun isPointInRect(x: Int, y: Int, left: Int, top: Int, width: Int, height: Int): Boolean { - return left <= x && x < left + width && top <= y && y < top + height - } + fun isPointInRect(x: Int, y: Int, left: Int, top: Int, width: Int, height: Int) = + left <= x && x < left + width && top <= y && y < top + height fun drawProgressBar(x: Int, y: Int, barWidth: Int, progress: Float) { GuiScreen.drawRect(x, y, x + barWidth, y + 6, 0xFF43464B.toInt()) @@ -181,7 +180,15 @@ object GuiRenderUtils { ) } - fun renderItemAndTip(list: MutableList<String>, item: ItemStack?, x: Int, y: Int, mouseX: Int, mouseY: Int, color: Int = 0xFF43464B.toInt()) { + fun renderItemAndTip( + list: MutableList<String>, + item: ItemStack?, + x: Int, + y: Int, + mouseX: Int, + mouseY: Int, + color: Int = 0xFF43464B.toInt() + ) { GuiScreen.drawRect(x, y, x + 16, y + 16, color) if (item != null) { renderItemStack(item, x, y) @@ -277,12 +284,14 @@ object GuiRenderUtils { } fun drawScaledRec(left: Int, top: Int, right: Int, bottom: Int, colour: Int, inverseScale: Float) { - GuiScreen.drawRect((left * inverseScale).toInt(), (top * inverseScale).toInt(), - (right * inverseScale).toInt(), (bottom * inverseScale).toInt(), colour) + GuiScreen.drawRect( + (left * inverseScale).toInt(), (top * inverseScale).toInt(), + (right * inverseScale).toInt(), (bottom * inverseScale).toInt(), colour + ) } fun renderItemAndBackground(item: ItemStack, x: Int, y: Int, colour: Int) { renderItemStack(item, x, y) GuiScreen.drawRect(x, y, x + 16, y + 16, colour) } -}
\ No newline at end of file +} |