BIS_fnc_GUImessage

From Bohemia Interactive Community
Revision as of 06:29, 24 December 2014 by DreadedEntity (talk | contribs) (Changed the formatting to better match with the rest of the wiki and added function information)
Jump to navigation Jump to search


Hover & click on the images for description

Description

Description:
Creates a fully dynamic GUI message box in the center of the player's screen.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[body, header, OKbutton, Cancelbutton, display, inheritClass, pauseGame] call BIS_fnc_GUImessage
Parameters:
[body, header, OKbutton, Cancelbutton, display, inheritClass, pauseGame]: Array
body: String or Structured Text (optional) - Default: "".
header: String (optional) - Default: "".
OKbutton: Boolean or String (optional) - True/False to enable/disable button with default string of "OK", or enable the button with the input string. Default: true.
Cancelbutton: Boolean or String (optional) - True/False to enable/disable button with default string of "CANCEL", or enable the button with the input string. Default: false.
display: Display (optional) - Default: Main display of current mission/intro/outro.
inheritClass: Boolean (optional) - True to use "RscMessageBox" class from the current display, false to use BIS-created "RscMessageBox" class. Default: false.
pauseGame: Boolean (optional) - Default: true.
Return Value:
Boolean - true if "OK" button was activated, false if "Cancel" was activated or user pressed "Escape" key.

Examples

Example 1:
["Example Body", "Example Header", true, true, findDisplay 46, false, true] call BIS_fnc_GUImessage;
Example 2:
[composeText ["Example", lineBreak, "Body"], "Example Header", true, true, findDisplay 46, false, true] call BIS_fnc_GUImessage;

Additional Information

See also:
BIS_fnc_GUIhint

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

Notes

Bottom Section

Posted on December 24, 2014 - 03:52 (UTC)
DreadedEntity
Some code that should produce a "Mission Credits" GUI (tested with a sample array, not actual MP). Lists all connected players. _allPlayers = "composeText ["; { if (isPlayer _x) then { _allPlayers = format ["%1'%2'", _allPlayers, name _x]; if (_forEachIndex < ((count playableUnits) - 1)) then { _allPlayers = format ["%1,lineBreak,", _allPlayers]; }; }; }forEach playableUnits; _allPlayers = format ["%1];", _allPlayers]; _structuredText = call compile _allPlayers; [_structuredText, "Mission Credits", "THANK YOU", "THANK YOU", findDisplay 46, false, true] spawn BIS_fnc_GUImessage;