From c23ad38d5456d2ded3aa36ffee620038d197cc36 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Fri, 30 Apr 2021 19:53:35 +0200 Subject: [PATCH] Take doubles as arguments in fromRenderable --- common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt index 0007033..03bcebe 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/Element.kt @@ -23,8 +23,8 @@ abstract class Element( ((coordinateX >= this.x) && (coordinateX <= (this.x + this.width))) and ((coordinateY >= this.y) && (coordinateY <= (this.y + this.height))) companion object { private var caughtError: Boolean = false - fun fromRenderable(r: Renderable, x: Int, y: Int, width: Int, height: Int): Element { - return object: Element(x.toDouble(), y.toDouble(), width, height) { + fun fromRenderable(r: Renderable, x: Double, y: Double, width: Int, height: Int): Element { + return object: Element(x, y, width, height) { override fun render(poseStack: PoseStack?) = r.render(poseStack) } }