Make ClickGui.addComps an internal function
This commit is contained in:
parent
a7e7e6e60e
commit
c74b2d5195
|
@ -17,7 +17,7 @@ internal fun newBox(translationKey: String): ClickBox {
|
||||||
object ClickGui: SnowyScreen() {
|
object ClickGui: SnowyScreen() {
|
||||||
private var GuiDragging: Boolean = false
|
private var GuiDragging: Boolean = false
|
||||||
override val components = mutableSetOf<Element>()
|
override val components = mutableSetOf<Element>()
|
||||||
fun addComps(vararg toAdd: Element) = components.addAll(toAdd)
|
internal fun addComps(vararg toAdd: Element) = components.addAll(toAdd)
|
||||||
|
|
||||||
private inline fun boxContext(args: (ClickBox) -> Unit) = components.filterIsInstance<ClickBox>().forEach(args)
|
private inline fun boxContext(args: (ClickBox) -> Unit) = components.filterIsInstance<ClickBox>().forEach(args)
|
||||||
private inline fun buttonsContext(args: (ClickButton) -> Unit) = boxContext { it.buttons.values.forEach(args) }
|
private inline fun buttonsContext(args: (ClickButton) -> Unit) = boxContext { it.buttons.values.forEach(args) }
|
||||||
|
|
Loading…
Reference in New Issue