Files
Basalt/docs/objects/Program/pause.md
Robert Jelic 4d614372a1 Updated docs
There is still stuff to do
2022-08-28 18:18:26 +02:00

16 lines
457 B
Markdown

## pause
pauses the current program (prevents the program from receiving events)
#### Parameters:
1. `boolean` true, false or nothing
#### Returns:
1. `object` The object in use
#### Usage:
* Pauses worm by clicking a button
```lua
local mainFrame = basalt.createFrame():show()
local aProgram = mainFrame:addProgram():execute("rom/programs/shell.lua"):show()
mainFrame:addButton():setText("Pause"):onClick(function() aProgram:pause(true) end):show()
```