docs update

Updated some docs stuff
This commit is contained in:
Robert Jelic
2022-10-09 12:05:30 +02:00
parent 44402b1d26
commit 1d3e2018ef
13 changed files with 228 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
# onChar
`onChar(self, event, char)`<br>
The computercraft event which triggers this method is `char`.
The char event always happens after the key event (just like in cc:tweaked)
Here is a example on how to add a onChar event to your frame:
```lua
local basalt = require("basalt")
local main = basalt.createFrame()
local subFrame = main:addFrame()
:setPosition(3,3)
:setSize(18,6)
:hide()
function openSubFrame(self, event, char)
if(char=="a")then
subFrame:show()
end
end
main:onChar(openSubFrame)
```