Make ClickGui.addComps an internal function

This commit is contained in:
Username404-59 2021-05-02 15:00:14 +02:00
parent a7e7e6e60e
commit c74b2d5195
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ internal fun newBox(translationKey: String): ClickBox {
object ClickGui: SnowyScreen() {
private var GuiDragging: Boolean = false
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 buttonsContext(args: (ClickButton) -> Unit) = boxContext { it.buttons.values.forEach(args) }