profectus-docs/assets/api_modules_game_notifications.md.31c6f1d9.js

1 line
8.5 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,N as a}from"./chunks/framework.0799945b.js";const b=JSON.parse('{"title":"Module: game/notifications","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/game/notifications.md","lastUpdated":null}'),i={name:"api/modules/game/notifications.md"},d=a('<h1 id="module-game-notifications" tabindex="-1">Module: game/notifications <a class="header-anchor" href="#module-game-notifications" aria-label="Permalink to &quot;Module: game/notifications&quot;"></a></h1><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to &quot;Functions&quot;"></a></h2><h3 id="createdismissablenotify" tabindex="-1">createDismissableNotify <a class="header-anchor" href="#createdismissablenotify" aria-label="Permalink to &quot;createDismissableNotify&quot;"></a></h3><p>▸ <strong>createDismissableNotify</strong>(<code>element</code>, <code>shouldNotify</code>): <code>Ref</code>&lt;<code>boolean</code>&gt;</p><p>Create a boolean ref that will automatically be set based on the given condition, but also dismissed when hovering over a given element, typically the element where acting upon the notification would take place.</p><h4 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>element</code></td><td style="text-align:left;"><a href="./../util/vue#vuefeature"><code>VueFeature</code></a></td><td style="text-align:left;">The element that will dismiss the notification on hover.</td></tr><tr><td style="text-align:left;"><code>shouldNotify</code></td><td style="text-align:left;"><code>Ref</code>&lt;<code>boolean</code>&gt; | () =&gt; <code>boolean</code></td><td style="text-align:left;">A function or ref that determines if the notif should be active currently or not.</td></tr></tbody></table><h4 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>Ref</code>&lt;<code>boolean</code>&gt;</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/8c0a0c4/src/game/notifications.ts#L36" target="_blank" rel="noreferrer">profectus/src/game/notifications.ts:36</a></p><p>• <strong>createDismissableNotify</strong>: (<code>element</code>: <a href="./../util/vue#vuefeature"><code>VueFeature</code></a>, <code>shouldNotify</code>: <code>Ref</code>&lt;<code>boolean</code>&gt; | () =&gt; <code>boolean</code>) =&gt; <code>Ref</code>&lt;<code>boolean</code>&gt;</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/8c0a0c4/src/game/notifications.ts#L36" target="_blank" rel="noreferrer">profectus/src/game/notifications.ts:36</a></p><hr><h3 id="gethighnotifystyle" tabindex="-1">getHighNotifyStyle <a class="header-anchor" href="#gethighnotifystyle" aria-label="Permalink to &quot;getHighNotifyStyle&quot;"></a></h3><p>▸ <strong>getHighNotifyStyle</strong>(): <code>Object</code></p><p>Utility function to call <a href="./notifications#getnotifystyle">getNotifyStyle</a> with &quot;high importance&quot; parameters.</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>Object</code></p><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>borderColor</code></td><td style="text-align:left;"><code>string</code></td></tr><tr><td style="text-align:left;"><code>boxShadow</code></td><td style="text-align:left;"><code>string</code></td></tr><tr><td style="text-align:left;"><code>transform</code></td><td style="text-align:left;"><code>string</code></td></tr><tr><td style="text-align:left;"><code>zIndex</code></td><td style="text-align:left;"><code>number</code></td></tr></tbody></table><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/8c0a0c4/src/game/notifications.ts#L27" target="_blank" rel="noreferrer">profectus/src/game/notifications.ts:27</a></p><p>• <strong>getHighNotifyStyle</strong>: () =&gt; { <code>borderColor</code>: <code>string</code> = &quot;rgba(0, 0, 0, 0.125)&quot;; <code>boxShadow</code>: <code>string</code> ; <code>transform</code>: <code>string</code> = &quot;scale(1.05, 1.05)&quot;; <code>zIndex</code>: <code>number</code> = 1 }</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/8c0a0c4/src/game/notifications.ts#L27" target="_blank" rel="noreferrer">profectus/src/game/notifications.ts:27</a></p><hr><h3 id="getnotifystyle" tabindex="-1">getNotifyStyle <a class="header-anchor" href="#getnotifystyle" aria-label="Permalink to &quot;getNotifyStyle&quot;"></a></h3><p>▸ <strong>getNotifyStyle</strong>(<code>color?</code>, <code>strength?</code>): <code>Object</code></p><p>Gives a CSSProperties object that makes an object glow, to bring focus to it. Default values are for a &quot;soft&quot; white notif effect.</p><h4 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to &quot;Parameters&quot;"></a></h4><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Default value</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>color</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;"><code>&quot;white&quot;</code></td><td style="text-align:left;">The color of the glow effect.</td></tr><tr><td style="text-align:left;"><code>strength</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;"><code>&quot;8px&quot;</code></td><td style="text-align:left;">The strength of the glow effect - affects its spread.</td></tr></tbody></table><h4 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to &quot;Returns&quot;"></a></h4><p><code>Object</code></p><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>borderColor</code></td><td style="text-align:left;"><code>string</code></td></tr><tr><td style="text-align:left;"><code>boxShadow</code></td><td style="text-align:left;"><code>string</code></td></tr><tr><td style="text-align:left;"><code>transform</code></td><td style="text-align:left;"><code>string</code></td></tr><tr><td style="text-align:left;"><code>zIndex</code></td><td style="text-align:left;"><code>number</code></td></tr></tbody></table><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/8c0a0c4/src/game/notifications.ts#L17" target="_blank" rel="noreferrer">profectus/src/game/notifications.ts:17</a></p><p>• <strong>getNotifyStyle</strong>: (<code>color</code>: <code>string</code>, <code>strength</code>: <code>string</code>) =&gt; { <code>borderColor</code>: <code>string</code> = &quot;rgba(0, 0, 0, 0.125)&quot;; <code>boxShadow</code>: <code>string</code> ; <code>transform</code>: <code>string</code> = &quot;scale(1.05, 1.05)&quot;; <code>zIndex</code>: <code>number</code> = 1 }</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/8c0a0c4/src/game/notifications.ts#L17" target="_blank" rel="noreferrer">profectus/src/game/notifications.ts:17</a></p>',40),r=[d];function n(l,c,s,f,h,g){return o(),t("div",null,r)}const y=e(i,[["render",n]]);export{b as __pageData,y as default};