GridCraft.Configuration

Configuration parameters for a GridCraft grid.

API Overview #

API Documentation #

Constructors #

new #

SignatureGridCraft.Configuration.new() -> table
TypeConstructor
Description

Create a new configuration object for a GridCraft grid.

Returns
  • A GridCraft.Configuration object

Fields #

animationMs #

SignatureGridCraft.Configuration.animationMs
TypeField
Description

Time for key-seledction animation in ms, default is 150ms.

gridMaxWidth #

SignatureGridCraft.Configuration.gridMaxWidth
TypeField
Description

The max width for the grid in px, default is 1024

gridMaxHeight #

SignatureGridCraft.Configuration.gridMaxHeight
TypeField
Description

The max height for the grid in px, default is 768

displayScreen #

SignatureGridCraft.Configuration.displayScreen
TypeField
Description

The screen on which the grid should be displayed.

Methods #

animationSeconds #

SignatureGridCraft.Configuration:animationSeconds() -> number
TypeMethod
Description

Time for key-selection animation in seconds (derived from animationMs)

toJSON #

SignatureGridCraft.Configuration:toJSON() -> string
TypeMethod
Description

Return the configuration as a JSON string.

replace #

SignatureGridCraft.Configuration:replace() -> GridCraft.Configuration
TypeMethod
Description

Replace ALL values of the configuration with values from the upddate object

Parameters
  • updateConfig - A table containing new configuration values.
Returns
  • The configuration object itself, for chaining.
Notes
  • If a key is missing in the updateConfig, the value in the existing configuration will be set to nil.