Notification
A library to display notification on the player screen
jo.notif.left()
Notification on the left with title, icon, color and sound
Syntax
jo.notif.left(title, text, dict, icon, color, duration,soundset_ref,soundset_name)
Parameters
title
: string
The title of the notification
text
: string
The text of the notification
dict
: string
The dictonnary of the icon
icon
: string
The name of the icon
color
: string Optional
The color of the text
default : "COLOR_WHITE"
duration
: integer Optional
The duration of the notification in ms
default: 3000
soundset_ref
: string Optional
The dictionnary of the soundset
default : "Transaction_Feed_Sounds"
soundset_name
: string Optional
The name of the soundset
default : "Transaction_Positive"
Example
local title = 'Title'
local text = 'The text'
local dict = "hud_textures"
local icon = "check"
local color = "COLOR_GREEN"
local duration = 5000
jo.notif.left(title,text, dict, icon, color,duration)
Preview
jo.notif.right()
Notification on the right with icon, color and sound
Syntax
jo.notif.right(text, dict, icon, color, duration,soundset_ref,soundset_name)
Parameters
text
: string
The text of the notification
dict
: string
The dictonnary of the icon
icon
: string
The name of the icon
color
: string Optional
The color of the text
default : "COLOR_WHITE"
duration
: integer Optional
The duration of the notification in ms
default: 3000
soundset_ref
: string Optional
The dictionnary of the soundset
default : "Transaction_Feed_Sounds"
soundset_name
: string Optional
The name of the soundset
default : "Transaction_Positive"
Example
local text = 'Success notification'
local dict = "hud_textures"
local icon = "check"
local color = "COLOR_GREEN"
local duration = 5000
jo.notif.right(text, dict, icon, color, duration)
Preview
jo.notif.rightError()
A shortcut to display an error notification
Syntax
jo.notif.rightError(text)
Parameters
text
: string
The text of the notification
Example
jo.notif.rightError("Error !")
Preview
jo.notif.rightSuccess()
A shortcut to display a successfull notification
Syntax
jo.notif.rightSuccess(text)
Parameters
text
: string
The text of the notification
Example
jo.notif.rightSuccess("Success notification")
Preview
jo.notif.simpleTop()
Notification on the top with big title and subtitle (native mission start/end)
Syntax
jo.notif.simpleTop(title, subtitle, duration)
Parameters
title
: string
the title of the notification
subtitle
: string
The text of the notification
duration
: integer Optional
The duration of the notification in ms
default: 3000
Example
local title = 'Mission Started'
local subtitle = "You just start a great mission !"
local duration = 5000
jo.notif.simpleTop(title, subtitle, duration)