Updated some formatting

Updated formatting for object
This commit is contained in:
Robert Jelic
2022-10-20 21:05:29 +02:00
parent 4352d36831
commit ab72f244ed
42 changed files with 381 additions and 122 deletions

View File

@@ -1,5 +1,7 @@
# onClick
`onClick(self, event, button, x, y)`<br>
`onClick(self, event, button, x, y)`
The computercraft event which triggers this method is `mouse_click` and `monitor_touch`.
Here is a example on how to add a onClick event to your button:
@@ -20,6 +22,7 @@ button:onClick(buttonOnClick)
```
Here is also a example on how you could create double clicks:
```lua
local basalt = require("basalt")
local doubleClickMaxTime = 0.25 -- in seconds
@@ -44,4 +47,4 @@ end
createDoubleClick(button, debugSomething) -- this is how you will create a double click.
basalt.autoUpdate()
```
```