BIS fnc showNotification: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ")
m (Text replacement - "<code> *([^<|{]*) *<\/code>" to "<sqf>$1</sqf>")
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
|eff= local
|eff= local


|descr= Show [[Notification]].
|descr= Show a config-defined [[Arma 3: Notification|notification]].


|s1=[template,(arguments)] call [[BIS_fnc_showNotification]]
|s1= [template, arguments] call [[BIS_fnc_showNotification]]


|p1= '''template''': [[String]] - notification template from ''CfgNotifications''
|p1= '''template''': [[String]] - notification class name from {{hl|CfgNotifications}}
|p2= '''arguments''': [[Array]] - additional arguments passed to the template (default: [])


|r1=[[Boolean]]
|p2= '''arguments''': [[Array]] - (Optional, default []) additional [[format]] arguments to fill notification's fields ({{hl|title}}, {{hl|description}}, {{hl|iconPicture}}, {{hl|iconText}}, {{hl|soundRadio}})


|x1= <code>["TaskSucceeded",["","Disable the nuke"]] [[call]] [[BIS_fnc_showNotification]];</code>
|r1= [[Boolean]]


|x2= <code>["ScoreAdded",["Disabled the nuke without triggering an alarm.",5]] [[call]] [[BIS_fnc_showNotification]];</code>
|x1= <sqf>["TaskSucceeded", ["", "Disable the nuke"]] call BIS_fnc_showNotification;</sqf>


|seealso= [[Notification]]
|x2= <sqf>["ScoreAdded", ["Disabled the nuke without triggering an alarm.", 5]] call BIS_fnc_showNotification;</sqf>
 
|seealso= [[Arma 3: Notification]]
}}
}}

Revision as of 23:44, 12 July 2022

Hover & click on the images for description

Description

Description:
Show a config-defined notification.
Execution:
call
Groups:
GUI

Syntax

Syntax:
[template, arguments] call BIS_fnc_showNotification
Parameters:
template: String - notification class name from CfgNotifications
arguments: Array - (Optional, default []) additional format arguments to fill notification's fields (title, description, iconPicture, iconText, soundRadio)
Return Value:
Boolean

Examples

Example 1:
["TaskSucceeded", ["", "Disable the nuke"]] call BIS_fnc_showNotification;
Example 2:
["ScoreAdded", ["Disabled the nuke without triggering an alarm.", 5]] call BIS_fnc_showNotification;

Additional Information

See also:
Arma 3: Notification

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note