Profectus / game/layers / Layer
Interface: Layer ​
An unit of game content. Displayed to the user as a tab or modal.
Extends ​
Properties ​
classes? ​
An object of classes that should be applied to the display.
Defined in ​
profectus/src/game/layers.tsx:174
color? ​
optional
color:MaybeRef
<string
>
The color of the layer, used to theme the entire layer's display.
Defined in ​
profectus/src/game/layers.tsx:167
display ​
display:
MaybeGetter
<Renderable
>
The layout of this layer's features. When the layer is open in game/player.Player.tabs, this is the content that is displayed.
Defined in ​
profectus/src/game/layers.tsx:172
emit() ​
emit: <
K
>(...args
) =>void
A function to emit a LayerEvents event to this layer.
Type Parameters ​
• K extends keyof LayerEvents
Parameters ​
args ​
...[K
, ...Parameters<LayerEvents[K]>[]
]
Returns ​
void
Inherited from ​
Defined in ​
profectus/src/game/layers.tsx:159
emitter ​
emitter:
Emitter
<LayerEvents
>
An emitter for sending LayerEvents events for this layer.
Inherited from ​
Defined in ​
profectus/src/game/layers.tsx:155
forceHideGoBack? ​
optional
forceHideGoBack:MaybeRef
<boolean
>
Whether or not to force the go back button to be hidden. If true, go back will be hidden regardless of allowGoBack value in the project settings.
Defined in ​
profectus/src/game/layers.tsx:196
id ​
id:
string
The ID of the layer. Populated from the createLayer parameters. Used for saving and tracking open tabs.
Inherited from ​
Defined in ​
profectus/src/game/layers.tsx:151
minimizable? ​
optional
minimizable:MaybeRef
<boolean
>
Whether or not the layer can be minimized. Defaults to true.
Defined in ​
profectus/src/game/layers.tsx:186
minimized ​
minimized:
Persistent
<boolean
>
A persistent ref tracking if the tab is minimized or not.
Inherited from ​
Defined in ​
profectus/src/game/layers.tsx:153
minimizedDisplay? ​
optional
minimizedDisplay:MaybeGetter
<Renderable
>
The layout of this layer's features. When the layer is open in game/player.Player.tabs, but the tab is Layer.minimized this is the content that is displayed.
Defined in ​
profectus/src/game/layers.tsx:191
minWidth? ​
optional
minWidth:MaybeRef
<string
|number
>
A CSS min-width value that is applied to the layer. Can be a number, in which case the unit is assumed to be px. Defaults to 600px.
Defined in ​
profectus/src/game/layers.tsx:202
name? ​
optional
name:MaybeRef
<string
>
The name of the layer, used on minimized tabs. Defaults to BaseLayer.id.
Defined in ​
profectus/src/game/layers.tsx:181
nodes ​
nodes:
Ref
<Record
<string
,undefined
|FeatureNode
>,Record
<string
,undefined
|FeatureNode
>>
A map of FeatureNodes present in this layer's Context component.
Inherited from ​
Defined in ​
profectus/src/game/layers.tsx:161
on() ​
on: (...
args
) =>Unsubscribe
A function to register an event listener on emitter.
Parameters ​
args ​
...[keyof LayerEvents
, (diff
) => void
| (diff
) => void
| (diff
) => void
]
Returns ​
Unsubscribe
Inherited from ​
Defined in ​
profectus/src/game/layers.tsx:157
style? ​
optional
style:MaybeRef
<CSSProperties
>
Styles that should be applied to the display.