Element.kt: Keep the original x and y coordinates in memory

This commit is contained in:
Username404-59 2021-04-30 14:51:22 +02:00
parent aa4d7e3743
commit 7ddbf934f7
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 1 deletions

View File

@ -8,9 +8,10 @@ import fr.username404.snowygui.Snowy
fun interface Renderable { fun render(poseStack: PoseStack?) }
abstract class Element(
var x: Double, var y: Double,
@JvmField val xOrigin: Double, @JvmField val yOrigin: Double,
val width: Int, val height: Int
): Renderable {
var x = xOrigin; var y = yOrigin
companion object Rendering {
private var caughtError: Boolean = false
@JvmStatic protected val tessellator: Tesselator = Tesselator.getInstance()