<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Features:</p><ul><li><p>title: <strong>optional</strong>. displayed at the top in a larger font. It can also be a function that returns updating text.</p></li><li><p>effect(): <strong>optional</strong>. A function that calculates and returns the current values of bonuses of this clickable. Can return a value or an object containing multiple values.</p></li><li><p>display(): A function returning everything that should be displayed on the clickable after the title, likely changing based on its state. Can use basic HTML.</p></li><li><p>unlocked(): <strong>optional</strong>. A function returning a bool to determine if the clickable is visible or not. Default is unlocked.</p></li><li><p>canClick(): A function returning a bool to determine if you can click the clickable.</p></li><li><p>onClick(): A function that implements clicking the clickable.</p></li><li><p>onHold(): <strong>optional</strong> A function that is called 20x/sec when the button is held for at least 0.25 seconds.</p></li><li><p>style: <strong>optional</strong>. Applies CSS to this clickable, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).</p></li><li><p>marked: <strong>optional</strong> Adds a mark to the corner of the clickable. If it's "true" it will be a star, but it can also be an image URL.</p></li><li><p>layer: <strong>assigned automagically</strong>. It's the same value as the name of this layer, so you can do <code>player[this.layer].points</code> or similar.</p></li><li><p>id: <strong>assigned automagically</strong>. It's the "key" which the clickable was stored under, for convenient access. The clickable in the example's id is 11.</p></li></ul><p>You can also use these features on the clickables object to add a button above all the clickables, for implementing a respec button or similar.</p><ul><li><p>masterButtonPress(): <strong>optional</strong>. If present, an additional button will appear above the clickables. Pressing it will call this function.</p></li><li><p>masterButtonText: <strong>optional</strong>. Text to display on the Master Button.</p></li><li><p>showMasterButton(): <strong>optional</strong>. A function determining whether or not to show the button, if masterButtonPress is defined. Defaults to true if absent.</p></li></ul></div></div></main><footerclass="VPDocFooter"data-v-39a288b8data-v-d4a0bba5><!--[--><!--]--><!----><navclass="prev-next"aria-labelledby="doc-footer-aria-label"data-v-d4a0bba5><spanclass="visually-hidden"id="doc-footer-aria-label"data-v-d4a0bba5>Pager</span><divclass="pager"data-v-d4a0bba5><!----></div><divclass="pager"data-v-d4a0bba5><aclass="VPLink link pager-link next"href="/garden/my-personal-website"data-v-d4a0bba5><!--[--><spanclass="desc"data-v-d4a0bba5>Next page</span><spanclass="title"data-v-d4a0bba5>My Personal Website</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><footerclass="vp-doc"data-v-74259571><divdata-v-74259571>CC 2024 The Paper Pilot. <arel="license"href="https://creativecommons.org/licenses/by-nc-sa/4.0/"data-v-74259571>CC BY-NC-SA 4.0</a>.</div><divdata-v-74259571>Any and all opinions listed here are my own and not representative of my employers; future, past and present.</div><divdata-v-74259571><ahref="https://resume.incremental.social/thepaperpilot/thepaperpilot"data-v-74259571>Resume</a> (not actively seeking new opportunities).</div><divdata-v-74259571>Site built from <ahref="https://code.incremental.social/thepaperpilot/pages/commit/994f1a11f9592e930b22bd2f01c543ed69f7ed83"data-v-74259571>this commit</a> on <timedata-v-74259571>Monday, June 17, 2024 at 13:39:10</time>.</div></footer><!--]--></div></div>