TileBuilder

data class TileBuilder(character: Char, name: String, tags: Set<String>, styleSet: StyleSet, tileset: TilesetResource) : Builder<Tile>

Builds Tiles. Defaults:

  • Default character is a space

  • Default modifiers is an empty set also

See also

Constructors

TileBuilder
Link copied to clipboard
common
fun TileBuilder(character: Char = ' ', name: String = " ", tags: Set<String> = setOf(), styleSet: StyleSet = StyleSet.defaultStyle(), tileset: TilesetResource = RuntimeConfig.config.defaultTileset)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

build
Link copied to clipboard
common
open override fun build(): Tile
Builds an object of type T.
buildCharacterTile
Link copied to clipboard
common
fun buildCharacterTile(): CharacterTile
buildGraphicalTile
Link copied to clipboard
common
fun buildGraphicalTile(): GraphicalTile
buildImageTile
Link copied to clipboard
common
fun buildImageTile(): ImageTile
character
Link copied to clipboard
common
fun character(): Char
copy
Link copied to clipboard
common
fun copy(character: Char = ' ', name: String = " ", tags: Set<String> = setOf(), styleSet: StyleSet = StyleSet.defaultStyle(), tileset: TilesetResource = RuntimeConfig.config.defaultTileset): TileBuilder
createCopy
Link copied to clipboard
common
open override fun createCopy(): TileBuilder
Creates a deep copy of this object.
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
name
Link copied to clipboard
common
fun name(): String
styleSet
Link copied to clipboard
common
fun styleSet(): StyleSet
tags
Link copied to clipboard
common
fun tags(): Set<String>
tileset
Link copied to clipboard
common
fun tileset(): TilesetResource
toString
Link copied to clipboard
common
open override fun toString(): String
withBackgroundColor
Link copied to clipboard
common
fun withBackgroundColor(backgroundColor: TileColor): TileBuilder
withCharacter
Link copied to clipboard
common
fun withCharacter(character: Char): TileBuilder
withForegroundColor
Link copied to clipboard
common
fun withForegroundColor(foregroundColor: TileColor): TileBuilder
withModifiers
Link copied to clipboard
common
fun withModifiers(vararg modifiers: Modifier): TileBuilder
fun withModifiers(modifiers: Set<Modifier>): TileBuilder
withName
Link copied to clipboard
common
fun withName(name: String): TileBuilder
withStyleSet
Link copied to clipboard
common
fun withStyleSet(styleSet: StyleSet): TileBuilder
Sets the styles (colors and modifiers) from the given styleSet.
withTags
Link copied to clipboard
common
fun withTags(tags: Set<String>): TileBuilder
withTileset
Link copied to clipboard
common
fun withTileset(tileset: TilesetResource): TileBuilder

Sources

(source)
Link copied to clipboard