PhysicalConnectivity/src/main/kotlin/net/shadowfacts/cacao/view/button/Button.kt

22 lines
591 B
Kotlin
Raw Normal View History

2021-02-19 04:12:43 +00:00
package net.shadowfacts.cacao.view.button
import net.shadowfacts.cacao.view.View
/**
* A simple button implementation that provides no additional logic.
*
* @author shadowfacts
* @param content The [View] that provides the content of this button.
* @param padding The padding between the [content] and the edges of the button.
2021-02-28 17:19:09 +00:00
* @param handler The handler function to invoke when this button is pressed.
2021-02-19 04:12:43 +00:00
*/
2021-02-28 17:19:09 +00:00
class Button(
content: View,
padding: Double = 4.0,
handler: ((Button) -> Unit)? = null
): AbstractButton<Button>(content, padding) {
init {
2021-02-27 18:24:17 +00:00
this.handler = handler
}
}