Remove a useless init block in ClickBox.kt
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
76b28db14b
commit
4df3066134
|
@ -24,8 +24,8 @@ import kotlin.collections.LinkedHashSet
|
||||||
@ApiStatus.Internal
|
@ApiStatus.Internal
|
||||||
class ClickBox(
|
class ClickBox(
|
||||||
x: Double, y: Double,
|
x: Double, y: Double,
|
||||||
override var color: Int = Colors.BLUE.hexValue,
|
val name: Component = MissingComponent,
|
||||||
val name: Component = MissingComponent
|
override var color: Int = savedColors?.get(name.string) ?: Colors.BLUE.hexValue,
|
||||||
): ColoredElement(x, y, 80, 10, color, 0.5F) {
|
): ColoredElement(x, y, 80, 10, color, 0.5F) {
|
||||||
fun isCategory(c: Category): Boolean = (name.string == c.box.name.string)
|
fun isCategory(c: Category): Boolean = (name.string == c.box.name.string)
|
||||||
val buttons: MutableSet<ButtonImpl> =
|
val buttons: MutableSet<ButtonImpl> =
|
||||||
|
@ -119,9 +119,4 @@ class ClickBox(
|
||||||
Minecraft.getInstance().font.draw(poseStack, name.string, x.toFloat() + 5, y.toFloat() + 1.5F, Colors.TRANSPARENT.hexValue)
|
Minecraft.getInstance().font.draw(poseStack, name.string, x.toFloat() + 5, y.toFloat() + 1.5F, Colors.TRANSPARENT.hexValue)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
init {
|
|
||||||
savedColors?.get(name.string)?.let {
|
|
||||||
this.color = it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue