TextUI
lib.showTextUI
Show the TextUI window.
danger
DO NOT run this function every tick, it's intented to be used as a toggle.
- Lua
- JS/TS
lib.showTextUI(text, options)
import lib from '@overextended/ox_lib/client'
lib.showTextUI(text, options)
- text:
string
- options?:
table
- position?:
'right-center'
or'left-center'
or'top-center'
- Default:
'right-center'
- Default:
- icon?:
string
ortable
(array
) - iconColor?:
string
- style?: React.CSSProperties
- position?:
lib.hideTextUI
Hides the currently visible TextUI window
- Lua
- JS/TS
lib.hideTextUI()
import lib from '@overextended/ox_lib/client'
lib.hideTextUI()
Usage Example
Basic
- Lua
- JS/TS
lib.showTextUI('[E] - Fuel vehicle')
import lib from '@overextended/ox_lib/client'
lib.showTextUI('[E] - Fuel vehicle')
Custom styling
- Lua
- JS/TS
lib.showTextUI('[E] - Pick apple', {
position = "top-center",
icon = 'hand',
style = {
borderRadius = 0,
backgroundColor = '#48BB78',
color = 'white'
}
})
import lib from '@overextended/ox_lib/client'
lib.showTextUI('[E] - Pick apple', {
position: "top-center",
icon: 'hand',
style: {
borderRadius: 0,
backgroundColor: '#48BB78',
color: 'white'
}
})