From bd61da95936e42cd1e5f851d51ba0d98f6dc6bad Mon Sep 17 00:00:00 2001 From: Erb3 <49862976+Erb3@users.noreply.github.com> Date: Sat, 17 Sep 2022 14:33:10 +0200 Subject: [PATCH] Docs: basalt.update() --- docs/objects/Basalt/update.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/objects/Basalt/update.md b/docs/objects/Basalt/update.md index bc57a5b..abcfffa 100644 --- a/docs/objects/Basalt/update.md +++ b/docs/objects/Basalt/update.md @@ -1,18 +1,23 @@ -## basalt.update + +# basalt.update + Calls the draw and event handler once - this gives more flexibility about which events basalt should process. For example you could filter the terminate event. Which means you have to pass the events into basalt.update. -#### Parameters: -1. `string` The event to be received +## Parameters + +1. `string` The event to be received 2. `...` Additional event variables to capture -#### Usage: +## Usage + * Creates and starts a custom update cycle + ```lua local mainFrame = basalt.createFrame() -local aButton = mainFrame:addButton():setPosition(2,2) +mainFrame:addButton():setPosition(2,2) while true do local ev = table.pack(os.pullEventRaw()) basalt.update(table.unpack(ev)) end -``` \ No newline at end of file +```