Layering
Index
Variables
Character
The character in question
Display
The (rectangular) shape and inter-button gap of the layering screen
readonlyDisplayDefault
The default (rectangular) shape and inter-button gap of the layering screen
readonlyID
The IDs of layering-specific DOM elements
Item
The selected item in question
Functions
Exit
Parameters
reload: boolean = false
Whether the exit call is part of a reload (see Layering.Init)
Returns void
Init
Initialize the layering subscreen
Parameters
item: Item
The affected item
character: Character
The item's owning character
display: Partial<LayeringDisplay> = null
The shape of the layering subscreen
reload: boolean = false
Whether we're loading or reloading the screen. A reload pushes any current changes towards the server and reinitializes all DOM elements.
readonly: boolean = false
Returns HTMLDivElement
The div containing the layering subscreen
IsActive
Return whether the layering sub screen has currently been initialized (be it either active or unloaded)
Returns boolean
Load
Called when screen is loaded using
CommonSetScreen
Returns void
RegisterExitCallbacks
Register screen-specific callbacks to-be executed after calling Layering.Exit.
Callbacks registered herein must be used exclusively for setting up the next screen, and not for tearing down the layering sub screen. As such, they are ignored when performing a reload of the layering sub screen (see Layering.Init)
Parameters
rest...options: readonly LayeringExitOptions[]
Returns void
Resize
Called when screen size or position changes or after screen load
Parameters
load: boolean
If the reason for call was load (
true
) or window resize (false
)
Returns void
Unload
Called when this screen is being replaced
Returns void
Accessors
Asset
Get the item's asset
Returns Asset
OverridePriority
Get or set the items
Property.OverridePriority
Returns AssetLayerOverridePriority
Parameters
value: AssetLayerOverridePriority
Returns void
Readonly
Get or set whether the layering screen is readonly
Returns boolean
Parameters
value: boolean
Returns void
Namespace with functions for managing the layering sub screen
Below is an example of some basic usage of the Layering subscreen, including a
Click
function for initializing the screen and a set ofResize
andExit
functions for, respectively, handling the screens drawing/resizing and exiting