13 lines
3.9 KiB
JavaScript
13 lines
3.9 KiB
JavaScript
import{_ as s,o as a,c as e,Q as n}from"./chunks/framework.1169fbc9.js";const h=JSON.parse('{"title":"Infoboxes","description":"","frontmatter":{},"headers":[],"relativePath":"public/gamedevtree/docs/infoboxes.md","filePath":"public/gamedevtree/docs/infoboxes.md","lastUpdated":1701137241000}'),o={name:"public/gamedevtree/docs/infoboxes.md"},t=n(`<h1 id="infoboxes" tabindex="-1">Infoboxes <a class="header-anchor" href="#infoboxes" aria-label="Permalink to "Infoboxes""></a></h1><p>Infoboxes are good for displaying "lore", 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 vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">infoboxes</span><span style="color:#E1E4E8;">: {</span></span>
|
||
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">infobox</span><span style="color:#E1E4E8;">: {</span></span>
|
||
<span class="line"><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">display</span><span style="color:#E1E4E8;">() {</span><span style="color:#F97583;">return</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">"Blah"</span><span style="color:#E1E4E8;">},</span></span>
|
||
<span class="line"><span style="color:#E1E4E8;"> etc</span></span>
|
||
<span class="line"><span style="color:#E1E4E8;"> }</span></span>
|
||
<span class="line"><span style="color:#E1E4E8;"> etc</span></span>
|
||
<span class="line"><span style="color:#E1E4E8;"> }</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">infoboxes</span><span style="color:#24292E;">: {</span></span>
|
||
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">infobox</span><span style="color:#24292E;">: {</span></span>
|
||
<span class="line"><span style="color:#24292E;"> </span><span style="color:#6F42C1;">display</span><span style="color:#24292E;">() {</span><span style="color:#D73A49;">return</span><span style="color:#24292E;"> </span><span style="color:#032F62;">"Blah"</span><span style="color:#24292E;">},</span></span>
|
||
<span class="line"><span style="color:#24292E;"> etc</span></span>
|
||
<span class="line"><span style="color:#24292E;"> }</span></span>
|
||
<span class="line"><span style="color:#24292E;"> etc</span></span>
|
||
<span class="line"><span style="color:#24292E;"> }</span></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'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's the "key" which the bar was stored under, for convenient access. The bar in the example's id is "bigBar".</p></li></ul>`,7),l=[t];function p(i,r,c,d,y,b){return a(),e("div",null,l)}const E=s(o,[["render",p]]);export{h as __pageData,E as default};
|