Fix FontUtil.kt

This commit is contained in:
Username404 2021-05-15 02:21:06 +02:00
parent 81f4923185
commit ce9f1c83dd
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import fr.username404.snowygui.gui.feature.Colors
object FontUtil {
fun drawScaled(stack: PoseStack, text: String, x: Double, y: Double, scaleFactor: Float, color: Colors = Colors.BLACK) {
stack.scale(scaleFactor, scaleFactor, scaleFactor)
Minecraft.getInstance().font.draw(stack, text, (x / scaleFactor).toFloat(), (y / scaleFactor).toFloat(), color)
Minecraft.getInstance().font.draw(stack, text, (x / scaleFactor).toFloat(), (y / scaleFactor).toFloat(), color.hexValue)
val factorToOriginal = 1F / scaleFactor
stack.scale(factorToOriginal, factorToOriginal, factorToOriginal)
}