profectus-docs/assets/api_data_common_functions_createFormulaPreview.md.VkMlSZnn.js

1 line
3.3 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 a,c as r,a0 as t,o}from"./chunks/framework.P9qPzDnn.js";const p=JSON.parse('{"title":"Function: createFormulaPreview()","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/data/common/functions/createFormulaPreview.md","filePath":"api/data/common/functions/createFormulaPreview.md","lastUpdated":null}'),i={name:"api/data/common/functions/createFormulaPreview.md"};function n(l,e,c,s,u,d){return o(),r("div",null,e[0]||(e[0]=[t('<p><a href="./../../../">Profectus</a> / <a href="./../">data/common</a> / createFormulaPreview</p><h1 id="function-createformulapreview" tabindex="-1">Function: createFormulaPreview() <a class="header-anchor" href="#function-createformulapreview" aria-label="Permalink to &quot;Function: createFormulaPreview()&quot;"></a></h1><blockquote><p><strong>createFormulaPreview</strong>(<code>formula</code>, <code>showPreview</code>, <code>previewAmount</code>): <a href="https://vuejs.org/guide/typescript/composition-api.html#typing-computed" target="_blank" rel="noreferrer"><code>ComputedRef</code></a>&lt;<code>Element</code>&gt;</p></blockquote><p>Utility function for displaying the result of a formula such that it will, when told to, preview how the formula&#39;s result will change. Requires a formula with a single variable inside.</p><h2 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to &quot;Parameters&quot;"></a></h2><h3 id="formula" tabindex="-1">formula <a class="header-anchor" href="#formula" aria-label="Permalink to &quot;formula&quot;"></a></h3><p><a href="./../../../game/formulas/types/type-aliases/GenericFormula"><code>GenericFormula</code></a></p><p>The formula to display the result of.</p><h3 id="showpreview" tabindex="-1">showPreview <a class="header-anchor" href="#showpreview" aria-label="Permalink to &quot;showPreview&quot;"></a></h3><p><a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a>&lt;<code>boolean</code>&gt;</p><p>Whether or not to preview how the formula&#39;s result will change.</p><h3 id="previewamount" tabindex="-1">previewAmount <a class="header-anchor" href="#previewamount" aria-label="Permalink to &quot;previewAmount&quot;"></a></h3><p><a href="https://vuejs.org/api/utility-types.html#maybereforgetter" target="_blank" rel="noreferrer"><code>MaybeRefOrGetter</code></a>&lt;<a href="./../../../lib/break_eternity/type-aliases/DecimalSource"><code>DecimalSource</code></a>&gt; = <code>1</code></p><p>The amount to <em>add</em> to the current formula&#39;s variable amount to preview the change in result.</p><h2 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to &quot;Returns&quot;"></a></h2><p><a href="https://vuejs.org/guide/typescript/composition-api.html#typing-computed" target="_blank" rel="noreferrer"><code>ComputedRef</code></a>&lt;<code>Element</code>&gt;</p><h2 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h2><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/data/common.tsx#L450" target="_blank" rel="noreferrer">profectus/src/data/common.tsx:450</a></p>',18)]))}const h=a(i,[["render",n]]);export{p as __pageData,h as default};