mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
tweak(AddKeybind): update to match currentKey in base repo (#57)
This commit is contained in:
1 parent
c4e47195e8
commit
2945edfbab
2 files changed
+3
-24
No files matched your search
@@ -6,7 +6,7 @@ lib.addKeybind(data)
|
||||
* description: `string`
|
||||
* defaultKey?: `string`
|
||||
* Default: None
|
||||
* keybind: `string`
|
||||
* currentKey: `string`
|
||||
* disabled?: `boolean`
|
||||
* disable?: `function`(self: `table`, toggle: `boolean`)
|
||||
* onPressed?: `function`(self: `table`)
|
||||
@@ -18,10 +18,10 @@ local keybind = lib.addKeybind({
|
||||
description = 'press F to pay respects',
|
||||
defaultKey = 'F',
|
||||
onPressed = function(self)
|
||||
print(('pressed %s (%s)'):format(self.keybind, self.name))
|
||||
print(('pressed %s (%s)'):format(self.currentKey, self.name))
|
||||
end,
|
||||
onReleased = function(self)
|
||||
print(('released %s (%s)'):format(self.keybind, self.name))
|
||||
print(('released %s (%s)'):format(self.currentKey, self.name))
|
||||
end,
|
||||
})
|
||||
```
|
||||
|
||||
@@ -117,24 +117,3 @@ lib.hideTextUI()
|
||||
</Tabs>
|
||||
|
||||
|
||||
### lib.isTextUIOpen
|
||||
Returns if the TextUI window is open
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
local isOpen = lib.isTextUIOpen()
|
||||
print(isOpen)
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/client'
|
||||
|
||||
let isOpen = lib.isTextUIOpen()
|
||||
console.log(isOpen)
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
Reference in new issue
Block a user