Shorten the execAction method

This commit is contained in:
Username404-59 2021-05-11 17:07:31 +02:00
parent 00a12bb828
commit d8231aadfb
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 5 deletions

View File

@ -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()