BIS fnc guiMessage TKOH: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| TKOH |Game name=
| TKOH


|1.00|Game version=
|1.00


|gr1= GUI |GROUP1=
|gr1= GUI


| Shows customized native message box to user.
| Shows customized native message box to user.
{{Feature|arma3|For the {{arma3}} syntax, see [[BIS_fnc_guiMessage]].}} |DESCRIPTION=
{{Feature|arma3|For the {{arma3}} syntax, see [[BIS_fnc_guiMessage]].}}


| [message, header, position, isCancel, parent, pause] call BIS_fnc_guiMessage; |SYNTAX=
| [message, header, position, isCancel, parent, pause] call BIS_fnc_guiMessage;
|p1= message: [[String]], [[Structured Text]] or [[Array]]:
|p1= message: [[String]], [[Structured Text]] or [[Array]]:
* [[String]] or [[Structured Text]] - message
* [[String]] or [[Structured Text]] - message
* [[Array]] - listbox, every item is defined as [[String]] (enabled) or [[String]] in [[Array]] (disabled)
* [[Array]] - listbox, every item is defined as [[String]] (enabled) or [[String]] in [[Array]] (disabled)
When variable '''BIS_fnc_guiMessage_cursel''' is defined as a [[Number]], item with this index will be selected. |Parameter1=
When variable '''BIS_fnc_guiMessage_cursel''' is defined as a [[Number]], item with this index will be selected.


|p2= header: [[String]] or [[Structured Text]] - (Optional, default "") header text |PARAMETER2=
|p2= header: [[String]] or [[Structured Text]] - (Optional, default "") header text


|p3= position: [[Array]] - (Optional) position in format [x,y,w,h] |PARAMETER3=
|p3= position: [[Array]] - (Optional) position in format [x,y,w,h]


|p4= isCancel: [[Boolean]] or [[Array]] - (Optional, default [[true]]) true to display cancel button or array with button texts [okText, cancelText] |PARAMETER4=
|p4= isCancel: [[Boolean]] or [[Array]] - (Optional, default [[true]]) true to display cancel button or array with button texts [okText, cancelText]


|p5= parent: [[Display]] - (Optional) parent display |PARAMETER5=
|p5= parent: [[Display]] - (Optional) parent display


|p6= pause: [[Boolean]] - (Optional) true to pause simulation when message window is open |PARAMETER6=
|p6= pause: [[Boolean]] - (Optional) 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]] - (Optional, returned if listbox was used) selected listbox item
* lbId: [[Number]] - (Optional, returned if listbox was used) selected listbox item
Returned only after message box is closed. |RETURNVALUE=
Returned only after message box is closed.


|x1= <code>["Hello World"] [[spawn]] [[BIS_fnc_guiMessage TKOH|BIS_fnc_guiMessage]];</code>|Example1=
|x1= <code>["Hello World"] [[spawn]] [[BIS_fnc_guiMessage TKOH|BIS_fnc_guiMessage]];</code>


|x2= [[File:TakeOn BIS fnc guiMessage.jpg|right|200px]]
|x2= [[File:TakeOn BIS fnc guiMessage.jpg|right|200px]]
<code>["Message", "Header", [[nil]], [[true]]] [[spawn]] [[BIS_fnc_guiMessage TKOH|BIS_fnc_guiMessage]];</code><div style="clear: both"></div> |Example2=
<code>["Message", "Header", [[nil]], [[true]]] [[spawn]] [[BIS_fnc_guiMessage TKOH|BIS_fnc_guiMessage]];</code><div style="clear: both"></div>


|x3= <code>[["Enabled Item", ["Disabled Item"]], "Header"] [[spawn]] [[BIS_fnc_guiMessage TKOH|BIS_fnc_guiMessage]];</code>|Example3=
|x3= <code>[["Enabled Item", ["Disabled Item"]], "Header"] [[spawn]] [[BIS_fnc_guiMessage TKOH|BIS_fnc_guiMessage]];</code>


| [[hintC]], [[BIS_fnc_GUIhint]] |SEEALSO=
| [[hintC]], [[BIS_fnc_GUIhint]]


|exec= spawn
|exec= spawn

Revision as of 00:04, 18 January 2021

Hover & click on the images for description

Description

Description:
Shows customized native message box to user.
Arma 3
For the Arma 3 syntax, see BIS_fnc_guiMessage.
Execution:
spawn
Groups:
GUI

Syntax

Syntax:
[message, header, position, isCancel, parent, pause] call BIS_fnc_guiMessage;
Parameters:
message: String, Structured Text or Array: When variable BIS_fnc_guiMessage_cursel is defined as a Number, item with this index will be selected.
header: String or Structured Text - (Optional, default "") header text
position: Array - (Optional) position in format [x,y,w,h]
isCancel: Boolean or Array - (Optional, default true) true to display cancel button or array with button texts [okText, cancelText]
parent: Display - (Optional) parent display
pause: Boolean - (Optional) 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 - (Optional, returned if listbox was used) selected listbox item
Returned only after message box is closed.

Examples

Example 1:
["Hello World"] spawn BIS_fnc_guiMessage;
Example 2:
TakeOn BIS fnc guiMessage.jpg
["Message", "Header", nil, true] spawn BIS_fnc_guiMessage;
Example 3:
[["Enabled Item", ["Disabled Item"]], "Header"] spawn BIS_fnc_guiMessage;

Additional Information

See also:
hintCBIS_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


Bottom Section