Add a parameter to the colorEnd method in Element.kt and make Configuration.obtained a jvm field

This commit is contained in:
Username404-59 2021-04-22 11:51:51 +02:00
parent 517a653d67
commit de833629ec
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
3 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,7 @@ object Configuration {
| displayInitMessage = true
|}
""".trimMargin()
@JvmField
val obtained: Config = run {
var result: Config? = null
with(file) {

View File

@ -31,8 +31,8 @@ class ClickBox(x: Double, y: Double, private val name: TranslatableComponent? =
tessellator.end()
begin(GL20.GL_LINES, DefaultVertexFormat.POSITION_COLOR)
vertex(x + inclination, y + height, 0.0).colorIt(0xF2F2FC).endVertex()
vertex(x + width, y + height, 0.0).colorIt(0xF2F2FC).endVertex()
vertex(x + inclination, y + height, 0.0).colorEnd(0xF2F2FC)
vertex(x + width, y + height, 0.0).colorEnd(0xF2F2FC)
tessellator.end()
}
RenderSystem.enableTexture()

View File

@ -37,7 +37,7 @@ abstract class ColoredElement(x: Double, y: Double, width: Int, height: Int, val
}
}
}
protected fun VertexConsumer.colorEnd() = colorIt(color, opacity).endVertex()
protected fun VertexConsumer.colorEnd(color: Int = this@ColoredElement.color) = colorIt(color, opacity).endVertex()
}
fun hextoRGB(hex: Int): MutableList<Float> {