From 04d5919a828ba7ef01a57d61aa8aa4e03f3beae5 Mon Sep 17 00:00:00 2001 From: Erb3 <49862976+Erb3@users.noreply.github.com> Date: Mon, 12 Sep 2022 20:44:18 +0200 Subject: [PATCH] Docs: basalt.createFrame --- docs/objects/Basalt/createFrame.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/objects/Basalt/createFrame.md b/docs/objects/Basalt/createFrame.md index 5650aa5..e84ec94 100644 --- a/docs/objects/Basalt/createFrame.md +++ b/docs/objects/Basalt/createFrame.md @@ -1,17 +1,23 @@ -## basalt.createFrame + +# basalt.createFrame + Creates a new base-frame, you can have as many base-frames as you want, but only 1 can be active (visible) at the same time. You can always switch between your base frames. Only the currently active base-frame listens to incoming events (except for some events like time-events and peripheral-events) -#### Parameters: +## Parameters + 1. `string` id - optional (if you dont set a id it will automatically create a uuid for you) -#### Returns: +## Returns + 1. `frame` object -#### Usage: +## Usage + * How to use multiple base frames: + ```lua local main1 = basalt.createFrame() -- Visible base frame on program start local main2 = basalt.createFrame() @@ -24,4 +30,5 @@ main1:addButton() end) main2:addLabel() :setText("We are currently on main2") -``` \ No newline at end of file +basalt.autoUpdate() +```