Docs update

Some more stuff for docs
This commit is contained in:
Robert Jelic
2022-10-09 14:00:35 +02:00
parent 681d54b406
commit bf1b008084
12 changed files with 189 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
# onLeave
`onLeave(self, event, button, x, y)`<br>
The computercraft event which triggers this method is `mouse_move` - only available in [CraftOS-PC](https://www.craftos-pc.cc).
Here is a example on how to add a onLeave event to your button:
```lua
local basalt = require("basalt")
local main = basalt.createFrame()
local button = main:addButton()
:setPosition(3,3)
:setSize(12,3)
:setText("Leave")
function buttonOnLeave()
basalt.debug("The mouse left the button!")
end
button:onLeave(buttonOnLeave)
```