1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
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 "Interface: Layer""></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 "Extends""></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 "Properties""></a></h2><h3 id="classes" tabindex="-1">classes? <a class="header-anchor" href="#classes" aria-label="Permalink to "classes?""></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><<a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a><<code>string</code>, <code>boolean</code>>></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 "Defined in""></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 "color?""></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><<code>string</code>></p></blockquote><p>The color of the layer, used to theme the entire layer's display.</p><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to "Defined in""></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 "display""></a></h3><blockquote><p><strong>display</strong>: <a href="./../../../util/computed/type-aliases/MaybeGetter"><code>MaybeGetter</code></a><<a href="./../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a>></p></blockquote><p>The layout of this layer'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 "Defined in""></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 "emit()""></a></h3><blockquote><p><strong>emit</strong>: <<code>K</code>>(...<code>args</code>) => <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 "Type Parameters""></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 "Parameters""></a></h4><h5 id="args" tabindex="-1">args <a class="header-anchor" href="#args" aria-label="Permalink to "args""></a></h5><p>...[<code>K</code>, <code>...Parameters<LayerEvents[K]>[]</code>]</p><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></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 "Inherited from""></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 "Defined in""></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 "emitter""></a></h3><blockquote><p><strong>emitter</strong>: <code>Emitter</code><<a href="./LayerEvents"><code>LayerEvents</code></a>></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 "Inherited from""></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 "Defined in""></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 "forceHideGoBack?""></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><<code>boolean</code>></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 "Defined in""></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 "id""></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 "Inherited from""></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 "Defined in""></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 "minimizable?""></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><<code>boolean</code>></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 "Defined in""></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 "minimized""></a></h3><blockquote><p><strong>minimized</strong>: <a href="./../../persistence/type-aliases/Persistent"><code>Persistent</code></a><<code>boolean</code>></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 "Inherited from""></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 "Defined in""></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 "minimizedDisplay?""></a></h3><blockquote><p><code>optional</code> <strong>minimizedDisplay</strong>: <a href="./../../../util/computed/type-aliases/MaybeGetter"><code>MaybeGetter</code></a><<a href="./../../../util/vue/type-aliases/Renderable"><code>Renderable</code></a>></p></blockquote><p>The layout of this layer'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 "Defined in""></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 "minWidth?""></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><<code>string</code> | <code>number</code>></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 "Defined in""></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 "name?""></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><<code>string</code>></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 "Defined in""></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 "nodes""></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><<a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a><<code>string</code>, <code>undefined</code> | <a href="./FeatureNode"><code>FeatureNode</code></a>>, <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" target="_blank" rel="noreferrer"><code>Record</code></a><<code>string</code>, <code>undefined</code> | <a href="./FeatureNode"><code>FeatureNode</code></a>>></p></blockquote><p>A map of <a href="./FeatureNode">FeatureNode</a>s present in this layer'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 "Inherited from""></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 "Defined in""></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 "on()""></a></h3><blockquote><p><strong>on</strong>: (...<code>args</code>) => <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 "Parameters""></a></h4><h5 id="args-1" tabindex="-1">args <a class="header-anchor" href="#args-1" aria-label="Permalink to "args""></a></h5><p>...[keyof <a href="./LayerEvents"><code>LayerEvents</code></a>, (<code>diff</code>) => <code>void</code> | (<code>diff</code>) => <code>void</code> | (<code>diff</code>) => <code>void</code>]</p><h4 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to "Returns""></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 "Inherited from""></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 "Defined in""></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 "style?""></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><<a href="https://vuejs.org/api/utility-types.html#cssproperties" target="_blank" rel="noreferrer"><code>CSSProperties</code></a>></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 "Defined in""></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};
|