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,