BIS fnc guiMessage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Added infos about Arma 3 implementation)
mNo edit summary
Line 11: Line 11:


| [message, (header, position, isCancel, parent, pause)] call BIS_fnc_guiMessage; |= Syntax
| [message, (header, position, isCancel, parent, pause)] call BIS_fnc_guiMessage; |= Syntax
|p1= [[File:TKOH_version.gif|bottom|link=]] <span style="vertical-align:top">'''Take On Helicopters'''</span>
|p1= [[File:TKOH_version.gif|bottom|link=]] <span style="vertical-align: top; font-weight: bold">Take On Helicopters</span>
|p2= '''message''':
|p2= '''message''':
<br />[[String]] - message
<br />[[String]] - message
Line 27: Line 27:
* endState: [[Boolean]] - [[true]] when clicked OK button, [[false]] when escaped or clicked on Cancel button
* endState: [[Boolean]] - [[true]] when clicked OK button, [[false]] when escaped or clicked on Cancel button
* lbId: [[Number]] - selected listbox item (when listbox was used)
* lbId: [[Number]] - selected listbox item (when listbox was used)
Returned only after message box was closed.|= Return value
Returned only after message box is closed.|= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|s2= [message, (header, okButton, cancelButton, parent, useParentBox, pause)] call BIS_fnc_guiMessage; |= Alternative Syntax
|s2= [message, (header, okButton, cancelButton, parent, useParentBox, pause)] call BIS_fnc_guiMessage; |= Alternative Syntax
|p21= [[File:arma3_release_version.gif|link=]] <span style="vertical-align:top">'''Arma 3'''</span>
|p21= [[File:arma3_release_version.gif|link=]] <span style="vertical-align: top; font-weight: bold">Arma 3</span>
|p22= '''message''':
|p22= '''message''':
<br />[[String]] - message
<br />[[String]] - message
Line 50: Line 50:


|r2= [[Boolean]] - true if "OK" button was pressed, otherwise false
|r2= [[Boolean]] - true if "OK" button was pressed, otherwise false
<br />Returned only after message windows was closed.|= Return value
<br />Returned only after message box is closed.|= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   

Revision as of 08:13, 23 June 2014

Hover & click on the images for description

Description

Description:
Shows customized native message box to user
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[message, (header, position, isCancel, parent, pause)] call BIS_fnc_guiMessage;
Parameters:
TKOH version.gif Take On Helicopters
message:
String - message
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
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

Syntax:
[message, (header, okButton, cancelButton, parent, useParentBox, pause)] call BIS_fnc_guiMessage;
Parameters:
arma3 release version.gif Arma 3
message:
String - message
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
okButton (Optional):
Boolean - enable/disable "OK" button (default: true)
String - custom text for "OK" button
cancelButton (Optional):
Boolean - enable/disable "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)
Return Value:
Boolean - true if "OK" button was pressed, otherwise false
Returned only after message box is closed.

Examples

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;
Example 4:
_result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage; // Arma 3

Additional Information

See also:
See also needed

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