Module: game/layers

Interfaces

Type aliases

GenericLayer

Ƭ GenericLayer: Replace<Layer<LayerOptions>, { minWidth: ProcessedComputable<number> ; minimizable: ProcessedComputable<boolean> ; name: ProcessedComputable<string> }>

Defined in

profectus/src/game/layers.tsx:105


Layer

Ƭ Layer<T>: Replace<T & BaseLayer, { classes: GetComputableType<T["classes"]> ; color: GetComputableType<T["color"]> ; display: GetComputableType<T["display"]> ; forceHideGoBack: GetComputableType<T["forceHideGoBack"]> ; minWidth: GetComputableTypeWithDefault<T["minWidth"], 600> ; minimizable: GetComputableTypeWithDefault<T["minimizable"], true> ; name: GetComputableTypeWithDefault<T["name"], string> ; style: GetComputableType<T["style"]> }>

Type parameters

NameType
Textends LayerOptions

Defined in

profectus/src/game/layers.tsx:91

Variables

BoundsInjectionKey

Const BoundsInjectionKey: InjectionKey<Ref<DOMRect | undefined>>

Defined in

profectus/src/game/layers.tsx:39


NodesInjectionKey

Const NodesInjectionKey: InjectionKey<Ref<Record<string, FeatureNode | undefined>>>

Defined in

profectus/src/game/layers.tsx:37


RegisterNodeInjectionKey

Const RegisterNodeInjectionKey: InjectionKey<(id: string, element: HTMLElement) => void>

Defined in

profectus/src/game/layers.tsx:33


UnregisterNodeInjectionKey

Const UnregisterNodeInjectionKey: InjectionKey<(id: string) => void>

Defined in

profectus/src/game/layers.tsx:35


addingLayers

Const addingLayers: string[] = []

Defined in

profectus/src/game/layers.tsx:115


layers

Const layers: Record<string, Readonly<GenericLayer> | undefined>

Defined in

profectus/src/game/layers.tsx:50


persistentRefs

Const persistentRefs: Record<string, Set<Persistent>> = {}

Defined in

profectus/src/game/layers.tsx:114

Functions

addLayer

addLayer(layer, player): void

Parameters

NameType
layerGenericLayer
playerObject
player.layers?Record<string, Record<string, unknown>>

Returns

void

Defined in

profectus/src/game/layers.tsx:153


createLayer

createLayer<T>(id, optionsFunc): Layer<T>

Type parameters

NameType
Textends LayerOptions

Parameters

NameType
idstring
optionsFuncOptionsFunc<T, BaseLayer, BaseLayer>

Returns

Layer<T>

Defined in

profectus/src/game/layers.tsx:116


getLayer

getLayer<T>(layerID): T

Type parameters

NameType
Textends GenericLayer

Parameters

NameType
layerIDstring

Returns

T

Defined in

profectus/src/game/layers.tsx:176


reloadLayer

reloadLayer(layer): void

Parameters

NameType
layerGenericLayer

Returns

void

Defined in

profectus/src/game/layers.tsx:187


removeLayer

removeLayer(layer): void

Parameters

NameType
layerGenericLayer

Returns

void

Defined in

profectus/src/game/layers.tsx:180


setupLayerModal

setupLayerModal(layer): Object

Parameters

NameType
layerGenericLayer

Returns

Object

NameType
modalJSXFunction
openModalVoidFunction

Defined in

profectus/src/game/layers.tsx:194