Bridge Interfaces
Overview
Includes a bridge for the following:
- Notification
- Context Menu
- Progressbar
- Text UI
Notification
local notify = Framework.notify or exports.bl_bridge:notify()
--client
notify({
title = 'Notification description',
type = 'success',
duration = 1000
})
--server
notify(source, {
title = 'Notification description',
type = 'success'
duration = 1000
})- title?:
string - type?:
'inform'or'error'or'success'or'warning' - duration?:
number
Context Menu
local context = Framework.context or exports.bl_bridge:context()
context.openContext(data)
context.closeContext()- title:
string - isMenuHeader:
boolean - description?:
string - icon?:
string - onSelect?:
function - event?:
string - serverEvent?:
string - disabled?:
boolean - event?:
string - args?:
any
Progress Bar
local progressbar = Framework.progressbar or exports.bl_bridge:progressbar()
progressbar.showProgress({
duration = 3000,
label = '',
canCancel? = true,
useWhileDead? = false,
disableControl? = {
move = true,
car = true,
mouse = true,
combat = true,
},
animation = {
dict = ''
clip = ''
flag = 0
},
prop = {
model = ''
bone = 0
pos = vector3(0.0, 0.0, 0.0)
rot = vector3(0.0, 0.0, 0.0)
}
})
progressbar.isProgressActive() -- return if progress is ative
progressbar.cancelProgress() -- cancel current progressText UI
local textui = Framework.textui or exports.bl_bridge:textui()
textui.showTextUI(text, position)
textui.hideTextUI() -- hide current textui
textui.isTextUIOpen()-- return if textui is ative- text:
string - position:
right|left|top