mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
move ox_lib modules to subdirectory
This commit is contained in:
1 parent
97b129e0fa
commit
ba094e1fb3
42 files changed
+1
-1
No files matched your search
@@ -0,0 +1,129 @@
|
||||
---
|
||||
title: TextUI
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
### lib.showTextUI
|
||||
|
||||
Show the TextUI window.
|
||||
|
||||
:::danger
|
||||
|
||||
**DO NOT** run this function every tick, it's intented to be used as a toggle.
|
||||
:::
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
lib.showTextUI(text, options)
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/client'
|
||||
|
||||
lib.showTextUI(text, options)
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
* text: `string`
|
||||
* options?: `table`
|
||||
* position?: `'right-center'` or `'left-center'` or `'top-center'`
|
||||
* Default: `'right-center'`
|
||||
* icon?: `string` or `table` (`array`)
|
||||
* iconColor?: `string`
|
||||
* style?: React.CSSProperties
|
||||
|
||||
### lib.hideTextUI
|
||||
|
||||
Hides the currently visible TextUI window
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
lib.hideTextUI()
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/client'
|
||||
|
||||
lib.hideTextUI()
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Usage Example
|
||||
|
||||
#### Basic
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
lib.showTextUI('[E] - Fuel vehicle')
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/client'
|
||||
|
||||
lib.showTextUI('[E] - Fuel vehicle')
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||

|
||||
|
||||
#### Custom styling
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='Lua'>
|
||||
|
||||
```lua
|
||||
lib.showTextUI('[E] - Pick apple', {
|
||||
position = "top-center",
|
||||
icon = 'hand',
|
||||
style = {
|
||||
borderRadius = 0,
|
||||
backgroundColor = '#48BB78',
|
||||
color = 'white'
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='JS/TS'>
|
||||
|
||||
```ts
|
||||
import lib from '@overextended/ox_lib/client'
|
||||
|
||||
lib.showTextUI('[E] - Pick apple', {
|
||||
position: "top-center",
|
||||
icon: 'hand',
|
||||
style: {
|
||||
borderRadius: 0,
|
||||
backgroundColor: '#48BB78',
|
||||
color: 'white'
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||

|
||||
Reference in new issue
Block a user