diff --git a/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickButton.kt b/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickButton.kt index 0df4502..ddbbe25 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickButton.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/gui/elements/ClickButton.kt @@ -23,11 +23,7 @@ class ClickButton( } internal var lightningFactor: Float = 0.33F } - private fun execAction() { - action?.let { - this@ClickButton.it() - } - } + private fun execAction() { action?.invoke(this) } private var wasWithinBounds: Boolean = false var toggled: Boolean = false; private set(value) { if (value) lightUp() else if (field) lightDown()