From a20a2d2d8c3ae9071313c0334b631e1bddfc4868 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Fri, 6 Feb 2026 00:09:44 +0100 Subject: [PATCH] Fix box width Signed-off-by: Username404-59 --- .../kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt index 8692def..5dfa379 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickBox.kt @@ -15,6 +15,7 @@ import net.minecraft.util.ARGB import org.jetbrains.annotations.ApiStatus import java.util.TreeSet import kotlin.collections.LinkedHashSet +import kotlin.math.roundToInt @ApiStatus.Internal class ClickBox( @@ -90,7 +91,7 @@ class ClickBox( x = x, y = (y + height), height = clickboxHeightOffset, - width = width, + width = width + inclination.roundToInt(), color = color, opacity = opacity ) @@ -98,7 +99,7 @@ class ClickBox( // Separator line RenderingUtil.hLine( guiGraphics = guiGraphics, - x1 = (x + 0).toInt(), + x1 = (x + inclination).toInt(), x2 = (x + width).toInt(), y = (y + height).toInt(), rgb = Colors.WHITE_LINES.hexValue,