import{_ as a,o as e,c as s,Q as n}from"./chunks/framework.4313453f.js";const u=JSON.parse('{"title":"Baseframe","description":"","frontmatter":{},"headers":[],"relativePath":"references/baseframe.md","filePath":"references/baseframe.md","lastUpdated":null}'),l={name:"references/baseframe.md"},t=n(`

Baseframe

Base frames are fundamental elements in Basalt, typically the first element you need. They can be created using basalt.addFrame. Base frames are unique in that they do not require a parent container. They occupy the entire screen. If you need a BaseFrame that doesn't occupy the entire screen, consider using CC:Tweaked's Window API.

It's important to note that only one base frame can be active (visible) at a time. While you can create multiple base frames, only the currently active one listens to incoming events (except for some events like time-events and peripheral-events). To switch between BaseFrames, you can use basalt.switchFrame

Baseframe inherit from Container, VisualElement and BasicElement

Example

Click to see example
lua
local basalt = require("basalt")

local main = basalt.addFrame() -- a new baseframe is created.

basalt.autoUpdate()
local basalt = require("basalt")

local main = basalt.addFrame() -- a new baseframe is created.

basalt.autoUpdate()
`,6),o=[t];function r(p,c,i,m,d,y){return e(),s("div",null,o)}const f=a(l,[["render",r]]);export{u as __pageData,f as default};