pages/assets/public_gamedevtree_docs_infoboxes.md.7a0953be.js

9 lines
3.2 KiB
JavaScript
Raw Normal View History

import{_ as s,c as e,o as a,d as o}from"./app.99998402.js";const h=JSON.parse('{"title":"Infoboxes","description":"","frontmatter":{},"headers":[],"relativePath":"public/gamedevtree/docs/infoboxes.md","lastUpdated":null}'),n={name:"public/gamedevtree/docs/infoboxes.md"},t=o(`<h1 id="infoboxes" tabindex="-1">Infoboxes <a class="header-anchor" href="#infoboxes" aria-hidden="true">#</a></h1><p>Infoboxes are good for displaying &quot;lore&quot;, or story elements, as well as for explaining complicated things.</p><p>In the default tab layout, the first infobox will be displayed at the very top of the tab.</p><p>Infoboxes are defined like other Big Features:</p><div class="language-js"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki"><code><span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">infoboxes</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;"> </span><span style="color:#FFCB6B;">infobox</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#F07178;"> </span><span style="color:#82AAFF;">display</span><span style="color:#F07178;">() </span><span style="color:#89DDFF;">{</span><span style="color:#89DDFF;">return</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">Blah</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">etc</span></span>
<span class="line"><span style="color:#F07178;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">etc</span></span>
<span class="line"><span style="color:#F07178;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"></span></code></pre></div><p>Features:</p><ul><li><p>title: The text displayed above the main box. Can be a function to be dynamic, and can use basic HTML.</p></li><li><p>body: The text displayed inside the box. Can be a function to be dynamic, and can use basic HTML.</p></li><li><p>style, titleStyle, bodyStyle: <strong>Optional</strong>, Apply CSS to the infobox, or to the title button or body of the infobox, 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>unlocked(): <strong>optional</strong>, A function returning a bool to determine if the infobox is visible or not. Default is unlocked.</p></li><li><p>layer: <strong>Assigned automagically</strong>. It&#39;s the same value as the name of this layer, so you can do player[this.layer].points or similar</p></li><li><p>id: <strong>Assigned automagically</strong>. It&#39;s the &quot;key&quot; which the bar was stored under, for convenient access. The bar in the example&#39;s id is &quot;bigBar&quot;.</p></li></ul>`,7),l=[t];function p(i,r,c,d,y,u){return a(),e("div",null,l)}const f=s(n,[["render",p]]);export{h as __pageData,f as default};