profectus-docs/assets/api_game_layers_interfaces_Layer.md.DX6eyhSS.js

1 line
16 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as a,c as r,a0 as t,o}from"./chunks/framework.P9qPzDnn.js";const p=JSON.parse('{"title":"Interface: Layer","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/game/layers/interfaces/Layer.md","filePath":"api/game/layers/interfaces/Layer.md","lastUpdated":null}'),i={name:"api/game/layers/interfaces/Layer.md"};function n(s,e,d,c,l,h){return o(),r("div",null,e[0]||(e[0]=[t('<p><a href="./../../../">Profectus</a> / <a href="./../">game/layers</a> / Layer</p><h1 id="interface-layer" tabindex="-1">Interface: Layer <a class="header-anchor" href="#interface-layer" aria-label="Permalink to &quot;Interface: Layer&quot;"></a></h1><p>An unit of game content. Displayed to the user as a tab or modal.</p><h2 id="extends" tabindex="-1">Extends <a class="header-anchor" href="#extends" aria-label="Permalink to &quot;Extends&quot;"></a></h2><ul><li><a href="./BaseLayer"><code>BaseLayer</code></a></li></ul><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;"></a></h2><h3 id="classes" tabindex="-1">classes? <a class="header-anchor" href="#classes" aria-label="Permalink to &quot;classes?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>classes</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <code>boolean</code>&gt;&gt;</p></blockquote><p>An object of classes that should be applied to the display.</p><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L174" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:174</a></p><hr><h3 id="color" tabindex="-1">color? <a class="header-anchor" href="#color" aria-label="Permalink to &quot;color?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>color</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>The color of the layer, used to theme the entire layer&#39;s display.</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L167" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:167</a></p><hr><h3 id="display" tabindex="-1">display <a class="header-anchor" href="#display" aria-label="Permalink to &quot;display&quot;"></a></h3><blockquote><p><strong>display</strong>: <a href="./../../../util/computed/type-aliases/MaybeGetter"><code>MaybeGetter</code></a>&lt;<a href="./../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a>&gt;</p></blockquote><p>The layout of this layer&#39;s features. When the layer is open in <a href="./../../player/interfaces/Player#tabs">game/player.Player.tabs</a>, this is the content that is displayed.</p><h4 id="defined-in-2" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-2" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L172" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:172</a></p><hr><h3 id="emit" tabindex="-1">emit() <a class="header-anchor" href="#emit" aria-label="Permalink to &quot;emit()&quot;"></a></h3><blockquote><p><strong>emit</strong>: &lt;<code>K</code>&gt;(...<code>args</code>) =&gt; <code>void</code></p></blockquote><p>A function to emit a <a href="./LayerEvents">LayerEvents</a> event to this layer.</p><h4 id="type-parameters" tabindex="-1">Type Parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to &quot;Type Parameters&quot;"></a></h4><p>• <strong>K</strong> <em>extends</em> keyof <a href="./LayerEvents"><code>LayerEvents</code></a></p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><h5 id="args" tabindex="-1">args <a class="header-anchor" href="#args" aria-label="Permalink to &quot;args&quot;"></a></h5><p>...[<code>K</code>, <code>...Parameters&lt;LayerEvents[K]&gt;[]</code>]</p><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>void</code></p><h4 id="inherited-from" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./BaseLayer"><code>BaseLayer</code></a>.<a href="./BaseLayer#emit"><code>emit</code></a></p><h4 id="defined-in-3" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-3" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L159" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:159</a></p><hr><h3 id="emitter" tabindex="-1">emitter <a class="header-anchor" href="#emitter" aria-label="Permalink to &quot;emitter&quot;"></a></h3><blockquote><p><strong>emitter</strong>: <code>Emitter</code>&lt;<a href="./LayerEvents"><code>LayerEvents</code></a>&gt;</p></blockquote><p>An emitter for sending <a href="./LayerEvents">LayerEvents</a> events for this layer.</p><h4 id="inherited-from-1" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-1" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./BaseLayer"><code>BaseLayer</code></a>.<a href="./BaseLayer#emitter"><code>emitter</code></a></p><h4 id="defined-in-4" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-4" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L155" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:155</a></p><hr><h3 id="forcehidegoback" tabindex="-1">forceHideGoBack? <a class="header-anchor" href="#forcehidegoback" aria-label="Permalink to &quot;forceHideGoBack?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>forceHideGoBack</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<code>boolean</code>&gt;</p></blockquote><p>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.</p><h4 id="defined-in-5" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-5" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L196" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:196</a></p><hr><h3 id="id" tabindex="-1">id <a class="header-anchor" href="#id" aria-label="Permalink to &quot;id&quot;"></a></h3><blockquote><p><strong>id</strong>: <code>string</code></p></blockquote><p>The ID of the layer. Populated from the <a href="./../functions/createLayer">createLayer</a> parameters. Used for saving and tracking open tabs.</p><h4 id="inherited-from-2" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-2" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./BaseLayer"><code>BaseLayer</code></a>.<a href="./BaseLayer#id"><code>id</code></a></p><h4 id="defined-in-6" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-6" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L151" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:151</a></p><hr><h3 id="minimizable" tabindex="-1">minimizable? <a class="header-anchor" href="#minimizable" aria-label="Permalink to &quot;minimizable?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>minimizable</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<code>boolean</code>&gt;</p></blockquote><p>Whether or not the layer can be minimized. Defaults to true.</p><h4 id="defined-in-7" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-7" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L186" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:186</a></p><hr><h3 id="minimized" tabindex="-1">minimized <a class="header-anchor" href="#minimized" aria-label="Permalink to &quot;minimized&quot;"></a></h3><blockquote><p><strong>minimized</strong>: <a href="./../../persistence/type-aliases/Persistent"><code>Persistent</code></a>&lt;<code>boolean</code>&gt;</p></blockquote><p>A persistent ref tracking if the tab is minimized or not.</p><h4 id="inherited-from-3" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-3" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./BaseLayer"><code>BaseLayer</code></a>.<a href="./BaseLayer#minimized"><code>minimized</code></a></p><h4 id="defined-in-8" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-8" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L153" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:153</a></p><hr><h3 id="minimizeddisplay" tabindex="-1">minimizedDisplay? <a class="header-anchor" href="#minimizeddisplay" aria-label="Permalink to &quot;minimizedDisplay?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>minimizedDisplay</strong>: <a href="./../../../util/computed/type-aliases/MaybeGetter"><code>MaybeGetter</code></a>&lt;<a href="./../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a>&gt;</p></blockquote><p>The layout of this layer&#39;s features. When the layer is open in <a href="./../../player/interfaces/Player#tabs">game/player.Player.tabs</a>, but the tab is <a href="./BaseLayer#minimized">Layer.minimized</a> this is the content that is displayed.</p><h4 id="defined-in-9" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-9" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L191" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:191</a></p><hr><h3 id="minwidth" tabindex="-1">minWidth? <a class="header-anchor" href="#minwidth" aria-label="Permalink to &quot;minWidth?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>minWidth</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<code>string</code> | <code>number</code>&gt;</p></blockquote><p>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.</p><h4 id="defined-in-10" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-10" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L202" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:202</a></p><hr><h3 id="name" tabindex="-1">name? <a class="header-anchor" href="#name" aria-label="Permalink to &quot;name?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>name</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>The name of the layer, used on minimized tabs. Defaults to <a href="./BaseLayer#id">BaseLayer.id</a>.</p><h4 id="defined-in-11" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-11" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L181" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:181</a></p><hr><h3 id="nodes" tabindex="-1">nodes <a class="header-anchor" href="#nodes" aria-label="Permalink to &quot;nodes&quot;"></a></h3><blockquote><p><strong>nodes</strong>: <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-ref" target="_blank" rel="noreferrer"><code>Ref</code></a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <code>undefined</code> | <a href="./FeatureNode"><code>FeatureNode</code></a>&gt;, <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a>&lt;<code>string</code>, <code>undefined</code> | <a href="./FeatureNode"><code>FeatureNode</code></a>&gt;&gt;</p></blockquote><p>A map of <a href="./FeatureNode">FeatureNode</a>s present in this layer&#39;s Context component.</p><h4 id="inherited-from-4" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-4" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./BaseLayer"><code>BaseLayer</code></a>.<a href="./BaseLayer#nodes"><code>nodes</code></a></p><h4 id="defined-in-12" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-12" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L161" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:161</a></p><hr><h3 id="on" tabindex="-1">on() <a class="header-anchor" href="#on" aria-label="Permalink to &quot;on()&quot;"></a></h3><blockquote><p><strong>on</strong>: (...<code>args</code>) =&gt; <code>Unsubscribe</code></p></blockquote><p>A function to register an event listener on <a href="./BaseLayer#emitter">emitter</a>.</p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><h5 id="args-1" tabindex="-1">args <a class="header-anchor" href="#args-1" aria-label="Permalink to &quot;args&quot;"></a></h5><p>...[keyof <a href="./LayerEvents"><code>LayerEvents</code></a>, (<code>diff</code>) =&gt; <code>void</code> | (<code>diff</code>) =&gt; <code>void</code> | (<code>diff</code>) =&gt; <code>void</code>]</p><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>Unsubscribe</code></p><h4 id="inherited-from-5" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-5" aria-label="Permalink to &quot;Inherited from&quot;"></a></h4><p><a href="./BaseLayer"><code>BaseLayer</code></a>.<a href="./BaseLayer#on"><code>on</code></a></p><h4 id="defined-in-13" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-13" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L157" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:157</a></p><hr><h3 id="style" tabindex="-1">style? <a class="header-anchor" href="#style" aria-label="Permalink to &quot;style?&quot;"></a></h3><blockquote><p><code>optional</code> <strong>style</strong>: <a href="https://vuejs.org/api/utility-types.html#mayberef" target="_blank" rel="noreferrer"><code>MaybeRef</code></a>&lt;<a href="https://vuejs.org/api/utility-types.html#cssproperties" target="_blank" rel="noreferrer"><code>CSSProperties</code></a>&gt;</p></blockquote><p>Styles that should be applied to the display.</p><h4 id="defined-in-14" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-14" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/layers.tsx#L176" target="_blank" rel="noreferrer">profectus/src/game/layers.tsx:176</a></p>',119)]))}const m=a(i,[["render",n]]);export{p as __pageData,m as default};