invoke

operator fun invoke(font: KalugaFont, textSize: Float, textAlignment: KalugaTextAlignment = KalugaTextAlignment.CENTER, defaultStyle: ButtonStateStyle.TextOnly, pressedStyle: ButtonStateStyle.TextOnly = defaultStyle, disabledStyle: ButtonStateStyle.TextOnly = defaultStyle): KalugaButtonStyle.TextOnly

Deprecated

Use KalugaButtonStyle.TextOnly

Replace with

KalugaButtonStyle.textOnly {
            this.font = font
            this.textSize = textSize
            this.textAlignment = textAlignment
            this.defaultStyle = defaultStyle
            this.pressedStyle = pressedStyle
            this.disabledStyle = disabledStyle
        }

Creates a KalugaButtonStyle.TextOnly

Parameters

font

the KalugaFont that the text is in

textSize

the size of the text

textAlignment

the KalugaTextAlignment of the text

defaultStyle

the ButtonStateStyle.TextOnly that the button is in by default

pressedStyle

the ButtonStateStyle.TextOnly that the button is in when pressed

disabledStyle

the ButtonStateStyle.TextOnly that the button is in when disabled


operator fun invoke(textStyle: KalugaTextStyle, textAlignment: KalugaTextAlignment = KalugaTextAlignment.CENTER, backgroundColor: KalugaColor = DefaultColors.clear, pressedBackgroundColor: KalugaColor = backgroundColor, disabledBackgroundColor: KalugaColor = backgroundColor, shape: KalugaBackgroundStyle.Shape = KalugaBackgroundStyle.Shape.Rectangle()): KalugaButtonStyle.TextOnly

Deprecated

Use KalugaButtonStyle.TextOnly

Replace with

KalugaButtonStyle.textOnly { 
            setTextStyle(textStyle)
            this.textAlignment = textAlignment
            defaultStyle {
                setBackgroundStyle(backgroundColor, shape)
            }
            pressedStyle { 
                setBackgroundStyle(pressedBackgroundColor, shape)
            }
            disabledStyle { 
                setBackgroundStyle(disabledBackgroundColor, shape)
            }
        }

Creates a KalugaButtonStyle.TextOnly

Return

a ButtonStateStyle.TextOnly

Parameters

textStyle

the KalugaTextStyle that the text is in

textAlignment

the KalugaTextAlignment of the text

backgroundColor
pressedBackgroundColor
disabledBackgroundColor