AppConfig

data class AppConfig(blinkLengthInMilliSeconds: Long, cursorStyle: CursorStyle, cursorColor: TileColor, isCursorBlinking: Boolean, isClipboardAvailable: Boolean, defaultTileset: TilesetResource, defaultGraphicalTileset: TilesetResource, defaultColorTheme: ColorTheme, debugMode: Boolean, size: Size, fullScreen: Boolean, borderless: Boolean, title: String, fpsLimit: Int, debugConfig: DebugConfig, closeBehavior: CloseBehavior, shortcutsConfig: ShortcutsConfig, iconData: ByteArray?, iconPath: String?)

Object that encapsulates the configuration parameters for an Application. This includes properties such as the shape of the cursor, the color of the cursor and if the cursor should blink or not.

Constructors

AppConfig
Link copied to clipboard
common
fun AppConfig(blinkLengthInMilliSeconds: Long = 500, cursorStyle: CursorStyle = CursorStyle.FIXED_BACKGROUND, cursorColor: TileColor = TileColor.defaultForegroundColor(), isCursorBlinking: Boolean = false, isClipboardAvailable: Boolean = true, defaultTileset: TilesetResource = CP437TilesetResources.wanderlust16x16(), defaultGraphicalTileset: TilesetResource = GraphicalTilesetResources.nethack16x16(), defaultColorTheme: ColorTheme = ColorThemes.defaultTheme(), debugMode: Boolean = false, size: Size = Size.create(80, 40), fullScreen: Boolean = false, borderless: Boolean = false, title: String = "Zircon Application", fpsLimit: Int = 60, debugConfig: DebugConfig = DebugConfig.defaultConfig(), closeBehavior: CloseBehavior = CloseBehavior.EXIT_ON_CLOSE, shortcutsConfig: ShortcutsConfig = ShortcutsConfig(), iconData: ByteArray? = null, iconPath: String? = null)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

component1
Link copied to clipboard
common
operator fun component1(): Long
component10
Link copied to clipboard
common
operator fun component10(): Size
component11
Link copied to clipboard
common
operator fun component11(): Boolean
component12
Link copied to clipboard
common
operator fun component12(): Boolean
component13
Link copied to clipboard
common
operator fun component13(): String
component14
Link copied to clipboard
common
operator fun component14(): Int
component15
Link copied to clipboard
common
operator fun component15(): DebugConfig
component16
Link copied to clipboard
common
operator fun component16(): CloseBehavior
component17
Link copied to clipboard
common
operator fun component17(): ShortcutsConfig
component18
Link copied to clipboard
common
operator fun component18(): ByteArray?
component19
Link copied to clipboard
common
operator fun component19(): String?
component2
Link copied to clipboard
common
operator fun component2(): CursorStyle
component3
Link copied to clipboard
common
operator fun component3(): TileColor
component4
Link copied to clipboard
common
operator fun component4(): Boolean
component5
Link copied to clipboard
common
operator fun component5(): Boolean
component6
Link copied to clipboard
common
operator fun component6(): TilesetResource
component7
Link copied to clipboard
common
operator fun component7(): TilesetResource
component8
Link copied to clipboard
common
operator fun component8(): ColorTheme
component9
Link copied to clipboard
common
operator fun component9(): Boolean
copy
Link copied to clipboard
common
fun copy(blinkLengthInMilliSeconds: Long = 500, cursorStyle: CursorStyle = CursorStyle.FIXED_BACKGROUND, cursorColor: TileColor = TileColor.defaultForegroundColor(), isCursorBlinking: Boolean = false, isClipboardAvailable: Boolean = true, defaultTileset: TilesetResource = CP437TilesetResources.wanderlust16x16(), defaultGraphicalTileset: TilesetResource = GraphicalTilesetResources.nethack16x16(), defaultColorTheme: ColorTheme = ColorThemes.defaultTheme(), debugMode: Boolean = false, size: Size = Size.create(80, 40), fullScreen: Boolean = false, borderless: Boolean = false, title: String = "Zircon Application", fpsLimit: Int = 60, debugConfig: DebugConfig = DebugConfig.defaultConfig(), closeBehavior: CloseBehavior = CloseBehavior.EXIT_ON_CLOSE, shortcutsConfig: ShortcutsConfig = ShortcutsConfig(), iconData: ByteArray? = null, iconPath: String? = null): AppConfig
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
shouldCheckBounds
Link copied to clipboard
common
fun shouldCheckBounds(): Boolean
Tells whether bounds check should be performed or not.
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

blinkLengthInMilliSeconds
Link copied to clipboard
common
val blinkLengthInMilliSeconds: Long = 500
The amount of time (in milliseconds) that should pass before the next blink of the cursor (if cursor is displayed and blink is used).
borderless
Link copied to clipboard
common
val borderless: Boolean = false
Controls if the Application will be borderless or not.
closeBehavior
Link copied to clipboard
common
val closeBehavior: CloseBehavior
Determines the CloseBehavior when the application windows is closed.
cursorColor
Link copied to clipboard
common
val cursorColor: TileColor
The TileColor to be used when drawing a cursor.
cursorStyle
Link copied to clipboard
common
val cursorStyle: CursorStyle
The CursorStyle to be used when the cursor is displayed.
debugConfig
Link copied to clipboard
common
val debugConfig: DebugConfig
Sets the DebugConfig to be used when debugMode is true.
debugMode
Link copied to clipboard
common
val debugMode: Boolean = false
Can be used to switch debug mode on or off.
defaultColorTheme
Link copied to clipboard
common
val defaultColorTheme: ColorTheme
The default ColorTheme to be used when no color theme is specified.
defaultGraphicalTileset
Link copied to clipboard
common
val defaultGraphicalTileset: TilesetResource
The default graphical tileset to be used when no graphical tileset is specified.
defaultTileset
Link copied to clipboard
common
val defaultTileset: TilesetResource
The tileset to be used when no tileset is specified for the Application.
fpsLimit
Link copied to clipboard
common
val fpsLimit: Int = 60
Sets the fps limit of the resulting Application.
fullScreen
Link copied to clipboard
common
val fullScreen: Boolean = false
Controls if the Application will be full screen or not.
iconData
Link copied to clipboard
common
val iconData: ByteArray? = null
If set iconData contains the bytes of the icon image that will be used in the application window.
iconPath
Link copied to clipboard
common
val iconPath: String? = null
If set iconPath will contain the path of the resource that points to an icon image that will be used in the application window.
isClipboardAvailable
Link copied to clipboard
common
val isClipboardAvailable: Boolean = true
Can be used to control the availability of the clipboard.
isCursorBlinking
Link copied to clipboard
common
val isCursorBlinking: Boolean = false
Controls whether the cursor should be blinking when rendered.
shortcutsConfig
Link copied to clipboard
common
val shortcutsConfig: ShortcutsConfig
Determines the ShortcutsConfig to be used for built-in shortcuts.
size
Link copied to clipboard
common
val size: Size
Controls the Size of the resulting tile grid when the Application is started.
title
Link copied to clipboard
common
val title: String
Sets the title of the application window.

Sources

(source)
Link copied to clipboard