Difference between revisions of "BIS fnc guiMessage"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Corrections)
Line 53: Line 53:
[[File:TakeOn BIS fnc guiMessage.jpg|200px]]|=
[[File:TakeOn BIS fnc guiMessage.jpg|200px]]|=
|x3= <code>[["Enabled Item",["Disabled Item"]],"Header"] spawn BIS_fnc_guiMessage;</code>|=
|x3= <code>[["Enabled Item",["Disabled Item"]],"Header"] spawn BIS_fnc_guiMessage; // TKOH</code>|=
|x4= <code>_result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage; // Arma 3</code>|=
|x4= <code>_result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage; // Arma 3</code>|=

Revision as of 01:59, 26 December 2014

Hover & click on the images for description


Shows customized native message box to user


[message, (header, position, isCancel, parent, pause)] call BIS_fnc_guiMessage;
TKOH version.gif Take On Helicopters
String or Structured Text - message
Array - listbox, every item is defined as String (enabled) or String in Array (disabled)

When variable BIS_fnc_guiMessage_cursel is defined and is Number, item with index equal to the variable will be selected by default.
header (Optional): String or Structured Text - header text
position (Optional): Array - position in format [x,y,w,h]
isCancel (Optional): Boolean or Array - true to display cancel button or array with button texts [okText,cancelText]
parent (Optional): Display - parent display
pause (Optional): Boolean - true to pause simulation when message window is open
Return Value:
Array - [endState, (lbId)]
  • endState: Boolean - true when clicked OK button, false when escaped or clicked on Cancel button
  • lbId: Number - selected listbox item (when listbox was used)
Returned only after message box is closed.

Alternative Syntax

[message, (header, okButton, cancelButton, parent, useParentBox, pause)] call BIS_fnc_guiMessage;
arma3 release version.gif Arma 3
message: String or Structured Text - message
header (Optional): String - header text
okButton (Optional):
Boolean - enable "OK" button (default: true)
String - custom text for "OK" button
cancelButton (Optional):
Boolean - enable "Cancel" button (default: false)
String - custom text for "Cancel" button
parent (Optional): Display - parent display
useParentBox (Optional): Boolean - try to use control inherited from "RscMessageBox" in parent instead of creating a new one (default: false)
pause (Optional): Boolean - pause simulation when message box is open (default: true, no effect in multiplayer)
Return Value:
Boolean - true if "OK" button was pressed, otherwise false
Returned only after message box is closed.


Example 1:
["Hello World"] spawn BIS_fnc_guiMessage;
Example 2:
["Message","Header",nil,true] spawn BIS_fnc_guiMessage; Result:
TakeOn BIS fnc guiMessage.jpg
Example 3:
[["Enabled Item",["Disabled Item"]],"Header"] spawn BIS_fnc_guiMessage; // TKOH
Example 4:
_result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage; // Arma 3

Additional Information

See also:
See also needed


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


Bottom Section

Posted on June 24, 2014 - 00:43 (UTC)
Message boxes can be force-closed with: uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];