Skip to content

Commit

Permalink
Fixed small example issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeda88 committed May 29, 2024
1 parent 20315d9 commit 05f7030
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,15 @@ object ButtonStyles {
imageSize = ImageSize.Sized(24.0f, 24.0f)
spacing = 8.0f
imageGravity = gravity
setTextStyle(KalugaTextStyle(defaultBoldFont, DefaultColors.white, 12.0f, KalugaTextAlignment.LEFT), DefaultColors.azure, DefaultColors.black)
val textAlignment = when (gravity) {
ImageGravity.LEFT -> KalugaTextAlignment.LEFT
ImageGravity.START -> KalugaTextAlignment.START
ImageGravity.RIGHT -> KalugaTextAlignment.RIGHT
ImageGravity.END -> KalugaTextAlignment.END
ImageGravity.BOTTOM -> KalugaTextAlignment.CENTER
ImageGravity.TOP -> KalugaTextAlignment.CENTER
}
setTextStyle(KalugaTextStyle(defaultBoldFont, DefaultColors.white, 12.0f, textAlignment), DefaultColors.azure, DefaultColors.black)
setImage("star".asImage()!!, DefaultColors.gold, DefaultColors.goldenrod, DefaultColors.white)
setBackground(DefaultColors.lightGray, DefaultColors.gray, DefaultColors.dimGray)
}
Expand Down

0 comments on commit 05f7030

Please sign in to comment.