1 line
6.5 KiB
JavaScript
1 line
6.5 KiB
JavaScript
import{_ as t,c as e,o as a,N as o}from"./chunks/framework.0799945b.js";const y=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"},l=o('<h1 id="module-game-notifications" tabindex="-1">Module: game/notifications <a class="header-anchor" href="#module-game-notifications" aria-label="Permalink to "Module: game/notifications""></a></h1><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to "Functions""></a></h2><h3 id="createdismissablenotify" tabindex="-1">createDismissableNotify <a class="header-anchor" href="#createdismissablenotify" aria-label="Permalink to "createDismissableNotify""></a></h3><p>▸ <strong>createDismissableNotify</strong>(<code>element</code>, <code>shouldNotify</code>): <code>Ref</code><<code>boolean</code>></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><h5 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h5><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><<code>boolean</code>> | () => <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><h5 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></a></h5><p><code>Ref</code><<code>boolean</code>></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://github.com/profectus-engine/Profectus/blob/b666e0c/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 "getHighNotifyStyle""></a></h3><p>▸ <strong>getHighNotifyStyle</strong>(): <code>Object</code></p><p>Utility function to call <a href="./notifications#getnotifystyle">getNotifyStyle</a> with "high importance" parameters.</p><h5 id="returns-1" tabindex="-1">Returns <a class="header-anchor" href="#returns-1" aria-label="Permalink to "Returns""></a></h5><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-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://github.com/profectus-engine/Profectus/blob/b666e0c/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 "getNotifyStyle""></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 "soft" white notif effect.</p><h5 id="parameters-1" tabindex="-1">Parameters <a class="header-anchor" href="#parameters-1" aria-label="Permalink to "Parameters""></a></h5><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>"white"</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>"8px"</code></td><td style="text-align:left;">The strength of the glow effect - affects its spread.</td></tr></tbody></table><h5 id="returns-2" tabindex="-1">Returns <a class="header-anchor" href="#returns-2" aria-label="Permalink to "Returns""></a></h5><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 "Defined in""></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/b666e0c/src/game/notifications.ts#L17" target="_blank" rel="noreferrer">profectus/src/game/notifications.ts:17</a></p>',31),d=[l];function n(r,s,c,f,h,g){return a(),e("div",null,d)}const b=t(i,[["render",n]]);export{y as __pageData,b as default};
|