Properties

Link copied to clipboard

the ButtonStateStyle.WithImageAndText that the button is in by default

Link copied to clipboard

the ButtonStateStyle.WithImageAndText that the button is in when disabled. If null defaultStyle will be used.

Link copied to clipboard
open override var font: KalugaFont

the KalugaFont that the text is in

Link copied to clipboard

the ImageGravity to determine placement of the ButtonImage relative to the text

Link copied to clipboard
open override var imageSize: ImageSize
Link copied to clipboard
open override var padding: Padding

Configured the Padding of the content of the button

Link copied to clipboard

the ButtonStateStyle.WithImageAndText that the button is in when pressed. If null defaultStyle will be used.

Link copied to clipboard

the spacing between the ButtonImage and text

Link copied to clipboard

the KalugaTextAlignment of the text

Link copied to clipboard
open override var textSize: Float

the size of the text

Functions

Link copied to clipboard

Sets defaultStyle using the creation using a ButtonStateStyleDSL.WithImageAndText The ButtonStateStyleDSL.WithImageAndText will be preconfigured with the layout of the previous defaultStyle

Link copied to clipboard

Sets disabledStyle using the creation using a ButtonStateStyleDSL.WithImageAndText The ButtonStateStyleDSL.WithImageAndText will be preconfigured with the layout of the previous disabledStyle or defaultStyle if null

Link copied to clipboard

Sets pressedStyle using the creation using a ButtonStateStyleDSL.WithImageAndText The ButtonStateStyleDSL.WithImageAndText will be preconfigured with the layout of the previous pressedStyle or defaultStyle if null

Link copied to clipboard
open fun setBackground(defaultColor: KalugaColor, pressedColor: KalugaColor = defaultColor, disabledColor: KalugaColor = defaultColor, shape: KalugaBackgroundStyle.Shape = KalugaBackgroundStyle.Shape.Rectangle())
Link copied to clipboard
open fun setImage(image: KalugaImage)
open fun setImage(image: TintedImage, pressedTint: KalugaColor = image.tint, disabledTint: KalugaColor = image.tint)
open fun setImage(image: KalugaImage, defaultTint: KalugaColor, pressedTint: KalugaColor = defaultTint, disabledTint: KalugaColor = defaultTint)
Link copied to clipboard
open fun setTextStyle(textStyle: KalugaTextStyle, pressedColor: KalugaColor = textStyle.color, disabledColor: KalugaColor = textStyle.color)