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,18 @@
# Basalt
## setMouseDragThrottle
Changes the drag throttle of all drag events. Default value is 50ms - which is 0.05s.
Instead of sending all mouse_drag events to the :onDrag handlers basalt sends every 0.05s (while dragging) the most recent drag event to all
drag handlers. If you need all drag events - just change the value to 0.
### Parameters
1. `number` A number in miliseconds.
### Usage
```lua
local basalt = require("basalt")
basalt.setMouseDragThrottle(0)
```

View File

@@ -0,0 +1,20 @@
# Basalt
## setMouseMoveThrottle
This feature is only available for [CraftOS-PC](https://www.craftos-pc.cc).
CraftOS-PC has a builtin mouse_move event, which is disabled by default. By using this method it will also enable the event for you. Remember - basalt does not disable the event after closing the program, which means the event stays active. If you want to disable the event please use config.set("mouse_move_throttle", -1) in your lua prompt or your program.
Sidenote: a very low amount can make the program laggy - because it litterally spams the mouse_move event. So use it carefully.
### Parameters
1. `number` A number in miliseconds.
### Usage
```lua
local basalt = require("basalt")
basalt.setMouseMoveThrottle(50)
```