mirror of
https://github.com/Insality/druid
synced 2025-09-27 10:02:19 +02:00
Reimport docs
This commit is contained in:
@@ -1,6 +1,36 @@
|
||||
# Back Handler Quick API reference
|
||||
# druid.back_handler API
|
||||
|
||||
> at /druid/base/back_handler.lua
|
||||
|
||||
The component that handles the back handler action, like backspace or android back button
|
||||
|
||||
|
||||
## Functions
|
||||
- [init](#init)
|
||||
|
||||
|
||||
## Fields
|
||||
- [on_back](#on_back)
|
||||
- [params](#params)
|
||||
|
||||
|
||||
|
||||
### init
|
||||
|
||||
---
|
||||
```lua
|
||||
back_handler:init([callback], [params])
|
||||
back_handler:on_input([action_id], [action])
|
||||
```
|
||||
|
||||
- **Parameters:**
|
||||
- `[callback]` *(function|nil)*: The callback to call when the back handler is triggered
|
||||
- `[params]` *(any)*: Custom args to pass in the callback
|
||||
|
||||
|
||||
## Fields
|
||||
<a name="on_back"></a>
|
||||
- **on_back** (_event_): Trigger on back handler action, fun(self, params)
|
||||
|
||||
<a name="params"></a>
|
||||
- **params** (_any_): Custom args to pass in the callback
|
||||
|
||||
|
Reference in New Issue
Block a user