22 lines
591 B
Kotlin
22 lines
591 B
Kotlin
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.
|
|
* @param handler The handler function to invoke when this button is pressed.
|
|
*/
|
|
class Button(
|
|
content: View,
|
|
padding: Double = 4.0,
|
|
handler: ((Button) -> Unit)? = null
|
|
): AbstractButton<Button>(content, padding) {
|
|
init {
|
|
this.handler = handler
|
|
}
|
|
}
|