Add a <T:Any>.addTo(GUI) extension method to ease adding items to the sidebar
This commit is contained in:
@@ -550,4 +550,10 @@ class GUI : Extension {
|
|||||||
updateControls()
|
updateControls()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JvmName("addToGui")
|
||||||
|
fun <T : Any> T.addTo(gui: GUI): T {
|
||||||
|
gui.add(this)
|
||||||
|
return this
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user