Files
Basalt/docs/docs1_6/objects/Basalt/update.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

586 B

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
  2. ... Additional event variables to capture

Usage

  • Creates and starts a custom update cycle
local mainFrame = basalt.createFrame()
mainFrame:addButton():setPosition(2,2)
while true do
    local ev = table.pack(os.pullEventRaw())
    basalt.update(table.unpack(ev))
end