Add a parameter to the colorEnd method in Element.kt and make Configuration.obtained a jvm field
This commit is contained in:
parent
517a653d67
commit
de833629ec
|
@ -14,6 +14,7 @@ object Configuration {
|
||||||
| displayInitMessage = true
|
| displayInitMessage = true
|
||||||
|}
|
|}
|
||||||
""".trimMargin()
|
""".trimMargin()
|
||||||
|
@JvmField
|
||||||
val obtained: Config = run {
|
val obtained: Config = run {
|
||||||
var result: Config? = null
|
var result: Config? = null
|
||||||
with(file) {
|
with(file) {
|
||||||
|
|
|
@ -31,8 +31,8 @@ class ClickBox(x: Double, y: Double, private val name: TranslatableComponent? =
|
||||||
tessellator.end()
|
tessellator.end()
|
||||||
|
|
||||||
begin(GL20.GL_LINES, DefaultVertexFormat.POSITION_COLOR)
|
begin(GL20.GL_LINES, DefaultVertexFormat.POSITION_COLOR)
|
||||||
vertex(x + inclination, y + height, 0.0).colorIt(0xF2F2FC).endVertex()
|
vertex(x + inclination, y + height, 0.0).colorEnd(0xF2F2FC)
|
||||||
vertex(x + width, y + height, 0.0).colorIt(0xF2F2FC).endVertex()
|
vertex(x + width, y + height, 0.0).colorEnd(0xF2F2FC)
|
||||||
tessellator.end()
|
tessellator.end()
|
||||||
}
|
}
|
||||||
RenderSystem.enableTexture()
|
RenderSystem.enableTexture()
|
||||||
|
|
|
@ -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> {
|
fun hextoRGB(hex: Int): MutableList<Float> {
|
||||||
|
|
Loading…
Reference in New Issue