ViewUtils

object ViewUtils

Module that contains some utils useful for view boundaries.

class Object
trait Matchable
class Any

Type members

Classlikes

case class StatsDisplayer[E, A](label: E, extractor: DataExtractor[A], defaultName: String)

Case class that is useful in gui to display stats associated to its label.

Case class that is useful in gui to display stats associated to its label.

Type parameters:
A

the type of data to extract

E

the type of the label

Value parameters:
defaultName

the default name of the stat

extractor

the extractor to use

label

the label in which display the stat

Value members

Concrete methods

def io[A](computation: => A): Task[A]

A facade on Task with a terminology more related to UI.

A facade on Task with a terminology more related to UI.

Value parameters:
computation

the computation to perform in a lazy way.

Returns:

the task.

def scaleToView(coordinate: Int, scale: Int): Int

Utility useful to scale a coordinate based on the current scaling of the view.

Utility useful to scale a coordinate based on the current scaling of the view.

Value parameters:
coordinate

the coordinate to scale.

scale

the current scale.

Returns:

a scaled coordinate.