import{_ as a,o as s,c as e,Q as n}from"./chunks/framework.4313453f.js";const u=JSON.parse('{"title":"Frame","description":"","frontmatter":{},"headers":[],"relativePath":"references/frame.md","filePath":"references/frame.md","lastUpdated":null}'),l={name:"references/frame.md"},o=n(`<h1 id="frame" tabindex="-1">Frame <a class="header-anchor" href="#frame" aria-label="Permalink to &quot;Frame&quot;">​</a></h1><p>Frames are elements in Basalt used for organizing user interfaces. Unlike BaseFrames, Frames always require a parent container.</p><p>Frame inherit from <a href="./container.html">Container</a>, <a href="./visualelement.html">VisualElement</a> and <a href="./element.html">BasicElement</a></p><h2 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-label="Permalink to &quot;Example&quot;">​</a></h2><details class="details custom-block"><summary>Click to see example</summary><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> basalt </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">require</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;basalt&quot;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> main </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> basalt.</span><span style="color:#79B8FF;">addFrame</span><span style="color:#E1E4E8;">() </span><span style="color:#6A737D;">-- This is a Baseframe</span></span>
<span class="line"><span style="color:#F97583;">local</span><span style="color:#E1E4E8;"> subFrame </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">main</span><span style="color:#E1E4E8;">:</span><span style="color:#79B8FF;">addFrame</span><span style="color:#E1E4E8;">() </span><span style="color:#6A737D;">-- This is a Frame</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">basalt.</span><span style="color:#79B8FF;">autoUpdate</span><span style="color:#E1E4E8;">()</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> basalt </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">require</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;basalt&quot;</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> main </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> basalt.</span><span style="color:#005CC5;">addFrame</span><span style="color:#24292E;">() </span><span style="color:#6A737D;">-- This is a Baseframe</span></span>
<span class="line"><span style="color:#D73A49;">local</span><span style="color:#24292E;"> subFrame </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">main</span><span style="color:#24292E;">:</span><span style="color:#005CC5;">addFrame</span><span style="color:#24292E;">() </span><span style="color:#6A737D;">-- This is a Frame</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">basalt.</span><span style="color:#005CC5;">autoUpdate</span><span style="color:#24292E;">()</span></span></code></pre></div></details>`,5),p=[o];function t(r,c,i,y,E,m){return s(),e("div",null,p)}const h=a(l,[["render",t]]);export{u as __pageData,h as default};
