Difference between revisions of "BIS fnc guiMessage"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
(Added infos about Arma 3 implementation)
Line 7: Line 7:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| Send function for remote execution (and executes locally if conditions are met) . |= Description
+
| Shows customized native message box to user |= Description
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| [message, (header, position, isCancel, parent, pause)] spawn 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= '''message''':
+
|p2= '''message''':
 
<br />[[String]] - message
 
<br />[[String]] - message
 
<br />[[Structured Text]] - message
 
<br />[[Structured Text]] - message
Line 18: Line 18:
 
<br />
 
<br />
 
<br />When variable '''BIS_fnc_guiMessage_cursel''' is defined and is [[Number]], item with index equal to the variable will be selected by default. |=
 
<br />When variable '''BIS_fnc_guiMessage_cursel''' is defined and is [[Number]], item with index equal to the variable will be selected by default. |=
|p2= '''header''' (Optional): [[String]] or [[Structured Text]] - header |=
+
|p3= '''header''' (Optional): [[String]] or [[Structured Text]] - header |=
|p3= '''position''' (Optional): [[Array]] - position in format [x,y,w,h] |=
+
|p4= '''position''' (Optional): [[Array]] - position in format [x,y,w,h] |=
|p4= '''isCancel''' (Optional): [[Boolean]] or [[Array]] - true to display cancel button or array with button texts [okText,cancelText] |=
+
|p5= '''isCancel''' (Optional): [[Boolean]] or [[Array]] - true to display cancel button or array with button texts [okText,cancelText] |=
|p5= '''parent''' (Optional): [[Display]] - parent display |=
+
|p6= '''parent''' (Optional): [[Display]] - parent display |=
|p6= '''pause''' (Optional): [[Boolean]] - true to pause simulation when message window is open |=
+
|p7= '''pause''' (Optional): [[Boolean]] - true to pause simulation when message window is open |=
  
 
| [[Array]] - [endState, (lbId)]
 
| [[Array]] - [endState, (lbId)]
 
* 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 windows was closed.|= Return value
+
Returned only after message box was closed.|= Return value
 +
____________________________________________________________________________________________
 +
 
 +
|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>
 +
|p22= '''message''':
 +
<br />[[String]] - message
 +
<br />[[Structured Text]] - message
 +
<br />[[Array]] - listbox, every item is defined as [[String]] (enabled) or [[String]] in [[Array]] (disabled)
 +
<br />
 +
<br />When variable '''BIS_fnc_guiMessage_cursel''' is defined and is [[Number]], item with index equal to the variable will be selected by default. |=
 +
|p23= '''header''' (Optional): [[String]] or [[Structured Text]] - header |=
 +
|p24= '''okButton''' (Optional):
 +
<br />[[Boolean]] - enable/disable "OK" button (default: true)
 +
<br />[[String]] - custom text for "OK" button |=
 +
|p25= '''cancelButton''' (Optional):
 +
<br />[[Boolean]] - enable/disable "Cancel" button (default: false)
 +
<br />[[String]] - custom text for "Cancel" button |=
 +
|p26= '''parent''' (Optional): [[Display]] - parent display |=
 +
|p27= '''useParentBox''' (Optional): [[Boolean]] - try to use control inherited from "RscMessageBox" in parent instead of creating a new one (default: false) |=
 +
|p28= '''pause''' (Optional): [[Boolean]] - pause simulation when message box is open (default: true) |=
 +
 
 +
|r2= [[Boolean]] - true if "OK" button was pressed, otherwise false
 +
<br />Returned only after message windows was closed.|= Return value
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
 
   
 
   
Line 37: Line 60:
  
 
|x3= <code>[["Enabled Item",["Disabled Item"]],"Header"] spawn BIS_fnc_guiMessage;</code>|=
 
|x3= <code>[["Enabled Item",["Disabled Item"]],"Header"] spawn BIS_fnc_guiMessage;</code>|=
 +
 +
|x4= <code>_result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage; // Arma 3</code>|=
  
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|exec= spawn |=
+
|exec= call |=
  
 
| |= See also
 
| |= See also
Line 56: Line 81:
  
 
[[Category:Take_On_Helicopters:_Functions|guiMessage]]
 
[[Category:Take_On_Helicopters:_Functions|guiMessage]]
 +
[[Category:Arma_3:_Functions|guiMessage]]
 
[[Category:Function Group: GUI|guiMessage]]
 
[[Category:Function Group: GUI|guiMessage]]

Revision as of 05:14, 23 June 2014

Introduced with Take On Helicopters version 1.001.00
Hover & click on the images for descriptions

Description

Description:
Shows customized native message box to user

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 was 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 windows was 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

Execution:
call
See also:
See also needed
Groups:
Uncategorised

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Notes

Bottom Section