profectus-docs/assets/api_interfaces_features_grids_grid.GridOptions.md.5d8ff64b.js

1 line
13 KiB
JavaScript
Raw 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 e,c as t,o as a,N as r}from"./chunks/framework.0799945b.js";const g=JSON.parse('{"title":"Interface: GridOptions","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/interfaces/features/grids/grid.GridOptions.md","lastUpdated":null}'),o={name:"api/interfaces/features/grids/grid.GridOptions.md"},i=r('<h1 id="interface-gridoptions" tabindex="-1">Interface: GridOptions <a class="header-anchor" href="#interface-gridoptions" aria-label="Permalink to &quot;Interface: GridOptions&quot;"></a></h1><p><a href="./../../../modules/features/grids/grid">features/grids/grid</a>.GridOptions</p><p>An object that configures a <a href="./../../../modules/features/grids/grid#grid">Grid</a>.</p><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;"></a></h2><h3 id="cols" tabindex="-1">cols <a class="header-anchor" href="#cols" aria-label="Permalink to &quot;cols&quot;"></a></h3><p>• <strong>cols</strong>: <a href="./../../../modules/util/computed#computable"><code>Computable</code></a>&lt;<code>number</code>&gt;</p><p>The number of columns in the grid.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L230" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:230</a></p><hr><h3 id="getcanclick" tabindex="-1">getCanClick <a class="header-anchor" href="#getcanclick" aria-label="Permalink to &quot;getCanClick&quot;"></a></h3><p>• <code>Optional</code> <strong>getCanClick</strong>: <a href="./../../../modules/features/grids/grid#cellcomputable"><code>CellComputable</code></a>&lt;<code>boolean</code>&gt;</p><p>A computable to determine if a cell can be clicked.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L234" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:234</a></p><hr><h3 id="getclasses" tabindex="-1">getClasses <a class="header-anchor" href="#getclasses" aria-label="Permalink to &quot;getClasses&quot;"></a></h3><p>• <code>Optional</code> <strong>getClasses</strong>: <a href="./../../../modules/features/grids/grid#cellcomputable"><code>CellComputable</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><p>A computable to get the CSS classes for a cell.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L240" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:240</a></p><hr><h3 id="getdisplay" tabindex="-1">getDisplay <a class="header-anchor" href="#getdisplay" aria-label="Permalink to &quot;getDisplay&quot;"></a></h3><p>• <strong>getDisplay</strong>: <a href="./../../../modules/features/grids/grid#cellcomputable"><code>CellComputable</code></a>&lt;<a href="./../../../modules/features/feature#coercablecomponent"><code>CoercableComponent</code></a>&gt;</p><p>A computable to get the display component for a cell.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L244" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:244</a></p><hr><h3 id="getstartstate" tabindex="-1">getStartState <a class="header-anchor" href="#getstartstate" aria-label="Permalink to &quot;getStartState&quot;"></a></h3><p>• <strong>getStartState</strong>: <a href="./../../../modules/util/computed#computable"><code>Computable</code></a>&lt;<a href="./../../../modules/game/persistence#state"><code>State</code></a>&gt; | (<code>id</code>: <code>string</code> | <code>number</code>) =&gt; <a href="./../../../modules/game/persistence#state"><code>State</code></a></p><p>A computable to get the initial persistent state of a cell.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L236" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:236</a></p><hr><h3 id="getstyle" tabindex="-1">getStyle <a class="header-anchor" href="#getstyle" aria-label="Permalink to &quot;getStyle&quot;"></a></h3><p>• <code>Optional</code> <strong>getStyle</strong>: <a href="./../../../modules/features/grids/grid#cellcomputable"><code>CellComputable</code></a>&lt;<a href="./../../../modules/features/feature#stylevalue"><code>StyleValue</code></a>&gt;</p><p>A computable to get the CSS styles for a cell.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L238" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:238</a></p><hr><h3 id="gettitle" tabindex="-1">getTitle <a class="header-anchor" href="#gettitle" aria-label="Permalink to &quot;getTitle&quot;"></a></h3><p>• <code>Optional</code> <strong>getTitle</strong>: <a href="./../../../modules/features/grids/grid#cellcomputable"><code>CellComputable</code></a>&lt;<a href="./../../../modules/features/feature#coercablecomponent"><code>CoercableComponent</code></a>&gt;</p><p>A computable to get the title component for a cell.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L242" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:242</a></p><hr><h3 id="getvisibility" tabindex="-1">getVisibility <a class="header-anchor" href="#getvisibility" aria-label="Permalink to &quot;getVisibility&quot;"></a></h3><p>• <code>Optional</code> <strong>getVisibility</strong>: <a href="./../../../modules/features/grids/grid#cellcomputable"><code>CellComputable</code></a>&lt;<code>boolean</code> | <a href="../../../enums/features/feature.Visibility"><code>Visibility</code></a>&gt;</p><p>A computable to determine the visibility of a cell.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L232" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:232</a></p><hr><h3 id="onclick" tabindex="-1">onClick <a class="header-anchor" href="#onclick" aria-label="Permalink to &quot;onClick&quot;"></a></h3><p>• <code>Optional</code> <strong>onClick</strong>: (<code>id</code>: <code>string</code> | <code>number</code>, <code>state</code>: <a href="./../../../modules/game/persistence#state"><code>State</code></a>, <code>e?</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent" target="_blank" rel="noreferrer"><code>MouseEvent</code></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent" target="_blank" rel="noreferrer"><code>TouchEvent</code></a>) =&gt; <code>void</code></p><h4 id="type-declaration" tabindex="-1">Type declaration <a class="header-anchor" href="#type-declaration" aria-label="Permalink to &quot;Type declaration&quot;"></a></h4><p>▸ (<code>id</code>, <code>state</code>, <code>e?</code>): <code>void</code></p><p>A function that is called when a cell is clicked.</p><h5 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code> | <code>number</code></td></tr><tr><td style="text-align:left;"><code>state</code></td><td style="text-align:left;"><a href="./../../../modules/game/persistence#state"><code>State</code></a></td></tr><tr><td style="text-align:left;"><code>e?</code></td><td style="text-align:left;"><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent" target="_blank" rel="noreferrer"><code>MouseEvent</code></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent" target="_blank" rel="noreferrer"><code>TouchEvent</code></a></td></tr></tbody></table><h5 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><code>void</code></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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L246" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:246</a></p><hr><h3 id="onhold" tabindex="-1">onHold <a class="header-anchor" href="#onhold" aria-label="Permalink to &quot;onHold&quot;"></a></h3><p>• <code>Optional</code> <strong>onHold</strong>: (<code>id</code>: <code>string</code> | <code>number</code>, <code>state</code>: <a href="./../../../modules/game/persistence#state"><code>State</code></a>) =&gt; <code>void</code></p><h4 id="type-declaration-1" tabindex="-1">Type declaration <a class="header-anchor" href="#type-declaration-1" aria-label="Permalink to &quot;Type declaration&quot;"></a></h4><p>▸ (<code>id</code>, <code>state</code>): <code>void</code></p><p>A function that is called when a cell is held down.</p><h5 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to &quot;Parameters&quot;"></a></h5><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th></tr></thead><tbody><tr><td style="text-align:left;"><code>id</code></td><td style="text-align:left;"><code>string</code> | <code>number</code></td></tr><tr><td style="text-align:left;"><code>state</code></td><td style="text-align:left;"><a href="./../../../modules/game/persistence#state"><code>State</code></a></td></tr></tbody></table><h5 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to &quot;Returns&quot;"></a></h5><p><code>void</code></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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L248" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:248</a></p><hr><h3 id="rows" tabindex="-1">rows <a class="header-anchor" href="#rows" aria-label="Permalink to &quot;rows&quot;"></a></h3><p>• <strong>rows</strong>: <a href="./../../../modules/util/computed#computable"><code>Computable</code></a>&lt;<code>number</code>&gt;</p><p>The number of rows in the grid.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L228" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:228</a></p><hr><h3 id="visibility" tabindex="-1">visibility <a class="header-anchor" href="#visibility" aria-label="Permalink to &quot;visibility&quot;"></a></h3><p>• <code>Optional</code> <strong>visibility</strong>: <a href="./../../../modules/util/computed#computable"><code>Computable</code></a>&lt;<code>boolean</code> | <a href="../../../enums/features/feature.Visibility"><code>Visibility</code></a>&gt;</p><p>Whether this grid should be visible.</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://github.com/profectus-engine/Profectus/blob/70cda5f/src/features/grids/grid.ts#L226" target="_blank" rel="noreferrer">profectus/src/features/grids/grid.ts:226</a></p>',87),d=[i];function s(l,n,c,h,f,u){return a(),t("div",null,d)}const b=e(o,[["render",s]]);export{g as __pageData,b as default};