Skip to content

Commit

Permalink
wait, it's none by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Jan 20, 2022
1 parent ca09ac8 commit 4a6ff9e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ inline fun Table.addLabel(crossinline provider: () -> CharSequence, style: Label
}

/** Adds a constant image to the table and returns the created cell */
inline fun Table.addImage(drawable: Drawable, scaling: Scaling = Scaling.fit): Cell<Image> {
inline fun Table.addImage(drawable: Drawable, scaling: Scaling = Scaling.none): Cell<Image> {
val i = Image(drawable)
i.setScaling(scaling)
return add(i)
}

/** Adds a constant image to the table and returns the created cell */
inline fun Table.addImage(drawable: TextureRegion, scaling: Scaling = Scaling.fit): Cell<Image> {
inline fun Table.addImage(drawable: TextureRegion, scaling: Scaling = Scaling.none): Cell<Image> {
val i = Image(drawable)
i.setScaling(scaling)
return add(i)
}

/** Adds a dynamic image to the table and returns the created cell */
inline fun Table.addImage(crossinline provider: () -> TextureRegion, scaling: Scaling = Scaling.fit): Cell<Image> {
inline fun Table.addImage(crossinline provider: () -> TextureRegion, scaling: Scaling = Scaling.none): Cell<Image> {
val i = Image(provider())
i.setScaling(scaling)
i.update { provider() }
Expand Down

0 comments on commit 4a6ff9e

Please sign in to comment.