Package-level declarations

Types

Link copied to clipboard
abstract class Animation<T>(trailingLinebreak: Boolean = true, val terminal: Terminal)

An Animation renders a widget to the screen each time update is called, clearing the render from the previous call.

Link copied to clipboard
interface Refreshable
Link copied to clipboard

A version of Animation that has a parameterless refresh method instead of update.

Properties

Link copied to clipboard

The time between refreshes. This is 1 / refreshRate

Functions

Link copied to clipboard
inline fun <T> Terminal.animation(trailingLinebreak: Boolean = true, crossinline draw: (T) -> Widget): Animation<T>

Create an Animation that uses the draw function to render objects of type T.

Link copied to clipboard
inline fun Animation<Unit>.asRefreshable(fps: Int = 5, crossinline finished: () -> Boolean = { false }): RefreshableAnimation

Convert this Animation to a RefreshableAnimation.

Link copied to clipboard
inline fun <T> Terminal.textAnimation(whitespace: Whitespace = Whitespace.PRE, align: TextAlign = TextAlign.NONE, overflowWrap: OverflowWrap = OverflowWrap.NORMAL, width: Int? = null, tabWidth: Int? = null, trailingLinebreak: Boolean = true, crossinline draw: (T) -> String): Animation<T>

Create an Animation that wraps the result of the draw function into a Text widget and renders it.